You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit updates the Database documentation with lots of examples
and explanation, but to sum up:
Database.new(":memory:", extensions: ["SQLean::Crypto"])
which allows injection of extensions in a Rails database config:
development:
adapter: sqlite3
database: storage/development.sqlite3
extensions:
- SQLean::Crypto
# Create a new Database object that opens the given file.
82
129
#
83
130
# Supported permissions +options+:
84
131
# - the default mode is <tt>READWRITE | CREATE</tt>
85
-
# - +:readonly+: boolean (default false), true to set the mode to +READONLY+
86
-
# - +:readwrite+: boolean (default false), true to set the mode to +READWRITE+
87
-
# - +:flags+: set the mode to a combination of SQLite3::Constants::Open flags.
132
+
# - +readonly:+ boolean (default false), true to set the mode to +READONLY+
133
+
# - +readwrite:+ boolean (default false), true to set the mode to +READWRITE+
134
+
# - +flags:+ set the mode to a combination of SQLite3::Constants::Open flags.
88
135
#
89
136
# Supported encoding +options+:
90
-
# - +:utf16+: boolean (default false), is the filename's encoding UTF-16 (only needed if the filename encoding is not UTF_16LE or BE)
137
+
# - +utf16:+ +boolish+ (default false), is the filename's encoding UTF-16 (only needed if the filename encoding is not UTF_16LE or BE)
91
138
#
92
139
# Other supported +options+:
93
-
# - +:strict+: boolean (default false), disallow the use of double-quoted string literals (see https://www.sqlite.org/quirks.html#double_quoted_string_literals_are_accepted)
94
-
# - +:results_as_hash+: boolean (default false), return rows as hashes instead of arrays
95
-
# - +:default_transaction_mode+: one of +:deferred+ (default), +:immediate+, or +:exclusive+. If a mode is not specified in a call to #transaction, this will be the default transaction mode.
140
+
# - +strict:+ +boolish+ (default false), disallow the use of double-quoted string literals (see https://www.sqlite.org/quirks.html#double_quoted_string_literals_are_accepted)
141
+
# - +results_as_hash:+ +boolish+ (default false), return rows as hashes instead of arrays
142
+
# - +default_transaction_mode:+ one of +:deferred+ (default), +:immediate+, or +:exclusive+. If a mode is not specified in a call to #transaction, this will be the default transaction mode.
143
+
# - +extensions:+ <tt>Array[String | _ExtensionSpecifier]</tt> SQLite extensions to load into the database. See Database@SQLite+Extensions for more information.
0 commit comments