greeenboii 0.1.2 → 0.1.6

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