|
| 1 | +# frozen_string_literal: true |
| 2 | + |
1 | 3 | require "sqlite3/errors"
|
2 | 4 |
|
3 | 5 | module SQLite3
|
@@ -77,26 +79,26 @@ def set_int_pragma(name, value)
|
77 | 79 | end
|
78 | 80 |
|
79 | 81 | # The enumeration of valid synchronous modes.
|
80 |
| - SYNCHRONOUS_MODES = [["full", 2], ["normal", 1], ["off", 0]] |
| 82 | + SYNCHRONOUS_MODES = [["full", 2], ["normal", 1], ["off", 0]].map(&:freeze).freeze |
81 | 83 |
|
82 | 84 | # The enumeration of valid temp store modes.
|
83 |
| - TEMP_STORE_MODES = [["default", 0], ["file", 1], ["memory", 2]] |
| 85 | + TEMP_STORE_MODES = [["default", 0], ["file", 1], ["memory", 2]].map(&:freeze).freeze |
84 | 86 |
|
85 | 87 | # The enumeration of valid auto vacuum modes.
|
86 |
| - AUTO_VACUUM_MODES = [["none", 0], ["full", 1], ["incremental", 2]] |
| 88 | + AUTO_VACUUM_MODES = [["none", 0], ["full", 1], ["incremental", 2]].map(&:freeze).freeze |
87 | 89 |
|
88 | 90 | # The list of valid journaling modes.
|
89 | 91 | JOURNAL_MODES = [["delete"], ["truncate"], ["persist"], ["memory"],
|
90 |
| - ["wal"], ["off"]] |
| 92 | + ["wal"], ["off"]].map(&:freeze).freeze |
91 | 93 |
|
92 | 94 | # The list of valid locking modes.
|
93 |
| - LOCKING_MODES = [["normal"], ["exclusive"]] |
| 95 | + LOCKING_MODES = [["normal"], ["exclusive"]].map(&:freeze).freeze |
94 | 96 |
|
95 | 97 | # The list of valid encodings.
|
96 |
| - ENCODINGS = [["utf-8"], ["utf-16"], ["utf-16le"], ["utf-16be"]] |
| 98 | + ENCODINGS = [["utf-8"], ["utf-16"], ["utf-16le"], ["utf-16be"]].map(&:freeze).freeze |
97 | 99 |
|
98 | 100 | # The list of valid WAL checkpoints.
|
99 |
| - WAL_CHECKPOINTS = [["passive"], ["full"], ["restart"], ["truncate"]] |
| 101 | + WAL_CHECKPOINTS = [["passive"], ["full"], ["restart"], ["truncate"]].map(&:freeze).freeze |
100 | 102 |
|
101 | 103 | def application_id
|
102 | 104 | get_int_pragma "application_id"
|
|
0 commit comments