rails_type_id 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (124) hide show
  1. checksums.yaml +7 -0
  2. data/.rubocop.yml +25 -0
  3. data/.ruby-version +1 -0
  4. data/README.md +46 -0
  5. data/Rakefile +16 -0
  6. data/lib/rails_type_id/concern.rb +129 -0
  7. data/lib/rails_type_id/require.rb +6 -0
  8. data/lib/rails_type_id/test_helper.rb +16 -0
  9. data/lib/rails_type_id/version.rb +6 -0
  10. data/lib/rails_type_id.rb +9 -0
  11. data/lib/tapioca/dsl/compilers/rails_type_id_compiler.rb +49 -0
  12. data/sig/rails_type_id.rbs +4 -0
  13. data/sorbet/config +4 -0
  14. data/sorbet/rbi/annotations/.gitattributes +1 -0
  15. data/sorbet/rbi/annotations/actionmailer.rbi +10 -0
  16. data/sorbet/rbi/annotations/actionpack.rbi +430 -0
  17. data/sorbet/rbi/annotations/actionview.rbi +75 -0
  18. data/sorbet/rbi/annotations/activejob.rbi +44 -0
  19. data/sorbet/rbi/annotations/activemodel.rbi +89 -0
  20. data/sorbet/rbi/annotations/activerecord.rbi +98 -0
  21. data/sorbet/rbi/annotations/activesupport.rbi +468 -0
  22. data/sorbet/rbi/annotations/globalid.rbi +30 -0
  23. data/sorbet/rbi/annotations/minitest.rbi +119 -0
  24. data/sorbet/rbi/annotations/railties.rbi +61 -0
  25. data/sorbet/rbi/annotations/rainbow.rbi +269 -0
  26. data/sorbet/rbi/dsl/.gitattributes +1 -0
  27. data/sorbet/rbi/dsl/active_model/validations/callbacks.rbi +21 -0
  28. data/sorbet/rbi/dsl/active_model/validations.rbi +26 -0
  29. data/sorbet/rbi/dsl/active_support/callbacks.rbi +21 -0
  30. data/sorbet/rbi/dsl/rails_type_id/concern.rbi +22 -0
  31. data/sorbet/rbi/gems/.gitattributes +1 -0
  32. data/sorbet/rbi/gems/actioncable@8.0.2.rbi +3133 -0
  33. data/sorbet/rbi/gems/actionmailbox@8.0.2.rbi +991 -0
  34. data/sorbet/rbi/gems/actionmailer@8.0.2.rbi +2775 -0
  35. data/sorbet/rbi/gems/actionpack@8.0.2.rbi +21167 -0
  36. data/sorbet/rbi/gems/actiontext@8.0.2.rbi +1449 -0
  37. data/sorbet/rbi/gems/actionview@8.0.2.rbi +15789 -0
  38. data/sorbet/rbi/gems/activejob@8.0.2.rbi +2864 -0
  39. data/sorbet/rbi/gems/activemodel@8.0.2.rbi +6946 -0
  40. data/sorbet/rbi/gems/activerecord@8.0.2.rbi +42458 -0
  41. data/sorbet/rbi/gems/activestorage@8.0.2.rbi +2156 -0
  42. data/sorbet/rbi/gems/activesupport@8.0.2.rbi +21274 -0
  43. data/sorbet/rbi/gems/ast@2.4.3.rbi +586 -0
  44. data/sorbet/rbi/gems/base64@0.3.0.rbi +545 -0
  45. data/sorbet/rbi/gems/benchmark@0.4.1.rbi +619 -0
  46. data/sorbet/rbi/gems/bigdecimal@3.2.2.rbi +275 -0
  47. data/sorbet/rbi/gems/builder@3.3.0.rbi +9 -0
  48. data/sorbet/rbi/gems/concurrent-ruby@1.3.5.rbi +11734 -0
  49. data/sorbet/rbi/gems/connection_pool@2.5.3.rbi +9 -0
  50. data/sorbet/rbi/gems/crass@1.0.6.rbi +623 -0
  51. data/sorbet/rbi/gems/date@3.4.1.rbi +403 -0
  52. data/sorbet/rbi/gems/drb@2.2.3.rbi +1661 -0
  53. data/sorbet/rbi/gems/erb@5.0.2.rbi +878 -0
  54. data/sorbet/rbi/gems/erubi@1.13.1.rbi +157 -0
  55. data/sorbet/rbi/gems/globalid@1.2.1.rbi +742 -0
  56. data/sorbet/rbi/gems/i18n@1.14.7.rbi +2383 -0
  57. data/sorbet/rbi/gems/io-console@0.8.1.rbi +9 -0
  58. data/sorbet/rbi/gems/json@2.12.2.rbi +2287 -0
  59. data/sorbet/rbi/gems/language_server-protocol@3.17.0.5.rbi +9 -0
  60. data/sorbet/rbi/gems/lint_roller@1.1.0.rbi +323 -0
  61. data/sorbet/rbi/gems/logger@1.7.0.rbi +963 -0
  62. data/sorbet/rbi/gems/loofah@2.24.1.rbi +1105 -0
  63. data/sorbet/rbi/gems/mail@2.8.1.rbi +8890 -0
  64. data/sorbet/rbi/gems/marcel@1.0.4.rbi +239 -0
  65. data/sorbet/rbi/gems/mini_mime@1.1.5.rbi +173 -0
  66. data/sorbet/rbi/gems/minitest@5.25.5.rbi +2231 -0
  67. data/sorbet/rbi/gems/net-imap@0.5.9.rbi +10285 -0
  68. data/sorbet/rbi/gems/net-pop@0.1.2.rbi +927 -0
  69. data/sorbet/rbi/gems/net-protocol@0.2.2.rbi +292 -0
  70. data/sorbet/rbi/gems/net-smtp@0.5.1.rbi +1240 -0
  71. data/sorbet/rbi/gems/netrc@0.11.0.rbi +177 -0
  72. data/sorbet/rbi/gems/nio4r@2.7.4.rbi +388 -0
  73. data/sorbet/rbi/gems/nokogiri@1.18.9.rbi +8548 -0
  74. data/sorbet/rbi/gems/parallel@1.27.0.rbi +291 -0
  75. data/sorbet/rbi/gems/parser@3.3.9.0.rbi +5537 -0
  76. data/sorbet/rbi/gems/pp@0.6.2.rbi +368 -0
  77. data/sorbet/rbi/gems/prettyprint@0.2.0.rbi +477 -0
  78. data/sorbet/rbi/gems/prism@1.4.0.rbi +41790 -0
  79. data/sorbet/rbi/gems/psych@5.2.6.rbi +2542 -0
  80. data/sorbet/rbi/gems/racc@1.8.1.rbi +168 -0
  81. data/sorbet/rbi/gems/rack-session@2.1.1.rbi +722 -0
  82. data/sorbet/rbi/gems/rack-test@2.2.0.rbi +729 -0
  83. data/sorbet/rbi/gems/rack@3.2.0.rbi +5054 -0
  84. data/sorbet/rbi/gems/rackup@2.2.1.rbi +230 -0
  85. data/sorbet/rbi/gems/rails-dom-testing@2.3.0.rbi +790 -0
  86. data/sorbet/rbi/gems/rails-html-sanitizer@1.6.2.rbi +645 -0
  87. data/sorbet/rbi/gems/rails@8.0.2.rbi +9 -0
  88. data/sorbet/rbi/gems/railties@8.0.2.rbi +4014 -0
  89. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +403 -0
  90. data/sorbet/rbi/gems/rake@13.3.0.rbi +3039 -0
  91. data/sorbet/rbi/gems/rbi@0.3.6.rbi +5162 -0
  92. data/sorbet/rbi/gems/rbs@4.0.0.dev.4.rbi +7895 -0
  93. data/sorbet/rbi/gems/rdoc@6.14.2.rbi +12944 -0
  94. data/sorbet/rbi/gems/regexp_parser@2.10.0.rbi +3833 -0
  95. data/sorbet/rbi/gems/reline@0.6.2.rbi +9 -0
  96. data/sorbet/rbi/gems/require-hooks@0.2.2.rbi +110 -0
  97. data/sorbet/rbi/gems/rexml@3.4.1.rbi +5205 -0
  98. data/sorbet/rbi/gems/rubocop-ast@1.46.0.rbi +7473 -0
  99. data/sorbet/rbi/gems/rubocop-sorbet@0.10.5.rbi +2386 -0
  100. data/sorbet/rbi/gems/rubocop@1.79.1.rbi +63674 -0
  101. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1318 -0
  102. data/sorbet/rbi/gems/securerandom@0.4.1.rbi +75 -0
  103. data/sorbet/rbi/gems/spoom@1.7.5.rbi +5832 -0
  104. data/sorbet/rbi/gems/sqlite3@2.7.3.rbi +1989 -0
  105. data/sorbet/rbi/gems/stringio@3.1.7.rbi +9 -0
  106. data/sorbet/rbi/gems/tapioca@0.17.7.rbi +3692 -0
  107. data/sorbet/rbi/gems/thor@1.4.0.rbi +4399 -0
  108. data/sorbet/rbi/gems/timeout@0.4.3.rbi +157 -0
  109. data/sorbet/rbi/gems/typeid@0.2.2.rbi +239 -0
  110. data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +5919 -0
  111. data/sorbet/rbi/gems/unicode-display_width@3.1.4.rbi +132 -0
  112. data/sorbet/rbi/gems/unicode-emoji@4.0.4.rbi +251 -0
  113. data/sorbet/rbi/gems/uri@1.0.3.rbi +2354 -0
  114. data/sorbet/rbi/gems/useragent@0.16.11.rbi +9 -0
  115. data/sorbet/rbi/gems/uuid7@0.2.0.rbi +60 -0
  116. data/sorbet/rbi/gems/websocket-driver@0.8.0.rbi +1065 -0
  117. data/sorbet/rbi/gems/websocket-extensions@0.1.5.rbi +117 -0
  118. data/sorbet/rbi/gems/with_model@2.2.0.rbi +282 -0
  119. data/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +430 -0
  120. data/sorbet/rbi/gems/yard@0.9.37.rbi +18512 -0
  121. data/sorbet/rbi/gems/zeitwerk@2.7.3.rbi +1196 -0
  122. data/sorbet/tapioca/config.yml +13 -0
  123. data/sorbet/tapioca/require.rb +13 -0
  124. metadata +208 -0
@@ -0,0 +1,1989 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `sqlite3` gem.
5
+ # Please instead update this file by running `bin/tapioca gem sqlite3`.
6
+
7
+
8
+ module Process
9
+ extend ::SQLite3::ForkSafety::CoreExt
10
+ extend ::ActiveSupport::ForkTracker::CoreExt
11
+ end
12
+
13
+ # source://sqlite3//lib/sqlite3/constants.rb#1
14
+ module SQLite3
15
+ class << self
16
+ # source://sqlite3//lib/sqlite3.rb#4
17
+ def libversion; end
18
+
19
+ # source://sqlite3//lib/sqlite3.rb#4
20
+ def sqlcipher?; end
21
+
22
+ # source://sqlite3//lib/sqlite3.rb#4
23
+ def status(*_arg0); end
24
+
25
+ # source://sqlite3//lib/sqlite3.rb#4
26
+ def threadsafe; end
27
+
28
+ # Was sqlite3 compiled with thread safety on?
29
+ #
30
+ # @return [Boolean]
31
+ #
32
+ # source://sqlite3//lib/sqlite3.rb#14
33
+ def threadsafe?; end
34
+ end
35
+ end
36
+
37
+ # source://sqlite3//lib/sqlite3/errors.rb#43
38
+ class SQLite3::AbortException < ::SQLite3::Exception; end
39
+
40
+ # source://sqlite3//lib/sqlite3/errors.rb#81
41
+ class SQLite3::AuthorizationException < ::SQLite3::Exception; end
42
+
43
+ class SQLite3::Backup
44
+ # source://sqlite3//lib/sqlite3.rb#4
45
+ def initialize(_arg0, _arg1, _arg2, _arg3); end
46
+
47
+ # source://sqlite3//lib/sqlite3.rb#4
48
+ def finish; end
49
+
50
+ # source://sqlite3//lib/sqlite3.rb#4
51
+ def pagecount; end
52
+
53
+ # source://sqlite3//lib/sqlite3.rb#4
54
+ def remaining; end
55
+
56
+ # source://sqlite3//lib/sqlite3.rb#4
57
+ def step(_arg0); end
58
+ end
59
+
60
+ class SQLite3::Blob < ::String; end
61
+
62
+ # source://sqlite3//lib/sqlite3/errors.rb#45
63
+ class SQLite3::BusyException < ::SQLite3::Exception; end
64
+
65
+ # source://sqlite3//lib/sqlite3/errors.rb#63
66
+ class SQLite3::CantOpenException < ::SQLite3::Exception; end
67
+
68
+ # source://sqlite3//lib/sqlite3/constants.rb#2
69
+ module SQLite3::Constants; end
70
+
71
+ # CAPI3REF: Fundamental Datatypes
72
+ #
73
+ # ^(Every value in SQLite has one of five fundamental datatypes:
74
+ #
75
+ # <ul>
76
+ # <li> 64-bit signed integer
77
+ # <li> 64-bit IEEE floating point number
78
+ # <li> string
79
+ # <li> BLOB
80
+ # <li> NULL
81
+ # </ul>)^
82
+ #
83
+ # These constants are codes for each of those types.
84
+ #
85
+ # source://sqlite3//lib/sqlite3/constants.rb#39
86
+ module SQLite3::Constants::ColumnType; end
87
+
88
+ # source://sqlite3//lib/sqlite3/constants.rb#43
89
+ SQLite3::Constants::ColumnType::BLOB = T.let(T.unsafe(nil), Integer)
90
+
91
+ # source://sqlite3//lib/sqlite3/constants.rb#41
92
+ SQLite3::Constants::ColumnType::FLOAT = T.let(T.unsafe(nil), Integer)
93
+
94
+ # source://sqlite3//lib/sqlite3/constants.rb#40
95
+ SQLite3::Constants::ColumnType::INTEGER = T.let(T.unsafe(nil), Integer)
96
+
97
+ # source://sqlite3//lib/sqlite3/constants.rb#44
98
+ SQLite3::Constants::ColumnType::NULL = T.let(T.unsafe(nil), Integer)
99
+
100
+ # source://sqlite3//lib/sqlite3/constants.rb#42
101
+ SQLite3::Constants::ColumnType::TEXT = T.let(T.unsafe(nil), Integer)
102
+
103
+ # CAPI3REF: Result Codes
104
+ #
105
+ # Many SQLite functions return an integer result code from the set shown
106
+ # here in order to indicate success or failure.
107
+ #
108
+ # New error codes may be added in future versions of SQLite.
109
+ #
110
+ # source://sqlite3//lib/sqlite3/constants.rb#55
111
+ module SQLite3::Constants::ErrorCode; end
112
+
113
+ # Callback routine requested an abort
114
+ #
115
+ # source://sqlite3//lib/sqlite3/constants.rb#65
116
+ SQLite3::Constants::ErrorCode::ABORT = T.let(T.unsafe(nil), Integer)
117
+
118
+ # Authorization denied
119
+ #
120
+ # source://sqlite3//lib/sqlite3/constants.rb#103
121
+ SQLite3::Constants::ErrorCode::AUTH = T.let(T.unsafe(nil), Integer)
122
+
123
+ # The database file is locked
124
+ #
125
+ # source://sqlite3//lib/sqlite3/constants.rb#67
126
+ SQLite3::Constants::ErrorCode::BUSY = T.let(T.unsafe(nil), Integer)
127
+
128
+ # Unable to open the database file
129
+ #
130
+ # source://sqlite3//lib/sqlite3/constants.rb#85
131
+ SQLite3::Constants::ErrorCode::CANTOPEN = T.let(T.unsafe(nil), Integer)
132
+
133
+ # Abort due to constraint violation
134
+ #
135
+ # source://sqlite3//lib/sqlite3/constants.rb#95
136
+ SQLite3::Constants::ErrorCode::CONSTRAINT = T.let(T.unsafe(nil), Integer)
137
+
138
+ # The database disk image is malformed
139
+ #
140
+ # source://sqlite3//lib/sqlite3/constants.rb#79
141
+ SQLite3::Constants::ErrorCode::CORRUPT = T.let(T.unsafe(nil), Integer)
142
+
143
+ # sqlite_step() has finished executing
144
+ #
145
+ # source://sqlite3//lib/sqlite3/constants.rb#117
146
+ SQLite3::Constants::ErrorCode::DONE = T.let(T.unsafe(nil), Integer)
147
+
148
+ # (Internal Only) Database table is empty
149
+ #
150
+ # source://sqlite3//lib/sqlite3/constants.rb#89
151
+ SQLite3::Constants::ErrorCode::EMPTY = T.let(T.unsafe(nil), Integer)
152
+
153
+ # SQL error or missing database
154
+ #
155
+ # source://sqlite3//lib/sqlite3/constants.rb#59
156
+ SQLite3::Constants::ErrorCode::ERROR = T.let(T.unsafe(nil), Integer)
157
+
158
+ # Not used
159
+ #
160
+ # source://sqlite3//lib/sqlite3/constants.rb#105
161
+ SQLite3::Constants::ErrorCode::FORMAT = T.let(T.unsafe(nil), Integer)
162
+
163
+ # Insertion failed because database is full
164
+ #
165
+ # source://sqlite3//lib/sqlite3/constants.rb#83
166
+ SQLite3::Constants::ErrorCode::FULL = T.let(T.unsafe(nil), Integer)
167
+
168
+ # An internal logic error in SQLite
169
+ #
170
+ # source://sqlite3//lib/sqlite3/constants.rb#61
171
+ SQLite3::Constants::ErrorCode::INTERNAL = T.let(T.unsafe(nil), Integer)
172
+
173
+ # Operation terminated by sqlite_interrupt()
174
+ #
175
+ # source://sqlite3//lib/sqlite3/constants.rb#75
176
+ SQLite3::Constants::ErrorCode::INTERRUPT = T.let(T.unsafe(nil), Integer)
177
+
178
+ # Some kind of disk I/O error occurred
179
+ #
180
+ # source://sqlite3//lib/sqlite3/constants.rb#77
181
+ SQLite3::Constants::ErrorCode::IOERR = T.let(T.unsafe(nil), Integer)
182
+
183
+ # A table in the database is locked
184
+ #
185
+ # source://sqlite3//lib/sqlite3/constants.rb#69
186
+ SQLite3::Constants::ErrorCode::LOCKED = T.let(T.unsafe(nil), Integer)
187
+
188
+ # Data type mismatch
189
+ #
190
+ # source://sqlite3//lib/sqlite3/constants.rb#97
191
+ SQLite3::Constants::ErrorCode::MISMATCH = T.let(T.unsafe(nil), Integer)
192
+
193
+ # Library used incorrectly
194
+ #
195
+ # source://sqlite3//lib/sqlite3/constants.rb#99
196
+ SQLite3::Constants::ErrorCode::MISUSE = T.let(T.unsafe(nil), Integer)
197
+
198
+ # Uses OS features not supported on host
199
+ #
200
+ # source://sqlite3//lib/sqlite3/constants.rb#101
201
+ SQLite3::Constants::ErrorCode::NOLFS = T.let(T.unsafe(nil), Integer)
202
+
203
+ # A malloc() failed
204
+ #
205
+ # source://sqlite3//lib/sqlite3/constants.rb#71
206
+ SQLite3::Constants::ErrorCode::NOMEM = T.let(T.unsafe(nil), Integer)
207
+
208
+ # File opened that is not a database file
209
+ #
210
+ # source://sqlite3//lib/sqlite3/constants.rb#109
211
+ SQLite3::Constants::ErrorCode::NOTADB = T.let(T.unsafe(nil), Integer)
212
+
213
+ # (Internal Only) Table or record not found
214
+ #
215
+ # source://sqlite3//lib/sqlite3/constants.rb#81
216
+ SQLite3::Constants::ErrorCode::NOTFOUND = T.let(T.unsafe(nil), Integer)
217
+
218
+ # Notifications from sqlite3_log()
219
+ #
220
+ # source://sqlite3//lib/sqlite3/constants.rb#111
221
+ SQLite3::Constants::ErrorCode::NOTICE = T.let(T.unsafe(nil), Integer)
222
+
223
+ # Successful result
224
+ #
225
+ # source://sqlite3//lib/sqlite3/constants.rb#57
226
+ SQLite3::Constants::ErrorCode::OK = T.let(T.unsafe(nil), Integer)
227
+
228
+ # Access permission denied
229
+ #
230
+ # source://sqlite3//lib/sqlite3/constants.rb#63
231
+ SQLite3::Constants::ErrorCode::PERM = T.let(T.unsafe(nil), Integer)
232
+
233
+ # Database lock protocol error
234
+ #
235
+ # source://sqlite3//lib/sqlite3/constants.rb#87
236
+ SQLite3::Constants::ErrorCode::PROTOCOL = T.let(T.unsafe(nil), Integer)
237
+
238
+ # 2nd parameter to sqlite3_bind out of range
239
+ #
240
+ # source://sqlite3//lib/sqlite3/constants.rb#107
241
+ SQLite3::Constants::ErrorCode::RANGE = T.let(T.unsafe(nil), Integer)
242
+
243
+ # Attempt to write a readonly database
244
+ #
245
+ # source://sqlite3//lib/sqlite3/constants.rb#73
246
+ SQLite3::Constants::ErrorCode::READONLY = T.let(T.unsafe(nil), Integer)
247
+
248
+ # sqlite_step() has another row ready
249
+ #
250
+ # source://sqlite3//lib/sqlite3/constants.rb#115
251
+ SQLite3::Constants::ErrorCode::ROW = T.let(T.unsafe(nil), Integer)
252
+
253
+ # The database schema changed
254
+ #
255
+ # source://sqlite3//lib/sqlite3/constants.rb#91
256
+ SQLite3::Constants::ErrorCode::SCHEMA = T.let(T.unsafe(nil), Integer)
257
+
258
+ # Too much data for one row of a table
259
+ #
260
+ # source://sqlite3//lib/sqlite3/constants.rb#93
261
+ SQLite3::Constants::ErrorCode::TOOBIG = T.let(T.unsafe(nil), Integer)
262
+
263
+ # Warnings from sqlite3_log()
264
+ #
265
+ # source://sqlite3//lib/sqlite3/constants.rb#113
266
+ SQLite3::Constants::ErrorCode::WARNING = T.let(T.unsafe(nil), Integer)
267
+
268
+ module SQLite3::Constants::Open; end
269
+ SQLite3::Constants::Open::AUTOPROXY = T.let(T.unsafe(nil), Integer)
270
+ SQLite3::Constants::Open::CREATE = T.let(T.unsafe(nil), Integer)
271
+ SQLite3::Constants::Open::DELETEONCLOSE = T.let(T.unsafe(nil), Integer)
272
+ SQLite3::Constants::Open::EXCLUSIVE = T.let(T.unsafe(nil), Integer)
273
+ SQLite3::Constants::Open::FULLMUTEX = T.let(T.unsafe(nil), Integer)
274
+ SQLite3::Constants::Open::MAIN_DB = T.let(T.unsafe(nil), Integer)
275
+ SQLite3::Constants::Open::MAIN_JOURNAL = T.let(T.unsafe(nil), Integer)
276
+ SQLite3::Constants::Open::MASTER_JOURNAL = T.let(T.unsafe(nil), Integer)
277
+ SQLite3::Constants::Open::MEMORY = T.let(T.unsafe(nil), Integer)
278
+ SQLite3::Constants::Open::NOMUTEX = T.let(T.unsafe(nil), Integer)
279
+ SQLite3::Constants::Open::PRIVATECACHE = T.let(T.unsafe(nil), Integer)
280
+ SQLite3::Constants::Open::READONLY = T.let(T.unsafe(nil), Integer)
281
+ SQLite3::Constants::Open::READWRITE = T.let(T.unsafe(nil), Integer)
282
+ SQLite3::Constants::Open::SHAREDCACHE = T.let(T.unsafe(nil), Integer)
283
+ SQLite3::Constants::Open::SUBJOURNAL = T.let(T.unsafe(nil), Integer)
284
+ SQLite3::Constants::Open::SUPER_JOURNAL = T.let(T.unsafe(nil), Integer)
285
+ SQLite3::Constants::Open::TEMP_DB = T.let(T.unsafe(nil), Integer)
286
+ SQLite3::Constants::Open::TEMP_JOURNAL = T.let(T.unsafe(nil), Integer)
287
+ SQLite3::Constants::Open::TRANSIENT_DB = T.let(T.unsafe(nil), Integer)
288
+ SQLite3::Constants::Open::URI = T.let(T.unsafe(nil), Integer)
289
+ SQLite3::Constants::Open::WAL = T.let(T.unsafe(nil), Integer)
290
+
291
+ # source://sqlite3//lib/sqlite3/constants.rb#174
292
+ module SQLite3::Constants::Optimize; end
293
+
294
+ # Run ANALYZE on tables that might benefit. On by default.
295
+ #
296
+ # source://sqlite3//lib/sqlite3/constants.rb#180
297
+ SQLite3::Constants::Optimize::ANALYZE_TABLES = T.let(T.unsafe(nil), Integer)
298
+
299
+ # Check the size of all tables, not just tables that have not been recently used, to see if
300
+ # any have grown and shrunk significantly and hence might benefit from being re-analyzed. Off
301
+ # by default.
302
+ #
303
+ # source://sqlite3//lib/sqlite3/constants.rb#189
304
+ SQLite3::Constants::Optimize::CHECK_ALL_TABLES = T.let(T.unsafe(nil), Integer)
305
+
306
+ # Debugging mode. Do not actually perform any optimizations but instead return one line of
307
+ # text for each optimization that would have been done. Off by default.
308
+ #
309
+ # source://sqlite3//lib/sqlite3/constants.rb#177
310
+ SQLite3::Constants::Optimize::DEBUG = T.let(T.unsafe(nil), Integer)
311
+
312
+ # Useful for adding a bit to the default behavior, for example
313
+ #
314
+ # db.optimize(Optimize::DEFAULT | Optimize::CHECK_ALL_TABLES)
315
+ #
316
+ # source://sqlite3//lib/sqlite3/constants.rb#195
317
+ SQLite3::Constants::Optimize::DEFAULT = T.let(T.unsafe(nil), Integer)
318
+
319
+ # When running ANALYZE, set a temporary PRAGMA analysis_limit to prevent excess run-time. On
320
+ # by default.
321
+ #
322
+ # source://sqlite3//lib/sqlite3/constants.rb#184
323
+ SQLite3::Constants::Optimize::LIMIT_ANALYZE = T.let(T.unsafe(nil), Integer)
324
+
325
+ # CAPI3REF: Status Parameters
326
+ #
327
+ # These integer constants designate various run-time status parameters
328
+ # that can be returned by SQLite3.status
329
+ #
330
+ # source://sqlite3//lib/sqlite3/constants.rb#126
331
+ module SQLite3::Constants::Status; end
332
+
333
+ # This parameter records the number of separate memory allocations currently checked out.
334
+ #
335
+ # source://sqlite3//lib/sqlite3/constants.rb#171
336
+ SQLite3::Constants::Status::MALLOC_COUNT = T.let(T.unsafe(nil), Integer)
337
+
338
+ # This parameter records the largest memory allocation request handed to sqlite3_malloc() or
339
+ # sqlite3_realloc() (or their internal equivalents). Only the value returned in the
340
+ # *pHighwater parameter to sqlite3_status() is of interest. The value written into the
341
+ # *pCurrent parameter is undefined.
342
+ #
343
+ # source://sqlite3//lib/sqlite3/constants.rb#155
344
+ SQLite3::Constants::Status::MALLOC_SIZE = T.let(T.unsafe(nil), Integer)
345
+
346
+ # This parameter is the current amount of memory checked out using sqlite3_malloc(), either
347
+ # directly or indirectly. The figure includes calls made to sqlite3_malloc() by the
348
+ # application and internal memory usage by the SQLite library. Auxiliary page-cache memory
349
+ # controlled by SQLITE_CONFIG_PAGECACHE is not included in this parameter. The amount returned
350
+ # is the sum of the allocation sizes as reported by the xSize method in sqlite3_mem_methods.
351
+ #
352
+ # source://sqlite3//lib/sqlite3/constants.rb#132
353
+ SQLite3::Constants::Status::MEMORY_USED = T.let(T.unsafe(nil), Integer)
354
+
355
+ # This parameter returns the number of bytes of page cache allocation which could not be
356
+ # satisfied by the SQLITE_CONFIG_PAGECACHE buffer and where forced to overflow to
357
+ # sqlite3_malloc(). The returned value includes allocations that overflowed because they where
358
+ # too large (they were larger than the "sz" parameter to SQLITE_CONFIG_PAGECACHE) and
359
+ # allocations that overflowed because no space was left in the page cache.
360
+ #
361
+ # source://sqlite3//lib/sqlite3/constants.rb#143
362
+ SQLite3::Constants::Status::PAGECACHE_OVERFLOW = T.let(T.unsafe(nil), Integer)
363
+
364
+ # This parameter records the largest memory allocation request handed to the pagecache memory
365
+ # allocator. Only the value returned in the *pHighwater parameter to sqlite3_status() is of
366
+ # interest. The value written into the *pCurrent parameter is undefined.
367
+ #
368
+ # source://sqlite3//lib/sqlite3/constants.rb#165
369
+ SQLite3::Constants::Status::PAGECACHE_SIZE = T.let(T.unsafe(nil), Integer)
370
+
371
+ # This parameter returns the number of pages used out of the pagecache memory allocator that
372
+ # was configured using SQLITE_CONFIG_PAGECACHE. The value returned is in pages, not in bytes.
373
+ #
374
+ # source://sqlite3//lib/sqlite3/constants.rb#136
375
+ SQLite3::Constants::Status::PAGECACHE_USED = T.let(T.unsafe(nil), Integer)
376
+
377
+ # The *pHighwater parameter records the deepest parser stack. The *pCurrent value is
378
+ # undefined. The *pHighwater value is only meaningful if SQLite is compiled with
379
+ # YYTRACKMAXSTACKDEPTH.
380
+ #
381
+ # source://sqlite3//lib/sqlite3/constants.rb#160
382
+ SQLite3::Constants::Status::PARSER_STACK = T.let(T.unsafe(nil), Integer)
383
+
384
+ # NOT USED
385
+ #
386
+ # source://sqlite3//lib/sqlite3/constants.rb#149
387
+ SQLite3::Constants::Status::SCRATCH_OVERFLOW = T.let(T.unsafe(nil), Integer)
388
+
389
+ # NOT USED
390
+ #
391
+ # source://sqlite3//lib/sqlite3/constants.rb#168
392
+ SQLite3::Constants::Status::SCRATCH_SIZE = T.let(T.unsafe(nil), Integer)
393
+
394
+ # NOT USED
395
+ #
396
+ # source://sqlite3//lib/sqlite3/constants.rb#146
397
+ SQLite3::Constants::Status::SCRATCH_USED = T.let(T.unsafe(nil), Integer)
398
+
399
+ # CAPI3REF: Text Encodings
400
+ #
401
+ # These constant define integer codes that represent the various
402
+ # text encodings supported by SQLite.
403
+ #
404
+ # source://sqlite3//lib/sqlite3/constants.rb#9
405
+ module SQLite3::Constants::TextRep; end
406
+
407
+ # Deprecated
408
+ #
409
+ # source://sqlite3//lib/sqlite3/constants.rb#19
410
+ SQLite3::Constants::TextRep::ANY = T.let(T.unsafe(nil), Integer)
411
+
412
+ # sqlite3_create_collation only
413
+ #
414
+ # source://sqlite3//lib/sqlite3/constants.rb#21
415
+ SQLite3::Constants::TextRep::DETERMINISTIC = T.let(T.unsafe(nil), Integer)
416
+
417
+ # Use native byte order
418
+ #
419
+ # source://sqlite3//lib/sqlite3/constants.rb#17
420
+ SQLite3::Constants::TextRep::UTF16 = T.let(T.unsafe(nil), Integer)
421
+
422
+ # IMP: R-51971-34154
423
+ #
424
+ # source://sqlite3//lib/sqlite3/constants.rb#15
425
+ SQLite3::Constants::TextRep::UTF16BE = T.let(T.unsafe(nil), Integer)
426
+
427
+ # IMP: R-03371-37637
428
+ #
429
+ # source://sqlite3//lib/sqlite3/constants.rb#13
430
+ SQLite3::Constants::TextRep::UTF16LE = T.let(T.unsafe(nil), Integer)
431
+
432
+ # IMP: R-37514-35566
433
+ #
434
+ # source://sqlite3//lib/sqlite3/constants.rb#11
435
+ SQLite3::Constants::TextRep::UTF8 = T.let(T.unsafe(nil), Integer)
436
+
437
+ # source://sqlite3//lib/sqlite3/errors.rb#73
438
+ class SQLite3::ConstraintException < ::SQLite3::Exception; end
439
+
440
+ # source://sqlite3//lib/sqlite3/errors.rb#57
441
+ class SQLite3::CorruptException < ::SQLite3::Exception; end
442
+
443
+ # == Overview
444
+ #
445
+ # The Database class encapsulates a single connection to a SQLite3 database. Here's a
446
+ # straightforward example of usage:
447
+ #
448
+ # require 'sqlite3'
449
+ #
450
+ # SQLite3::Database.new( "data.db" ) do |db|
451
+ # db.execute( "select * from table" ) do |row|
452
+ # p row
453
+ # end
454
+ # end
455
+ #
456
+ # It wraps the lower-level methods provided by the selected driver, and includes the Pragmas
457
+ # module for access to various pragma convenience methods.
458
+ #
459
+ # The Database class provides type translation services as well, by which the SQLite3 data types
460
+ # (which are all represented as strings) may be converted into their corresponding types (as
461
+ # defined in the schemas for their tables). This translation only occurs when querying data from
462
+ # the database--insertions and updates are all still typeless.
463
+ #
464
+ # Furthermore, the Database class has been designed to work well with the ArrayFields module from
465
+ # Ara Howard. If you require the ArrayFields module before performing a query, and if you have not
466
+ # enabled results as hashes, then the results will all be indexible by field name.
467
+ #
468
+ # == Thread safety
469
+ #
470
+ # When SQLite3.threadsafe? returns true, it is safe to share instances of the database class
471
+ # among threads without adding specific locking. Other object instances may require applications
472
+ # to provide their own locks if they are to be shared among threads. Please see the README.md for
473
+ # more information.
474
+ #
475
+ # == SQLite Extensions
476
+ #
477
+ # SQLite3::Database supports the universe of {sqlite
478
+ # extensions}[https://www.sqlite.org/loadext.html]. It's possible to load an extension into an
479
+ # existing Database object using the #load_extension method and passing a filesystem path:
480
+ #
481
+ # db = SQLite3::Database.new(":memory:")
482
+ # db.enable_load_extension(true)
483
+ # db.load_extension("/path/to/extension")
484
+ #
485
+ # As of v2.4.0, it's also possible to pass an object that responds to +#to_path+. This
486
+ # documentation will refer to the supported interface as +_ExtensionSpecifier+, which can be
487
+ # expressed in RBS syntax as:
488
+ #
489
+ # interface _ExtensionSpecifier
490
+ # def to_path: () → String
491
+ # end
492
+ #
493
+ # So, for example, if you are using the {sqlean gem}[https://github.com/flavorjones/sqlean-ruby]
494
+ # which provides modules that implement this interface, you can pass the module directly:
495
+ #
496
+ # db = SQLite3::Database.new(":memory:")
497
+ # db.enable_load_extension(true)
498
+ # db.load_extension(SQLean::Crypto)
499
+ #
500
+ # It's also possible in v2.4.0+ to load extensions via the SQLite3::Database constructor by using
501
+ # the +extensions:+ keyword argument to pass an array of String paths or extension specifiers:
502
+ #
503
+ # db = SQLite3::Database.new(":memory:", extensions: ["/path/to/extension", SQLean::Crypto])
504
+ #
505
+ # Note that when loading extensions via the constructor, there is no need to call
506
+ # #enable_load_extension; however it is still necessary to call #enable_load_extensions before any
507
+ # subsequently invocations of #load_extension on the initialized Database object.
508
+ #
509
+ # You can load extensions in a Rails application by using the +extensions:+ configuration option:
510
+ #
511
+ # # config/database.yml
512
+ # development:
513
+ # adapter: sqlite3
514
+ # extensions:
515
+ # - .sqlpkg/nalgeon/crypto/crypto.so # a filesystem path
516
+ # - <%= SQLean::UUID.to_path %> # or ruby code returning a path
517
+ # - SQLean::Crypto # Rails 8.1+ accepts the name of a constant that responds to `to_path`
518
+ #
519
+ # source://sqlite3//lib/sqlite3/database.rb#87
520
+ class SQLite3::Database
521
+ include ::SQLite3::Pragmas
522
+
523
+ # call-seq:
524
+ # SQLite3::Database.new(file, options = {})
525
+ #
526
+ # Create a new Database object that opens the given file.
527
+ #
528
+ # Supported permissions +options+:
529
+ # - the default mode is <tt>READWRITE | CREATE</tt>
530
+ # - +readonly:+ boolean (default false), true to set the mode to +READONLY+
531
+ # - +readwrite:+ boolean (default false), true to set the mode to +READWRITE+
532
+ # - +flags:+ set the mode to a combination of SQLite3::Constants::Open flags.
533
+ #
534
+ # Supported encoding +options+:
535
+ # - +utf16:+ +boolish+ (default false), is the filename's encoding UTF-16 (only needed if the filename encoding is not UTF_16LE or BE)
536
+ #
537
+ # Other supported +options+:
538
+ # - +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)
539
+ # - +results_as_hash:+ +boolish+ (default false), return rows as hashes instead of arrays
540
+ # - +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.
541
+ # - +extensions:+ <tt>Array[String | _ExtensionSpecifier]</tt> SQLite extensions to load into the database. See Database@SQLite+Extensions for more information.
542
+ #
543
+ # @return [Database] a new instance of Database
544
+ #
545
+ # source://sqlite3//lib/sqlite3/database.rb#142
546
+ def initialize(file, options = T.unsafe(nil), zvfs = T.unsafe(nil)); end
547
+
548
+ # Installs (or removes) a block that will be invoked for every access
549
+ # to the database. If the block returns 0 (or +nil+), the statement
550
+ # is allowed to proceed. Returning 1 causes an authorization error to
551
+ # occur, and returning 2 causes the access to be silently denied.
552
+ #
553
+ # source://sqlite3//lib/sqlite3/database.rb#207
554
+ def authorizer(&block); end
555
+
556
+ # source://sqlite3//lib/sqlite3.rb#4
557
+ def authorizer=(_arg0); end
558
+
559
+ # Given a statement, return a result set.
560
+ # This is not intended for general consumption
561
+ #
562
+ # source://sqlite3//lib/sqlite3/database.rb#790
563
+ def build_result_set(stmt); end
564
+
565
+ # source://sqlite3//lib/sqlite3.rb#4
566
+ def busy_handler(*_arg0); end
567
+
568
+ # Sets a #busy_handler that releases the GVL between retries,
569
+ # but only retries up to the indicated number of +milliseconds+.
570
+ # This is an alternative to #busy_timeout, which holds the GVL
571
+ # while SQLite sleeps and retries.
572
+ #
573
+ # source://sqlite3//lib/sqlite3/database.rb#693
574
+ def busy_handler_timeout=(milliseconds); end
575
+
576
+ # source://sqlite3//lib/sqlite3/database.rb#387
577
+ def busy_timeout(_arg0); end
578
+
579
+ # source://sqlite3//lib/sqlite3.rb#4
580
+ def busy_timeout=(_arg0); end
581
+
582
+ # source://sqlite3//lib/sqlite3.rb#4
583
+ def changes; end
584
+
585
+ # source://sqlite3//lib/sqlite3.rb#4
586
+ def close; end
587
+
588
+ # source://sqlite3//lib/sqlite3.rb#4
589
+ def closed?; end
590
+
591
+ # source://sqlite3//lib/sqlite3.rb#4
592
+ def collation(_arg0, _arg1); end
593
+
594
+ # Returns the value of attribute collations.
595
+ #
596
+ # source://sqlite3//lib/sqlite3/database.rb#88
597
+ def collations; end
598
+
599
+ # Commits the current transaction. If there is no current transaction,
600
+ # this will cause an error to be raised. This returns +true+, in order
601
+ # to allow it to be used in idioms like
602
+ # <tt>abort? and rollback or commit</tt>.
603
+ #
604
+ # source://sqlite3//lib/sqlite3/database.rb#669
605
+ def commit; end
606
+
607
+ # source://sqlite3//lib/sqlite3.rb#4
608
+ def complete?(_arg0); end
609
+
610
+ # Creates a new aggregate function for use in SQL statements. Aggregate
611
+ # functions are functions that apply over every row in the result set,
612
+ # instead of over just a single row. (A very common aggregate function
613
+ # is the "count" function, for determining the number of rows that match
614
+ # a query.)
615
+ #
616
+ # The new function will be added as +name+, with the given +arity+. (For
617
+ # variable arity functions, use -1 for the arity.)
618
+ #
619
+ # The +step+ parameter must be a proc object that accepts as its first
620
+ # parameter a FunctionProxy instance (representing the function
621
+ # invocation), with any subsequent parameters (up to the function's arity).
622
+ # The +step+ callback will be invoked once for each row of the result set.
623
+ #
624
+ # The +finalize+ parameter must be a +proc+ object that accepts only a
625
+ # single parameter, the FunctionProxy instance representing the current
626
+ # function invocation. It should invoke FunctionProxy#result= to
627
+ # store the result of the function.
628
+ #
629
+ # Example:
630
+ #
631
+ # db.create_aggregate( "lengths", 1 ) do
632
+ # step do |func, value|
633
+ # func[ :total ] ||= 0
634
+ # func[ :total ] += ( value ? value.length : 0 )
635
+ # end
636
+ #
637
+ # finalize do |func|
638
+ # func.result = func[ :total ] || 0
639
+ # end
640
+ # end
641
+ #
642
+ # puts db.get_first_value( "select lengths(name) from table" )
643
+ #
644
+ # See also #create_aggregate_handler for a more object-oriented approach to
645
+ # aggregate functions.
646
+ #
647
+ # source://sqlite3//lib/sqlite3/database.rb#457
648
+ def create_aggregate(name, arity, step = T.unsafe(nil), finalize = T.unsafe(nil), text_rep = T.unsafe(nil), &block); end
649
+
650
+ # This is another approach to creating an aggregate function (see
651
+ # #create_aggregate). Instead of explicitly specifying the name,
652
+ # callbacks, arity, and type, you specify a factory object
653
+ # (the "handler") that knows how to obtain all of that information. The
654
+ # handler should respond to the following messages:
655
+ #
656
+ # +arity+:: corresponds to the +arity+ parameter of #create_aggregate. This
657
+ # message is optional, and if the handler does not respond to it,
658
+ # the function will have an arity of -1.
659
+ # +name+:: this is the name of the function. The handler _must_ implement
660
+ # this message.
661
+ # +new+:: this must be implemented by the handler. It should return a new
662
+ # instance of the object that will handle a specific invocation of
663
+ # the function.
664
+ #
665
+ # The handler instance (the object returned by the +new+ message, described
666
+ # above), must respond to the following messages:
667
+ #
668
+ # +step+:: this is the method that will be called for each step of the
669
+ # aggregate function's evaluation. It should implement the same
670
+ # signature as the +step+ callback for #create_aggregate.
671
+ # +finalize+:: this is the method that will be called to finalize the
672
+ # aggregate function's evaluation. It should implement the
673
+ # same signature as the +finalize+ callback for
674
+ # #create_aggregate.
675
+ #
676
+ # Example:
677
+ #
678
+ # class LengthsAggregateHandler
679
+ # def self.arity; 1; end
680
+ # def self.name; 'lengths'; end
681
+ #
682
+ # def initialize
683
+ # @total = 0
684
+ # end
685
+ #
686
+ # def step( ctx, name )
687
+ # @total += ( name ? name.length : 0 )
688
+ # end
689
+ #
690
+ # def finalize( ctx )
691
+ # ctx.result = @total
692
+ # end
693
+ # end
694
+ #
695
+ # db.create_aggregate_handler( LengthsAggregateHandler )
696
+ # puts db.get_first_value( "select lengths(name) from A" )
697
+ #
698
+ # source://sqlite3//lib/sqlite3/database.rb#555
699
+ def create_aggregate_handler(handler); end
700
+
701
+ # Creates a new function for use in SQL statements. It will be added as
702
+ # +name+, with the given +arity+. (For variable arity functions, use
703
+ # -1 for the arity.)
704
+ #
705
+ # The block should accept at least one parameter--the FunctionProxy
706
+ # instance that wraps this function invocation--and any other
707
+ # arguments it needs (up to its arity).
708
+ #
709
+ # The block does not return a value directly. Instead, it will invoke
710
+ # the FunctionProxy#result= method on the +func+ parameter and
711
+ # indicate the return value that way.
712
+ #
713
+ # Example:
714
+ #
715
+ # db.create_function( "maim", 1 ) do |func, value|
716
+ # if value.nil?
717
+ # func.result = nil
718
+ # else
719
+ # func.result = value.split(//).sort.join
720
+ # end
721
+ # end
722
+ #
723
+ # puts db.get_first_value( "select maim(name) from table" )
724
+ #
725
+ # source://sqlite3//lib/sqlite3/database.rb#412
726
+ def create_function(name, arity, text_rep = T.unsafe(nil), &block); end
727
+
728
+ # Define an aggregate function named +name+ using a object template
729
+ # object +aggregator+. +aggregator+ must respond to +step+ and +finalize+.
730
+ # +step+ will be called with row information and +finalize+ must return the
731
+ # return value for the aggregator function.
732
+ #
733
+ # _API Change:_ +aggregator+ must also implement +clone+. The provided
734
+ # +aggregator+ object will serve as template that is cloned to provide the
735
+ # individual instances of the aggregate function. Regular ruby objects
736
+ # already provide a suitable +clone+.
737
+ # The functions arity is the arity of the +step+ method.
738
+ #
739
+ # source://sqlite3//lib/sqlite3/database.rb#592
740
+ def define_aggregator(name, aggregator); end
741
+
742
+ # source://sqlite3//lib/sqlite3.rb#4
743
+ def define_function(_arg0); end
744
+
745
+ # source://sqlite3//lib/sqlite3.rb#4
746
+ def define_function_with_flags(_arg0, _arg1); end
747
+
748
+ # source://sqlite3//lib/sqlite3.rb#4
749
+ def enable_load_extension(_arg0); end
750
+
751
+ # call-seq: db.encoding
752
+ #
753
+ # Fetch the encoding set on this database
754
+ #
755
+ # source://sqlite3//lib/sqlite3/database.rb#199
756
+ def encoding; end
757
+
758
+ # source://sqlite3//lib/sqlite3.rb#4
759
+ def errcode; end
760
+
761
+ # source://sqlite3//lib/sqlite3.rb#4
762
+ def errmsg; end
763
+
764
+ # Executes the given SQL statement. If additional parameters are given,
765
+ # they are treated as bind variables, and are bound to the placeholders in
766
+ # the query.
767
+ #
768
+ # Note that if any of the values passed to this are hashes, then the
769
+ # key/value pairs are each bound separately, with the key being used as
770
+ # the name of the placeholder to bind the value to.
771
+ #
772
+ # The block is optional. If given, it will be invoked for each row returned
773
+ # by the query. Otherwise, any results are accumulated into an array and
774
+ # returned wholesale.
775
+ #
776
+ # See also #execute2, #query, and #execute_batch for additional ways of
777
+ # executing statements.
778
+ #
779
+ # source://sqlite3//lib/sqlite3/database.rb#248
780
+ def execute(sql, bind_vars = T.unsafe(nil), &block); end
781
+
782
+ # Executes the given SQL statement, exactly as with #execute. However, the
783
+ # first row returned (either via the block, or in the returned array) is
784
+ # always the names of the columns. Subsequent rows correspond to the data
785
+ # from the result set.
786
+ #
787
+ # Thus, even if the query itself returns no rows, this method will always
788
+ # return at least one row--the names of the columns.
789
+ #
790
+ # See also #execute, #query, and #execute_batch for additional ways of
791
+ # executing statements.
792
+ #
793
+ # source://sqlite3//lib/sqlite3/database.rb#273
794
+ def execute2(sql, *bind_vars); end
795
+
796
+ # Executes all SQL statements in the given string. By contrast, the other
797
+ # means of executing queries will only execute the first statement in the
798
+ # string, ignoring all subsequent statements. This will execute each one
799
+ # in turn. The same bind parameters, if given, will be applied to each
800
+ # statement.
801
+ #
802
+ # This always returns the result of the last statement.
803
+ #
804
+ # See also #execute_batch2 for additional ways of
805
+ # executing statements.
806
+ #
807
+ # source://sqlite3//lib/sqlite3/database.rb#297
808
+ def execute_batch(sql, bind_vars = T.unsafe(nil)); end
809
+
810
+ # Executes all SQL statements in the given string. By contrast, the other
811
+ # means of executing queries will only execute the first statement in the
812
+ # string, ignoring all subsequent statements. This will execute each one
813
+ # in turn. Bind parameters cannot be passed to #execute_batch2.
814
+ #
815
+ # If a query is made, all values will be returned as strings.
816
+ # If no query is made, an empty array will be returned.
817
+ #
818
+ # Because all values except for 'NULL' are returned as strings,
819
+ # a block can be passed to parse the values accordingly.
820
+ #
821
+ # See also #execute_batch for additional ways of
822
+ # executing statements.
823
+ #
824
+ # source://sqlite3//lib/sqlite3/database.rb#330
825
+ def execute_batch2(sql, &block); end
826
+
827
+ # source://sqlite3//lib/sqlite3.rb#4
828
+ def extended_result_codes=(_arg0); end
829
+
830
+ # Returns the filename for the database named +db_name+. +db_name+ defaults
831
+ # to "main". Main return `nil` or an empty string if the database is
832
+ # temporary or in-memory.
833
+ #
834
+ # source://sqlite3//lib/sqlite3/database.rb#230
835
+ def filename(db_name = T.unsafe(nil)); end
836
+
837
+ # A convenience method for obtaining the first row of a result set, and
838
+ # discarding all others. It is otherwise identical to #execute.
839
+ #
840
+ # See also #get_first_value.
841
+ #
842
+ # source://sqlite3//lib/sqlite3/database.rb#369
843
+ def get_first_row(sql, *bind_vars); end
844
+
845
+ # A convenience method for obtaining the first value of the first row of a
846
+ # result set, and discarding all other values and rows. It is otherwise
847
+ # identical to #execute.
848
+ #
849
+ # See also #get_first_row.
850
+ #
851
+ # source://sqlite3//lib/sqlite3/database.rb#378
852
+ def get_first_value(sql, *bind_vars); end
853
+
854
+ # @raise [TypeError]
855
+ #
856
+ # source://sqlite3//lib/sqlite3/database.rb#738
857
+ def initialize_extensions(extensions); end
858
+
859
+ # source://sqlite3//lib/sqlite3.rb#4
860
+ def interrupt; end
861
+
862
+ # source://sqlite3//lib/sqlite3.rb#4
863
+ def last_insert_row_id; end
864
+
865
+ # call-seq:
866
+ # load_extension(extension_specifier) -> self
867
+ #
868
+ # Loads an SQLite extension library from the named file. Extension loading must be enabled using
869
+ # #enable_load_extension prior to using this method.
870
+ #
871
+ # See also: Database@SQLite+Extensions
872
+ #
873
+ # [Parameters]
874
+ # - +extension_specifier+: (String | +_ExtensionSpecifier+) If a String, it is the filesystem path
875
+ # to the sqlite extension file. If an object that responds to #to_path, the
876
+ # return value of that method is used as the filesystem path to the sqlite extension file.
877
+ #
878
+ # [Example] Using a filesystem path:
879
+ #
880
+ # db.load_extension("/path/to/my_extension.so")
881
+ #
882
+ # [Example] Using the {sqlean gem}[https://github.com/flavorjones/sqlean-ruby]:
883
+ #
884
+ # db.load_extension(SQLean::VSV)
885
+ #
886
+ # source://sqlite3//lib/sqlite3/database.rb#729
887
+ def load_extension(extension_specifier); end
888
+
889
+ # Returns a Statement object representing the given SQL. This does not
890
+ # execute the statement; it merely prepares the statement for execution.
891
+ #
892
+ # The Statement can then be executed using Statement#execute.
893
+ #
894
+ # source://sqlite3//lib/sqlite3/database.rb#216
895
+ def prepare(sql); end
896
+
897
+ # This is a convenience method for creating a statement, binding
898
+ # parameters to it, and calling execute:
899
+ #
900
+ # result = db.query( "select * from foo where a=?", [5])
901
+ # # is the same as
902
+ # result = db.prepare( "select * from foo where a=?" ).execute( 5 )
903
+ #
904
+ # You must be sure to call +close+ on the ResultSet instance that is
905
+ # returned, or you could have problems with locks on the table. If called
906
+ # with a block, +close+ will be invoked implicitly when the block
907
+ # terminates.
908
+ #
909
+ # source://sqlite3//lib/sqlite3/database.rb#352
910
+ def query(sql, bind_vars = T.unsafe(nil)); end
911
+
912
+ # Returns +true+ if the database has been open in readonly mode
913
+ # A helper to check before performing any operation
914
+ #
915
+ # @return [Boolean]
916
+ #
917
+ # source://sqlite3//lib/sqlite3/database.rb#685
918
+ def readonly?; end
919
+
920
+ # A boolean that indicates whether rows in result sets should be returned
921
+ # as hashes or not. By default, rows are returned as arrays.
922
+ #
923
+ # source://sqlite3//lib/sqlite3/database.rb#120
924
+ def results_as_hash; end
925
+
926
+ # A boolean that indicates whether rows in result sets should be returned
927
+ # as hashes or not. By default, rows are returned as arrays.
928
+ #
929
+ # source://sqlite3//lib/sqlite3/database.rb#120
930
+ def results_as_hash=(_arg0); end
931
+
932
+ # Rolls the current transaction back. If there is no current transaction,
933
+ # this will cause an error to be raised. This returns +true+, in order
934
+ # to allow it to be used in idioms like
935
+ # <tt>abort? and rollback or commit</tt>.
936
+ #
937
+ # source://sqlite3//lib/sqlite3/database.rb#678
938
+ def rollback; end
939
+
940
+ # source://sqlite3//lib/sqlite3.rb#4
941
+ def statement_timeout=(_arg0); end
942
+
943
+ # source://sqlite3//lib/sqlite3.rb#4
944
+ def total_changes; end
945
+
946
+ # source://sqlite3//lib/sqlite3.rb#4
947
+ def trace(*_arg0); end
948
+
949
+ # Begins a new transaction. Note that nested transactions are not allowed
950
+ # by SQLite, so attempting to nest a transaction will result in a runtime
951
+ # exception.
952
+ #
953
+ # The +mode+ parameter may be either <tt>:deferred</tt>,
954
+ # <tt>:immediate</tt>, or <tt>:exclusive</tt>.
955
+ # If `nil` is specified, the default transaction mode, which was
956
+ # passed to #initialize, is used.
957
+ #
958
+ # If a block is given, the database instance is yielded to it, and the
959
+ # transaction is committed when the block terminates. If the block
960
+ # raises an exception, a rollback will be performed instead. Note that if
961
+ # a block is given, #commit and #rollback should never be called
962
+ # explicitly or you'll get an error when the block terminates.
963
+ #
964
+ # If a block is not given, it is the caller's responsibility to end the
965
+ # transaction explicitly, either by calling #commit, or by calling
966
+ # #rollback.
967
+ #
968
+ # source://sqlite3//lib/sqlite3/database.rb#646
969
+ def transaction(mode = T.unsafe(nil)); end
970
+
971
+ # source://sqlite3//lib/sqlite3.rb#4
972
+ def transaction_active?; end
973
+
974
+ private
975
+
976
+ # source://sqlite3//lib/sqlite3.rb#4
977
+ def db_filename(_arg0); end
978
+
979
+ # source://sqlite3//lib/sqlite3.rb#4
980
+ def define_aggregator2(_arg0, _arg1); end
981
+
982
+ # source://sqlite3//lib/sqlite3.rb#4
983
+ def disable_quirk_mode; end
984
+
985
+ # source://sqlite3//lib/sqlite3.rb#4
986
+ def discard; end
987
+
988
+ # source://sqlite3//lib/sqlite3.rb#4
989
+ def exec_batch(_arg0, _arg1); end
990
+
991
+ # source://sqlite3//lib/sqlite3.rb#4
992
+ def load_extension_internal(_arg0); end
993
+
994
+ # source://sqlite3//lib/sqlite3.rb#4
995
+ def open16(_arg0); end
996
+
997
+ # source://sqlite3//lib/sqlite3.rb#4
998
+ def open_v2(_arg0, _arg1, _arg2); end
999
+
1000
+ class << self
1001
+ # Without block works exactly as new.
1002
+ # With block, like new closes the database at the end, but unlike new
1003
+ # returns the result of the block instead of the database instance.
1004
+ #
1005
+ # source://sqlite3//lib/sqlite3/database.rb#96
1006
+ def open(*args); end
1007
+
1008
+ # Quotes the given string, making it safe to use in an SQL statement.
1009
+ # It replaces all instances of the single-quote character with two
1010
+ # single-quote characters. The modified string is returned.
1011
+ #
1012
+ # source://sqlite3//lib/sqlite3/database.rb#113
1013
+ def quote(string); end
1014
+ end
1015
+ end
1016
+
1017
+ # A helper class for dealing with custom functions (see #create_function,
1018
+ # #create_aggregate, and #create_aggregate_handler). It encapsulates the
1019
+ # opaque function object that represents the current invocation. It also
1020
+ # provides more convenient access to the API functions that operate on
1021
+ # the function object.
1022
+ #
1023
+ # This class will almost _always_ be instantiated indirectly, by working
1024
+ # with the create methods mentioned above.
1025
+ #
1026
+ # source://sqlite3//lib/sqlite3/database.rb#762
1027
+ class SQLite3::Database::FunctionProxy
1028
+ # Create a new FunctionProxy that encapsulates the given +func+ object.
1029
+ # If context is non-nil, the functions context will be set to that. If
1030
+ # it is non-nil, it must quack like a Hash. If it is nil, then none of
1031
+ # the context functions will be available.
1032
+ #
1033
+ # @return [FunctionProxy] a new instance of FunctionProxy
1034
+ #
1035
+ # source://sqlite3//lib/sqlite3/database.rb#769
1036
+ def initialize; end
1037
+
1038
+ # Returns the value with the given key from the context. This is only
1039
+ # available to aggregate functions.
1040
+ #
1041
+ # source://sqlite3//lib/sqlite3/database.rb#776
1042
+ def [](key); end
1043
+
1044
+ # Sets the value with the given key in the context. This is only
1045
+ # available to aggregate functions.
1046
+ #
1047
+ # source://sqlite3//lib/sqlite3/database.rb#782
1048
+ def []=(key, value); end
1049
+
1050
+ # Returns the value of attribute result.
1051
+ #
1052
+ # source://sqlite3//lib/sqlite3/database.rb#763
1053
+ def result; end
1054
+
1055
+ # Sets the attribute result
1056
+ #
1057
+ # @param value the value to set the attribute result to.
1058
+ #
1059
+ # source://sqlite3//lib/sqlite3/database.rb#763
1060
+ def result=(_arg0); end
1061
+ end
1062
+
1063
+ # source://sqlite3//lib/sqlite3/errors.rb#67
1064
+ class SQLite3::EmptyException < ::SQLite3::Exception; end
1065
+
1066
+ # source://sqlite3//lib/sqlite3/errors.rb#4
1067
+ class SQLite3::Exception < ::StandardError
1068
+ # A convenience for accessing the error code for this exception.
1069
+ #
1070
+ # source://sqlite3//lib/sqlite3/errors.rb#6
1071
+ def code; end
1072
+
1073
+ # source://sqlite3//lib/sqlite3/errors.rb#15
1074
+ def message; end
1075
+
1076
+ # If the error is associated with a SQL query, this is the query
1077
+ #
1078
+ # source://sqlite3//lib/sqlite3/errors.rb#9
1079
+ def sql; end
1080
+
1081
+ # If the error is associated with a particular offset in a SQL query, this is the non-negative
1082
+ # offset. If the offset is not available, this will be -1.
1083
+ #
1084
+ # source://sqlite3//lib/sqlite3/errors.rb#13
1085
+ def sql_offset; end
1086
+
1087
+ private
1088
+
1089
+ # source://sqlite3//lib/sqlite3/errors.rb#19
1090
+ def sql_error; end
1091
+ end
1092
+
1093
+ # based on Rails's active_support/fork_tracker.rb
1094
+ #
1095
+ # source://sqlite3//lib/sqlite3/fork_safety.rb#7
1096
+ module SQLite3::ForkSafety
1097
+ class << self
1098
+ # source://sqlite3//lib/sqlite3/fork_safety.rb#33
1099
+ def discard; end
1100
+
1101
+ # source://sqlite3//lib/sqlite3/fork_safety.rb#23
1102
+ def hook!; end
1103
+
1104
+ # Call to suppress the fork-related warnings.
1105
+ #
1106
+ # source://sqlite3//lib/sqlite3/fork_safety.rb#59
1107
+ def suppress_warnings!; end
1108
+
1109
+ # source://sqlite3//lib/sqlite3/fork_safety.rb#27
1110
+ def track(database); end
1111
+ end
1112
+ end
1113
+
1114
+ # source://sqlite3//lib/sqlite3/fork_safety.rb#8
1115
+ module SQLite3::ForkSafety::CoreExt
1116
+ # source://sqlite3//lib/sqlite3/fork_safety.rb#9
1117
+ def _fork; end
1118
+ end
1119
+
1120
+ # source://sqlite3//lib/sqlite3/errors.rb#83
1121
+ class SQLite3::FormatException < ::SQLite3::Exception; end
1122
+
1123
+ # source://sqlite3//lib/sqlite3/errors.rb#61
1124
+ class SQLite3::FullException < ::SQLite3::Exception; end
1125
+
1126
+ # source://sqlite3//lib/sqlite3/resultset.rb#93
1127
+ class SQLite3::HashResultSet < ::SQLite3::ResultSet
1128
+ # source://sqlite3//lib/sqlite3/resultset.rb#94
1129
+ def next; end
1130
+ end
1131
+
1132
+ # source://sqlite3//lib/sqlite3/errors.rb#55
1133
+ class SQLite3::IOException < ::SQLite3::Exception; end
1134
+
1135
+ # source://sqlite3//lib/sqlite3/errors.rb#39
1136
+ class SQLite3::InternalException < ::SQLite3::Exception; end
1137
+
1138
+ # source://sqlite3//lib/sqlite3/errors.rb#53
1139
+ class SQLite3::InterruptException < ::SQLite3::Exception; end
1140
+
1141
+ # source://sqlite3//lib/sqlite3/errors.rb#47
1142
+ class SQLite3::LockedException < ::SQLite3::Exception; end
1143
+
1144
+ # source://sqlite3//lib/sqlite3/errors.rb#49
1145
+ class SQLite3::MemoryException < ::SQLite3::Exception; end
1146
+
1147
+ # source://sqlite3//lib/sqlite3/errors.rb#75
1148
+ class SQLite3::MismatchException < ::SQLite3::Exception; end
1149
+
1150
+ # source://sqlite3//lib/sqlite3/errors.rb#77
1151
+ class SQLite3::MisuseException < ::SQLite3::Exception; end
1152
+
1153
+ # source://sqlite3//lib/sqlite3/errors.rb#87
1154
+ class SQLite3::NotADatabaseException < ::SQLite3::Exception; end
1155
+
1156
+ # source://sqlite3//lib/sqlite3/errors.rb#59
1157
+ class SQLite3::NotFoundException < ::SQLite3::Exception; end
1158
+
1159
+ # source://sqlite3//lib/sqlite3/errors.rb#41
1160
+ class SQLite3::PermissionException < ::SQLite3::Exception; end
1161
+
1162
+ # This module is intended for inclusion solely by the Database class. It
1163
+ # defines convenience methods for the various pragmas supported by SQLite3.
1164
+ #
1165
+ # For a detailed description of these pragmas, see the SQLite3 documentation
1166
+ # at http://sqlite.org/pragma.html.
1167
+ #
1168
+ # source://sqlite3//lib/sqlite3/pragmas.rb#11
1169
+ module SQLite3::Pragmas
1170
+ # source://sqlite3//lib/sqlite3/pragmas.rb#143
1171
+ def application_id; end
1172
+
1173
+ # source://sqlite3//lib/sqlite3/pragmas.rb#147
1174
+ def application_id=(integer); end
1175
+
1176
+ # source://sqlite3//lib/sqlite3/pragmas.rb#151
1177
+ def auto_vacuum; end
1178
+
1179
+ # source://sqlite3//lib/sqlite3/pragmas.rb#155
1180
+ def auto_vacuum=(mode); end
1181
+
1182
+ # source://sqlite3//lib/sqlite3/pragmas.rb#159
1183
+ def automatic_index; end
1184
+
1185
+ # source://sqlite3//lib/sqlite3/pragmas.rb#163
1186
+ def automatic_index=(mode); end
1187
+
1188
+ # source://sqlite3//lib/sqlite3/pragmas.rb#167
1189
+ def busy_timeout; end
1190
+
1191
+ # source://sqlite3//lib/sqlite3/pragmas.rb#171
1192
+ def busy_timeout=(milliseconds); end
1193
+
1194
+ # source://sqlite3//lib/sqlite3/pragmas.rb#175
1195
+ def cache_size; end
1196
+
1197
+ # source://sqlite3//lib/sqlite3/pragmas.rb#179
1198
+ def cache_size=(size); end
1199
+
1200
+ # source://sqlite3//lib/sqlite3/pragmas.rb#183
1201
+ def cache_spill; end
1202
+
1203
+ # source://sqlite3//lib/sqlite3/pragmas.rb#187
1204
+ def cache_spill=(mode); end
1205
+
1206
+ # source://sqlite3//lib/sqlite3/pragmas.rb#191
1207
+ def case_sensitive_like=(mode); end
1208
+
1209
+ # source://sqlite3//lib/sqlite3/pragmas.rb#195
1210
+ def cell_size_check; end
1211
+
1212
+ # source://sqlite3//lib/sqlite3/pragmas.rb#199
1213
+ def cell_size_check=(mode); end
1214
+
1215
+ # source://sqlite3//lib/sqlite3/pragmas.rb#203
1216
+ def checkpoint_fullfsync; end
1217
+
1218
+ # source://sqlite3//lib/sqlite3/pragmas.rb#207
1219
+ def checkpoint_fullfsync=(mode); end
1220
+
1221
+ # :yields: row
1222
+ #
1223
+ # source://sqlite3//lib/sqlite3/pragmas.rb#211
1224
+ def collation_list(&block); end
1225
+
1226
+ # :yields: row
1227
+ #
1228
+ # source://sqlite3//lib/sqlite3/pragmas.rb#215
1229
+ def compile_options(&block); end
1230
+
1231
+ # source://sqlite3//lib/sqlite3/pragmas.rb#219
1232
+ def count_changes; end
1233
+
1234
+ # source://sqlite3//lib/sqlite3/pragmas.rb#223
1235
+ def count_changes=(mode); end
1236
+
1237
+ # source://sqlite3//lib/sqlite3/pragmas.rb#227
1238
+ def data_version; end
1239
+
1240
+ # :yields: row
1241
+ #
1242
+ # source://sqlite3//lib/sqlite3/pragmas.rb#231
1243
+ def database_list(&block); end
1244
+
1245
+ # source://sqlite3//lib/sqlite3/pragmas.rb#235
1246
+ def default_cache_size; end
1247
+
1248
+ # source://sqlite3//lib/sqlite3/pragmas.rb#239
1249
+ def default_cache_size=(size); end
1250
+
1251
+ # source://sqlite3//lib/sqlite3/pragmas.rb#243
1252
+ def default_synchronous; end
1253
+
1254
+ # source://sqlite3//lib/sqlite3/pragmas.rb#247
1255
+ def default_synchronous=(mode); end
1256
+
1257
+ # source://sqlite3//lib/sqlite3/pragmas.rb#251
1258
+ def default_temp_store; end
1259
+
1260
+ # source://sqlite3//lib/sqlite3/pragmas.rb#255
1261
+ def default_temp_store=(mode); end
1262
+
1263
+ # source://sqlite3//lib/sqlite3/pragmas.rb#259
1264
+ def defer_foreign_keys; end
1265
+
1266
+ # source://sqlite3//lib/sqlite3/pragmas.rb#263
1267
+ def defer_foreign_keys=(mode); end
1268
+
1269
+ # source://sqlite3//lib/sqlite3/pragmas.rb#267
1270
+ def encoding; end
1271
+
1272
+ # source://sqlite3//lib/sqlite3/pragmas.rb#271
1273
+ def encoding=(mode); end
1274
+
1275
+ # :yields: row
1276
+ #
1277
+ # source://sqlite3//lib/sqlite3/pragmas.rb#275
1278
+ def foreign_key_check(*table, &block); end
1279
+
1280
+ # :yields: row
1281
+ #
1282
+ # source://sqlite3//lib/sqlite3/pragmas.rb#279
1283
+ def foreign_key_list(table, &block); end
1284
+
1285
+ # source://sqlite3//lib/sqlite3/pragmas.rb#283
1286
+ def foreign_keys; end
1287
+
1288
+ # source://sqlite3//lib/sqlite3/pragmas.rb#287
1289
+ def foreign_keys=(mode); end
1290
+
1291
+ # source://sqlite3//lib/sqlite3/pragmas.rb#291
1292
+ def freelist_count; end
1293
+
1294
+ # source://sqlite3//lib/sqlite3/pragmas.rb#295
1295
+ def full_column_names; end
1296
+
1297
+ # source://sqlite3//lib/sqlite3/pragmas.rb#299
1298
+ def full_column_names=(mode); end
1299
+
1300
+ # source://sqlite3//lib/sqlite3/pragmas.rb#303
1301
+ def fullfsync; end
1302
+
1303
+ # source://sqlite3//lib/sqlite3/pragmas.rb#307
1304
+ def fullfsync=(mode); end
1305
+
1306
+ # Returns +true+ or +false+ depending on the value of the named pragma.
1307
+ #
1308
+ # source://sqlite3//lib/sqlite3/pragmas.rb#13
1309
+ def get_boolean_pragma(name); end
1310
+
1311
+ # Return the value of the given pragma.
1312
+ #
1313
+ # source://sqlite3//lib/sqlite3/pragmas.rb#53
1314
+ def get_enum_pragma(name); end
1315
+
1316
+ # Returns the value of the given pragma as an integer.
1317
+ #
1318
+ # source://sqlite3//lib/sqlite3/pragmas.rb#80
1319
+ def get_int_pragma(name); end
1320
+
1321
+ # Requests the given pragma (and parameters), and if the block is given,
1322
+ # each row of the result set will be yielded to it. Otherwise, the results
1323
+ # are returned as an array.
1324
+ #
1325
+ # source://sqlite3//lib/sqlite3/pragmas.rb#43
1326
+ def get_query_pragma(name, *params, &block); end
1327
+
1328
+ # source://sqlite3//lib/sqlite3/pragmas.rb#311
1329
+ def ignore_check_constraints=(mode); end
1330
+
1331
+ # :yields: row
1332
+ #
1333
+ # source://sqlite3//lib/sqlite3/pragmas.rb#315
1334
+ def incremental_vacuum(pages, &block); end
1335
+
1336
+ # :yields: row
1337
+ #
1338
+ # source://sqlite3//lib/sqlite3/pragmas.rb#319
1339
+ def index_info(index, &block); end
1340
+
1341
+ # :yields: row
1342
+ #
1343
+ # source://sqlite3//lib/sqlite3/pragmas.rb#323
1344
+ def index_list(table, &block); end
1345
+
1346
+ # :yields: row
1347
+ #
1348
+ # source://sqlite3//lib/sqlite3/pragmas.rb#327
1349
+ def index_xinfo(index, &block); end
1350
+
1351
+ # :yields: row
1352
+ #
1353
+ # source://sqlite3//lib/sqlite3/pragmas.rb#331
1354
+ def integrity_check(*num_errors, &block); end
1355
+
1356
+ # source://sqlite3//lib/sqlite3/pragmas.rb#335
1357
+ def journal_mode; end
1358
+
1359
+ # source://sqlite3//lib/sqlite3/pragmas.rb#339
1360
+ def journal_mode=(mode); end
1361
+
1362
+ # source://sqlite3//lib/sqlite3/pragmas.rb#343
1363
+ def journal_size_limit; end
1364
+
1365
+ # source://sqlite3//lib/sqlite3/pragmas.rb#347
1366
+ def journal_size_limit=(size); end
1367
+
1368
+ # source://sqlite3//lib/sqlite3/pragmas.rb#351
1369
+ def legacy_file_format; end
1370
+
1371
+ # source://sqlite3//lib/sqlite3/pragmas.rb#355
1372
+ def legacy_file_format=(mode); end
1373
+
1374
+ # source://sqlite3//lib/sqlite3/pragmas.rb#359
1375
+ def locking_mode; end
1376
+
1377
+ # source://sqlite3//lib/sqlite3/pragmas.rb#363
1378
+ def locking_mode=(mode); end
1379
+
1380
+ # source://sqlite3//lib/sqlite3/pragmas.rb#367
1381
+ def max_page_count; end
1382
+
1383
+ # source://sqlite3//lib/sqlite3/pragmas.rb#371
1384
+ def max_page_count=(size); end
1385
+
1386
+ # source://sqlite3//lib/sqlite3/pragmas.rb#375
1387
+ def mmap_size; end
1388
+
1389
+ # source://sqlite3//lib/sqlite3/pragmas.rb#379
1390
+ def mmap_size=(size); end
1391
+
1392
+ # Attempt to optimize the database.
1393
+ #
1394
+ # To customize the optimization options, pass +bitmask+ with a combination
1395
+ # of the Constants::Optimize masks.
1396
+ #
1397
+ # See https://www.sqlite.org/pragma.html#pragma_optimize for more information.
1398
+ #
1399
+ # source://sqlite3//lib/sqlite3/pragmas.rb#389
1400
+ def optimize(bitmask = T.unsafe(nil)); end
1401
+
1402
+ # source://sqlite3//lib/sqlite3/pragmas.rb#397
1403
+ def page_count; end
1404
+
1405
+ # source://sqlite3//lib/sqlite3/pragmas.rb#401
1406
+ def page_size; end
1407
+
1408
+ # source://sqlite3//lib/sqlite3/pragmas.rb#405
1409
+ def page_size=(size); end
1410
+
1411
+ # source://sqlite3//lib/sqlite3/pragmas.rb#409
1412
+ def parser_trace=(mode); end
1413
+
1414
+ # source://sqlite3//lib/sqlite3/pragmas.rb#413
1415
+ def query_only; end
1416
+
1417
+ # source://sqlite3//lib/sqlite3/pragmas.rb#417
1418
+ def query_only=(mode); end
1419
+
1420
+ # :yields: row
1421
+ #
1422
+ # source://sqlite3//lib/sqlite3/pragmas.rb#421
1423
+ def quick_check(*num_errors, &block); end
1424
+
1425
+ # source://sqlite3//lib/sqlite3/pragmas.rb#425
1426
+ def read_uncommitted; end
1427
+
1428
+ # source://sqlite3//lib/sqlite3/pragmas.rb#429
1429
+ def read_uncommitted=(mode); end
1430
+
1431
+ # source://sqlite3//lib/sqlite3/pragmas.rb#433
1432
+ def recursive_triggers; end
1433
+
1434
+ # source://sqlite3//lib/sqlite3/pragmas.rb#437
1435
+ def recursive_triggers=(mode); end
1436
+
1437
+ # source://sqlite3//lib/sqlite3/pragmas.rb#441
1438
+ def reverse_unordered_selects; end
1439
+
1440
+ # source://sqlite3//lib/sqlite3/pragmas.rb#445
1441
+ def reverse_unordered_selects=(mode); end
1442
+
1443
+ # source://sqlite3//lib/sqlite3/pragmas.rb#449
1444
+ def schema_cookie; end
1445
+
1446
+ # source://sqlite3//lib/sqlite3/pragmas.rb#453
1447
+ def schema_cookie=(cookie); end
1448
+
1449
+ # source://sqlite3//lib/sqlite3/pragmas.rb#457
1450
+ def schema_version; end
1451
+
1452
+ # source://sqlite3//lib/sqlite3/pragmas.rb#461
1453
+ def schema_version=(version); end
1454
+
1455
+ # source://sqlite3//lib/sqlite3/pragmas.rb#465
1456
+ def secure_delete; end
1457
+
1458
+ # source://sqlite3//lib/sqlite3/pragmas.rb#469
1459
+ def secure_delete=(mode); end
1460
+
1461
+ # Sets the given pragma to the given boolean value. The value itself
1462
+ # may be +true+ or +false+, or any other commonly used string or
1463
+ # integer that represents truth.
1464
+ #
1465
+ # source://sqlite3//lib/sqlite3/pragmas.rb#20
1466
+ def set_boolean_pragma(name, mode); end
1467
+
1468
+ # Set the value of the given pragma to +mode+. The +mode+ parameter must
1469
+ # conform to one of the values in the given +enum+ array. Each entry in
1470
+ # the array is another array comprised of elements in the enumeration that
1471
+ # have duplicate values. See #synchronous, #default_synchronous,
1472
+ # #temp_store, and #default_temp_store for usage examples.
1473
+ #
1474
+ # source://sqlite3//lib/sqlite3/pragmas.rb#62
1475
+ def set_enum_pragma(name, mode, enums); end
1476
+
1477
+ # Set the value of the given pragma to the integer value of the +value+
1478
+ # parameter.
1479
+ #
1480
+ # source://sqlite3//lib/sqlite3/pragmas.rb#86
1481
+ def set_int_pragma(name, value); end
1482
+
1483
+ # source://sqlite3//lib/sqlite3/pragmas.rb#473
1484
+ def short_column_names; end
1485
+
1486
+ # source://sqlite3//lib/sqlite3/pragmas.rb#477
1487
+ def short_column_names=(mode); end
1488
+
1489
+ # source://sqlite3//lib/sqlite3/pragmas.rb#481
1490
+ def shrink_memory; end
1491
+
1492
+ # source://sqlite3//lib/sqlite3/pragmas.rb#485
1493
+ def soft_heap_limit; end
1494
+
1495
+ # source://sqlite3//lib/sqlite3/pragmas.rb#489
1496
+ def soft_heap_limit=(mode); end
1497
+
1498
+ # :yields: row
1499
+ #
1500
+ # source://sqlite3//lib/sqlite3/pragmas.rb#493
1501
+ def stats(&block); end
1502
+
1503
+ # source://sqlite3//lib/sqlite3/pragmas.rb#497
1504
+ def synchronous; end
1505
+
1506
+ # source://sqlite3//lib/sqlite3/pragmas.rb#501
1507
+ def synchronous=(mode); end
1508
+
1509
+ # Returns information about +table+. Yields each row of table information
1510
+ # if a block is provided.
1511
+ #
1512
+ # source://sqlite3//lib/sqlite3/pragmas.rb#580
1513
+ def table_info(table); end
1514
+
1515
+ # source://sqlite3//lib/sqlite3/pragmas.rb#505
1516
+ def temp_store; end
1517
+
1518
+ # source://sqlite3//lib/sqlite3/pragmas.rb#509
1519
+ def temp_store=(mode); end
1520
+
1521
+ # source://sqlite3//lib/sqlite3/pragmas.rb#513
1522
+ def threads; end
1523
+
1524
+ # source://sqlite3//lib/sqlite3/pragmas.rb#517
1525
+ def threads=(count); end
1526
+
1527
+ # source://sqlite3//lib/sqlite3/pragmas.rb#521
1528
+ def user_cookie; end
1529
+
1530
+ # source://sqlite3//lib/sqlite3/pragmas.rb#525
1531
+ def user_cookie=(cookie); end
1532
+
1533
+ # source://sqlite3//lib/sqlite3/pragmas.rb#529
1534
+ def user_version; end
1535
+
1536
+ # source://sqlite3//lib/sqlite3/pragmas.rb#533
1537
+ def user_version=(version); end
1538
+
1539
+ # source://sqlite3//lib/sqlite3/pragmas.rb#537
1540
+ def vdbe_addoptrace=(mode); end
1541
+
1542
+ # source://sqlite3//lib/sqlite3/pragmas.rb#541
1543
+ def vdbe_debug=(mode); end
1544
+
1545
+ # source://sqlite3//lib/sqlite3/pragmas.rb#545
1546
+ def vdbe_listing=(mode); end
1547
+
1548
+ # source://sqlite3//lib/sqlite3/pragmas.rb#549
1549
+ def vdbe_trace; end
1550
+
1551
+ # source://sqlite3//lib/sqlite3/pragmas.rb#553
1552
+ def vdbe_trace=(mode); end
1553
+
1554
+ # source://sqlite3//lib/sqlite3/pragmas.rb#557
1555
+ def wal_autocheckpoint; end
1556
+
1557
+ # source://sqlite3//lib/sqlite3/pragmas.rb#561
1558
+ def wal_autocheckpoint=(mode); end
1559
+
1560
+ # source://sqlite3//lib/sqlite3/pragmas.rb#565
1561
+ def wal_checkpoint; end
1562
+
1563
+ # source://sqlite3//lib/sqlite3/pragmas.rb#569
1564
+ def wal_checkpoint=(mode); end
1565
+
1566
+ # source://sqlite3//lib/sqlite3/pragmas.rb#573
1567
+ def writable_schema=(mode); end
1568
+
1569
+ private
1570
+
1571
+ # source://sqlite3//lib/sqlite3/pragmas.rb#613
1572
+ def set_string_pragma(pragma_name, value, valid_values); end
1573
+
1574
+ # Since SQLite 3.3.8, the table_info pragma has returned the default
1575
+ # value of the row as a quoted SQL value. This method essentially
1576
+ # unquotes those values.
1577
+ #
1578
+ # source://sqlite3//lib/sqlite3/pragmas.rb#637
1579
+ def tweak_default(hash); end
1580
+
1581
+ # Compares two version strings
1582
+ #
1583
+ # source://sqlite3//lib/sqlite3/pragmas.rb#621
1584
+ def version_compare(v1, v2); end
1585
+ end
1586
+
1587
+ # The enumeration of valid auto vacuum modes.
1588
+ #
1589
+ # source://sqlite3//lib/sqlite3/pragmas.rb#105
1590
+ SQLite3::Pragmas::AUTO_VACUUM_MODES = T.let(T.unsafe(nil), Hash)
1591
+
1592
+ # The list of valid encodings.
1593
+ #
1594
+ # source://sqlite3//lib/sqlite3/pragmas.rb#128
1595
+ SQLite3::Pragmas::ENCODINGS = T.let(T.unsafe(nil), Hash)
1596
+
1597
+ # The list of valid journaling modes.
1598
+ #
1599
+ # source://sqlite3//lib/sqlite3/pragmas.rb#112
1600
+ SQLite3::Pragmas::JOURNAL_MODES = T.let(T.unsafe(nil), Hash)
1601
+
1602
+ # The list of valid locking modes.
1603
+ #
1604
+ # source://sqlite3//lib/sqlite3/pragmas.rb#122
1605
+ SQLite3::Pragmas::LOCKING_MODES = T.let(T.unsafe(nil), Hash)
1606
+
1607
+ # The enumeration of valid synchronous modes.
1608
+ #
1609
+ # source://sqlite3//lib/sqlite3/pragmas.rb#91
1610
+ SQLite3::Pragmas::SYNCHRONOUS_MODES = T.let(T.unsafe(nil), Hash)
1611
+
1612
+ # The enumeration of valid temp store modes.
1613
+ #
1614
+ # source://sqlite3//lib/sqlite3/pragmas.rb#98
1615
+ SQLite3::Pragmas::TEMP_STORE_MODES = T.let(T.unsafe(nil), Hash)
1616
+
1617
+ # The list of valid WAL checkpoints.
1618
+ #
1619
+ # source://sqlite3//lib/sqlite3/pragmas.rb#136
1620
+ SQLite3::Pragmas::WAL_CHECKPOINTS = T.let(T.unsafe(nil), Hash)
1621
+
1622
+ # source://sqlite3//lib/sqlite3/errors.rb#65
1623
+ class SQLite3::ProtocolException < ::SQLite3::Exception; end
1624
+
1625
+ # source://sqlite3//lib/sqlite3/errors.rb#85
1626
+ class SQLite3::RangeException < ::SQLite3::Exception; end
1627
+
1628
+ # source://sqlite3//lib/sqlite3/errors.rb#51
1629
+ class SQLite3::ReadOnlyException < ::SQLite3::Exception; end
1630
+
1631
+ # The ResultSet object encapsulates the enumerability of a query's output.
1632
+ # It is a simple cursor over the data that the query returns. It will
1633
+ # very rarely (if ever) be instantiated directly. Instead, clients should
1634
+ # obtain a ResultSet instance via Statement#execute.
1635
+ #
1636
+ # source://sqlite3//lib/sqlite3/resultset.rb#9
1637
+ class SQLite3::ResultSet
1638
+ include ::Enumerable
1639
+
1640
+ # Create a new ResultSet attached to the given database, using the
1641
+ # given sql text.
1642
+ #
1643
+ # @return [ResultSet] a new instance of ResultSet
1644
+ #
1645
+ # source://sqlite3//lib/sqlite3/resultset.rb#14
1646
+ def initialize(db, stmt); end
1647
+
1648
+ # Closes the statement that spawned this result set.
1649
+ # <em>Use with caution!</em> Closing a result set will automatically
1650
+ # close any other result sets that were spawned from the same statement.
1651
+ #
1652
+ # source://sqlite3//lib/sqlite3/resultset.rb#65
1653
+ def close; end
1654
+
1655
+ # Queries whether the underlying statement has been closed or not.
1656
+ #
1657
+ # @return [Boolean]
1658
+ #
1659
+ # source://sqlite3//lib/sqlite3/resultset.rb#70
1660
+ def closed?; end
1661
+
1662
+ # Returns the names of the columns returned by this result set.
1663
+ #
1664
+ # source://sqlite3//lib/sqlite3/resultset.rb#80
1665
+ def columns; end
1666
+
1667
+ # Required by the Enumerable mixin. Provides an internal iterator over the
1668
+ # rows of the result set.
1669
+ #
1670
+ # source://sqlite3//lib/sqlite3/resultset.rb#48
1671
+ def each; end
1672
+
1673
+ # Provides an internal iterator over the rows of the result set where
1674
+ # each row is yielded as a hash.
1675
+ #
1676
+ # source://sqlite3//lib/sqlite3/resultset.rb#56
1677
+ def each_hash; end
1678
+
1679
+ # Query whether the cursor has reached the end of the result set or not.
1680
+ #
1681
+ # @return [Boolean]
1682
+ #
1683
+ # source://sqlite3//lib/sqlite3/resultset.rb#27
1684
+ def eof?; end
1685
+
1686
+ # Obtain the next row from the cursor. If there are no more rows to be
1687
+ # had, this will return +nil+.
1688
+ #
1689
+ # The returned value will be an array, unless Database#results_as_hash has
1690
+ # been set to +true+, in which case the returned value will be a hash.
1691
+ #
1692
+ # For arrays, the column names are accessible via the +fields+ property,
1693
+ # and the column types are accessible via the +types+ property.
1694
+ #
1695
+ # For hashes, the column names are the keys of the hash, and the column
1696
+ # types are accessible via the +types+ property.
1697
+ #
1698
+ # source://sqlite3//lib/sqlite3/resultset.rb#42
1699
+ def next; end
1700
+
1701
+ # Return the next row as a hash
1702
+ #
1703
+ # source://sqlite3//lib/sqlite3/resultset.rb#85
1704
+ def next_hash; end
1705
+
1706
+ # Reset the cursor, so that a result set which has reached end-of-file
1707
+ # can be rewound and reiterated.
1708
+ #
1709
+ # source://sqlite3//lib/sqlite3/resultset.rb#21
1710
+ def reset(*bind_params); end
1711
+
1712
+ # Returns the types of the columns returned by this result set.
1713
+ #
1714
+ # source://sqlite3//lib/sqlite3/resultset.rb#75
1715
+ def types; end
1716
+ end
1717
+
1718
+ # source://sqlite3//lib/sqlite3/errors.rb#37
1719
+ class SQLite3::SQLException < ::SQLite3::Exception; end
1720
+
1721
+ SQLite3::SQLITE_LOADED_VERSION = T.let(T.unsafe(nil), String)
1722
+ SQLite3::SQLITE_PACKAGED_LIBRARIES = T.let(T.unsafe(nil), TrueClass)
1723
+ SQLite3::SQLITE_PRECOMPILED_LIBRARIES = T.let(T.unsafe(nil), TrueClass)
1724
+ SQLite3::SQLITE_VERSION = T.let(T.unsafe(nil), String)
1725
+ SQLite3::SQLITE_VERSION_NUMBER = T.let(T.unsafe(nil), Integer)
1726
+
1727
+ # source://sqlite3//lib/sqlite3/errors.rb#69
1728
+ class SQLite3::SchemaChangedException < ::SQLite3::Exception; end
1729
+
1730
+ # A statement represents a prepared-but-unexecuted SQL query. It will rarely
1731
+ # (if ever) be instantiated directly by a client, and is most often obtained
1732
+ # via the Database#prepare method.
1733
+ #
1734
+ # source://sqlite3//lib/sqlite3/statement.rb#14
1735
+ class SQLite3::Statement
1736
+ include ::Enumerable
1737
+
1738
+ # call-seq: SQLite3::Statement.new(db, sql)
1739
+ #
1740
+ # Create a new statement attached to the given Database instance, and which
1741
+ # encapsulates the given SQL text. If the text contains more than one
1742
+ # statement (i.e., separated by semicolons), then the #remainder property
1743
+ # will be set to the trailing text.
1744
+ #
1745
+ # @raise [ArgumentError]
1746
+ # @return [Statement] a new instance of Statement
1747
+ #
1748
+ # source://sqlite3//lib/sqlite3/statement.rb#28
1749
+ def initialize(db, sql); end
1750
+
1751
+ # Returns true if the statement is currently active, meaning it has an
1752
+ # open result set.
1753
+ #
1754
+ # @return [Boolean]
1755
+ #
1756
+ # source://sqlite3//lib/sqlite3/statement.rb#111
1757
+ def active?; end
1758
+
1759
+ # source://sqlite3//lib/sqlite3.rb#4
1760
+ def bind_param(_arg0, _arg1); end
1761
+
1762
+ # source://sqlite3//lib/sqlite3.rb#4
1763
+ def bind_parameter_count; end
1764
+
1765
+ # Binds the given variables to the corresponding placeholders in the SQL
1766
+ # text.
1767
+ #
1768
+ # See Database#execute for a description of the valid placeholder
1769
+ # syntaxes.
1770
+ #
1771
+ # Example:
1772
+ #
1773
+ # stmt = db.prepare( "select * from table where a=? and b=?" )
1774
+ # stmt.bind_params( 15, "hello" )
1775
+ #
1776
+ # See also #execute, #bind_param, Statement#bind_param, and
1777
+ # Statement#bind_params.
1778
+ #
1779
+ # source://sqlite3//lib/sqlite3/statement.rb#52
1780
+ def bind_params(*bind_vars); end
1781
+
1782
+ # source://sqlite3//lib/sqlite3.rb#4
1783
+ def clear_bindings!; end
1784
+
1785
+ # source://sqlite3//lib/sqlite3.rb#4
1786
+ def close; end
1787
+
1788
+ # source://sqlite3//lib/sqlite3.rb#4
1789
+ def closed?; end
1790
+
1791
+ # source://sqlite3//lib/sqlite3.rb#4
1792
+ def column_count; end
1793
+
1794
+ # source://sqlite3//lib/sqlite3.rb#4
1795
+ def column_decltype(_arg0); end
1796
+
1797
+ # source://sqlite3//lib/sqlite3.rb#4
1798
+ def column_name(_arg0); end
1799
+
1800
+ # Return an array of the column names for this statement. Note that this
1801
+ # may execute the statement in order to obtain the metadata; this makes it
1802
+ # a (potentially) expensive operation.
1803
+ #
1804
+ # source://sqlite3//lib/sqlite3/statement.rb#118
1805
+ def columns; end
1806
+
1807
+ # source://sqlite3//lib/sqlite3.rb#4
1808
+ def done?; end
1809
+
1810
+ # source://sqlite3//lib/sqlite3/statement.rb#123
1811
+ def each; end
1812
+
1813
+ # Execute the statement. This creates a new ResultSet object for the
1814
+ # statement's virtual machine. If a block was given, the new ResultSet will
1815
+ # be yielded to it; otherwise, the ResultSet will be returned.
1816
+ #
1817
+ # Any parameters will be bound to the statement using #bind_params.
1818
+ #
1819
+ # Example:
1820
+ #
1821
+ # stmt = db.prepare( "select * from table" )
1822
+ # stmt.execute do |result|
1823
+ # ...
1824
+ # end
1825
+ #
1826
+ # See also #bind_params, #execute!.
1827
+ #
1828
+ # @yield [results]
1829
+ #
1830
+ # source://sqlite3//lib/sqlite3/statement.rb#78
1831
+ def execute(*bind_vars); end
1832
+
1833
+ # Execute the statement. If no block was given, this returns an array of
1834
+ # rows returned by executing the statement. Otherwise, each row will be
1835
+ # yielded to the block.
1836
+ #
1837
+ # Any parameters will be bound to the statement using #bind_params.
1838
+ #
1839
+ # Example:
1840
+ #
1841
+ # stmt = db.prepare( "select * from table" )
1842
+ # stmt.execute! do |row|
1843
+ # ...
1844
+ # end
1845
+ #
1846
+ # See also #bind_params, #execute.
1847
+ #
1848
+ # source://sqlite3//lib/sqlite3/statement.rb#104
1849
+ def execute!(*bind_vars, &block); end
1850
+
1851
+ # source://sqlite3//lib/sqlite3.rb#4
1852
+ def expanded_sql; end
1853
+
1854
+ # source://sqlite3//lib/sqlite3.rb#4
1855
+ def memused; end
1856
+
1857
+ # Performs a sanity check to ensure that the statement is not
1858
+ # closed. If it is, an exception is raised.
1859
+ #
1860
+ # source://sqlite3//lib/sqlite3/statement.rb#142
1861
+ def must_be_open!; end
1862
+
1863
+ # This is any text that followed the first valid SQL statement in the text
1864
+ # with which the statement was initialized. If there was no trailing text,
1865
+ # this will be the empty string.
1866
+ #
1867
+ # source://sqlite3//lib/sqlite3/statement.rb#20
1868
+ def remainder; end
1869
+
1870
+ # source://sqlite3//lib/sqlite3.rb#4
1871
+ def reset!; end
1872
+
1873
+ # source://sqlite3//lib/sqlite3.rb#4
1874
+ def sql; end
1875
+
1876
+ # Returns a Hash containing information about the statement.
1877
+ # The contents of the hash are implementation specific and may change in
1878
+ # the future without notice. The hash includes information about internal
1879
+ # statistics about the statement such as:
1880
+ # - +fullscan_steps+: the number of times that SQLite has stepped forward
1881
+ # in a table as part of a full table scan
1882
+ # - +sorts+: the number of sort operations that have occurred
1883
+ # - +autoindexes+: the number of rows inserted into transient indices
1884
+ # that were created automatically in order to help joins run faster
1885
+ # - +vm_steps+: the number of virtual machine operations executed by the
1886
+ # prepared statement
1887
+ # - +reprepares+: the number of times that the prepare statement has been
1888
+ # automatically regenerated due to schema changes or changes to bound
1889
+ # parameters that might affect the query plan
1890
+ # - +runs+: the number of times that the prepared statement has been run
1891
+ # - +filter_misses+: the number of times that the Bloom filter returned
1892
+ # a find, and thus the join step had to be processed as normal
1893
+ # - +filter_hits+: the number of times that a join step was bypassed
1894
+ # because a Bloom filter returned not-found
1895
+ #
1896
+ # source://sqlite3//lib/sqlite3/statement.rb#167
1897
+ def stat(key = T.unsafe(nil)); end
1898
+
1899
+ # source://sqlite3//lib/sqlite3.rb#4
1900
+ def step; end
1901
+
1902
+ # Return an array of the data types for each column in this statement. Note
1903
+ # that this may execute the statement in order to obtain the metadata; this
1904
+ # makes it a (potentially) expensive operation.
1905
+ #
1906
+ # source://sqlite3//lib/sqlite3/statement.rb#134
1907
+ def types; end
1908
+
1909
+ private
1910
+
1911
+ # A convenience method for obtaining the metadata about the query. Note
1912
+ # that this will actually execute the SQL, which means it can be a
1913
+ # (potentially) expensive operation.
1914
+ #
1915
+ # source://sqlite3//lib/sqlite3/statement.rb#180
1916
+ def get_metadata; end
1917
+
1918
+ # source://sqlite3//lib/sqlite3.rb#4
1919
+ def prepare(_arg0, _arg1); end
1920
+
1921
+ # source://sqlite3//lib/sqlite3.rb#4
1922
+ def stat_for(_arg0); end
1923
+
1924
+ # source://sqlite3//lib/sqlite3.rb#4
1925
+ def stats_as_hash; end
1926
+ end
1927
+
1928
+ # source://sqlite3//lib/sqlite3/errors.rb#71
1929
+ class SQLite3::TooBigException < ::SQLite3::Exception; end
1930
+
1931
+ # source://sqlite3//lib/sqlite3/errors.rb#79
1932
+ class SQLite3::UnsupportedException < ::SQLite3::Exception; end
1933
+
1934
+ # (String) the version of the sqlite3 gem, e.g. "2.1.1"
1935
+ #
1936
+ # source://sqlite3//lib/sqlite3/version.rb#3
1937
+ SQLite3::VERSION = T.let(T.unsafe(nil), String)
1938
+
1939
+ # a hash of descriptive metadata about the current version of the sqlite3 gem
1940
+ #
1941
+ # source://sqlite3//lib/sqlite3/version_info.rb#3
1942
+ SQLite3::VERSION_INFO = T.let(T.unsafe(nil), Hash)
1943
+
1944
+ # source://sqlite3//lib/sqlite3/value.rb#4
1945
+ class SQLite3::Value
1946
+ # @return [Value] a new instance of Value
1947
+ #
1948
+ # source://sqlite3//lib/sqlite3/value.rb#7
1949
+ def initialize(db, handle); end
1950
+
1951
+ # Returns the value of attribute handle.
1952
+ #
1953
+ # source://sqlite3//lib/sqlite3/value.rb#5
1954
+ def handle; end
1955
+
1956
+ # source://sqlite3//lib/sqlite3/value.rb#20
1957
+ def length(utf16 = T.unsafe(nil)); end
1958
+
1959
+ # @return [Boolean]
1960
+ #
1961
+ # source://sqlite3//lib/sqlite3/value.rb#12
1962
+ def null?; end
1963
+
1964
+ # source://sqlite3//lib/sqlite3/value.rb#16
1965
+ def to_blob; end
1966
+
1967
+ # source://sqlite3//lib/sqlite3/value.rb#28
1968
+ def to_f; end
1969
+
1970
+ # source://sqlite3//lib/sqlite3/value.rb#32
1971
+ def to_i; end
1972
+
1973
+ # source://sqlite3//lib/sqlite3/value.rb#36
1974
+ def to_int64; end
1975
+
1976
+ # source://sqlite3//lib/sqlite3/value.rb#40
1977
+ def to_s(utf16 = T.unsafe(nil)); end
1978
+
1979
+ # source://sqlite3//lib/sqlite3/value.rb#44
1980
+ def type; end
1981
+ end
1982
+
1983
+ # source://sqlite3//lib/sqlite3/statement.rb#4
1984
+ class String
1985
+ include ::Comparable
1986
+
1987
+ # source://sqlite3//lib/sqlite3/statement.rb#5
1988
+ def to_blob; end
1989
+ end