active_cached_resource 0.1.0 → 0.1.2

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