amalgalite 1.8.0-x64-mingw-ucrt

Sign up to get free protection for your applications and to get access to all the features.
Files changed (108) hide show
  1. checksums.yaml +7 -0
  2. data/CONTRIBUTING.md +60 -0
  3. data/HISTORY.md +386 -0
  4. data/LICENSE +31 -0
  5. data/Manifest.txt +105 -0
  6. data/README.md +62 -0
  7. data/Rakefile +27 -0
  8. data/TODO.md +57 -0
  9. data/bin/amalgalite-pack +147 -0
  10. data/examples/a.rb +9 -0
  11. data/examples/blob.rb +88 -0
  12. data/examples/bootstrap.rb +36 -0
  13. data/examples/define_aggregate.rb +75 -0
  14. data/examples/define_function.rb +104 -0
  15. data/examples/fts5.rb +152 -0
  16. data/examples/gem-db.rb +94 -0
  17. data/examples/require_me.rb +11 -0
  18. data/examples/requires.rb +42 -0
  19. data/examples/schema-info.rb +34 -0
  20. data/ext/amalgalite/c/amalgalite.c +355 -0
  21. data/ext/amalgalite/c/amalgalite.h +151 -0
  22. data/ext/amalgalite/c/amalgalite_blob.c +240 -0
  23. data/ext/amalgalite/c/amalgalite_constants.c +1432 -0
  24. data/ext/amalgalite/c/amalgalite_database.c +1188 -0
  25. data/ext/amalgalite/c/amalgalite_requires_bootstrap.c +282 -0
  26. data/ext/amalgalite/c/amalgalite_statement.c +649 -0
  27. data/ext/amalgalite/c/extconf.rb +71 -0
  28. data/ext/amalgalite/c/gen_constants.rb +353 -0
  29. data/ext/amalgalite/c/notes.txt +134 -0
  30. data/ext/amalgalite/c/sqlite3.c +243616 -0
  31. data/ext/amalgalite/c/sqlite3.h +12894 -0
  32. data/ext/amalgalite/c/sqlite3_options.h +4 -0
  33. data/ext/amalgalite/c/sqlite3ext.h +705 -0
  34. data/lib/amalgalite/3.1/amalgalite.so +0 -0
  35. data/lib/amalgalite/aggregate.rb +73 -0
  36. data/lib/amalgalite/blob.rb +186 -0
  37. data/lib/amalgalite/boolean.rb +42 -0
  38. data/lib/amalgalite/busy_timeout.rb +47 -0
  39. data/lib/amalgalite/column.rb +99 -0
  40. data/lib/amalgalite/core_ext/kernel/require.rb +21 -0
  41. data/lib/amalgalite/csv_table_importer.rb +75 -0
  42. data/lib/amalgalite/database.rb +933 -0
  43. data/lib/amalgalite/function.rb +61 -0
  44. data/lib/amalgalite/index.rb +43 -0
  45. data/lib/amalgalite/memory_database.rb +15 -0
  46. data/lib/amalgalite/packer.rb +231 -0
  47. data/lib/amalgalite/paths.rb +80 -0
  48. data/lib/amalgalite/profile_tap.rb +131 -0
  49. data/lib/amalgalite/progress_handler.rb +21 -0
  50. data/lib/amalgalite/requires.rb +151 -0
  51. data/lib/amalgalite/schema.rb +225 -0
  52. data/lib/amalgalite/sqlite3/constants.rb +95 -0
  53. data/lib/amalgalite/sqlite3/database/function.rb +48 -0
  54. data/lib/amalgalite/sqlite3/database/status.rb +68 -0
  55. data/lib/amalgalite/sqlite3/status.rb +60 -0
  56. data/lib/amalgalite/sqlite3/version.rb +55 -0
  57. data/lib/amalgalite/sqlite3.rb +6 -0
  58. data/lib/amalgalite/statement.rb +421 -0
  59. data/lib/amalgalite/table.rb +91 -0
  60. data/lib/amalgalite/taps/console.rb +27 -0
  61. data/lib/amalgalite/taps/io.rb +74 -0
  62. data/lib/amalgalite/taps.rb +2 -0
  63. data/lib/amalgalite/trace_tap.rb +35 -0
  64. data/lib/amalgalite/type_map.rb +63 -0
  65. data/lib/amalgalite/type_maps/default_map.rb +166 -0
  66. data/lib/amalgalite/type_maps/storage_map.rb +38 -0
  67. data/lib/amalgalite/type_maps/text_map.rb +21 -0
  68. data/lib/amalgalite/version.rb +8 -0
  69. data/lib/amalgalite/view.rb +26 -0
  70. data/lib/amalgalite.rb +51 -0
  71. data/spec/aggregate_spec.rb +158 -0
  72. data/spec/amalgalite_spec.rb +4 -0
  73. data/spec/blob_spec.rb +78 -0
  74. data/spec/boolean_spec.rb +24 -0
  75. data/spec/busy_handler.rb +157 -0
  76. data/spec/data/iso-3166-country.txt +242 -0
  77. data/spec/data/iso-3166-schema.sql +22 -0
  78. data/spec/data/iso-3166-subcountry.txt +3995 -0
  79. data/spec/data/make-iso-db.sh +12 -0
  80. data/spec/database_spec.rb +505 -0
  81. data/spec/default_map_spec.rb +92 -0
  82. data/spec/function_spec.rb +78 -0
  83. data/spec/integeration_spec.rb +97 -0
  84. data/spec/iso_3166_database.rb +58 -0
  85. data/spec/json_spec.rb +24 -0
  86. data/spec/packer_spec.rb +60 -0
  87. data/spec/paths_spec.rb +28 -0
  88. data/spec/progress_handler_spec.rb +91 -0
  89. data/spec/requires_spec.rb +54 -0
  90. data/spec/rtree_spec.rb +66 -0
  91. data/spec/schema_spec.rb +131 -0
  92. data/spec/spec_helper.rb +48 -0
  93. data/spec/sqlite3/constants_spec.rb +108 -0
  94. data/spec/sqlite3/database_status_spec.rb +36 -0
  95. data/spec/sqlite3/status_spec.rb +22 -0
  96. data/spec/sqlite3/version_spec.rb +28 -0
  97. data/spec/sqlite3_spec.rb +53 -0
  98. data/spec/statement_spec.rb +168 -0
  99. data/spec/storage_map_spec.rb +38 -0
  100. data/spec/tap_spec.rb +57 -0
  101. data/spec/text_map_spec.rb +20 -0
  102. data/spec/type_map_spec.rb +14 -0
  103. data/spec/version_spec.rb +8 -0
  104. data/tasks/custom.rake +101 -0
  105. data/tasks/default.rake +244 -0
  106. data/tasks/extension.rake +28 -0
  107. data/tasks/this.rb +208 -0
  108. metadata +325 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 58d3faee8f3ff80138c499fb3095976ac4b36c723c037cb723e208b04365208b
4
+ data.tar.gz: f7d2684100e3b3be2b7fc18b892c92674bab513f17d10cafee9052ec0bf304cb
5
+ SHA512:
6
+ metadata.gz: 95a8f1c393dafa0f0ec369f39616a2130765b41c21d8bb963215356b13b58f87fc64a45f1f39e7bcb7e420e14cb1d40cf98bb13ba5c33475d39c3fc21eb5535a
7
+ data.tar.gz: 69c075e916b013b48adfd203da770f4636ca4c48a0bbe4e2cf383ebd525ff9027f1b3659f1c82d154565f656a8287eb42ca8d025cb0e1aaed7034967ffa5cecd
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,60 @@
1
+ # Hi there!
2
+
3
+ I see you are interested in contributing. That is wonderful. I love
4
+ contributions.
5
+
6
+ I guarantee that there are bugs in this software. And I guarantee that there is
7
+ a feature you want that is not in here yet. As such, any and all bugs reports
8
+ are gratefully accepted, bugfixes even more so. Helping out with bugs is the
9
+ easiest way to contribute.
10
+
11
+
12
+ ## The Quick Version
13
+
14
+ * Have a [GitHub Account][].
15
+ * Search the [GitHub Issues][] and see if your issue already present. If so
16
+ add your comments, :thumbsup:, etc.
17
+ * Issue not there? Not a problem, open up a [new issue][].
18
+ * **Bug reports** please be as detailed as possible. Include:
19
+ * full ruby engine and version: `ruby -e 'puts RUBY_DESCRIPTION'`
20
+ * operating system and version
21
+ * version of amalgalite `ruby -rubygems -e "require 'amalgalite'; puts Amalgalite::VERSION"`
22
+ * as much detail about the bug as possible so I can replicate it. Feel free
23
+ to link in a [gist][]
24
+ * **New Feature**
25
+ * What the new feature should do.
26
+ * What benefit the new feature brings to the project.
27
+ * Fork the [repo][].
28
+ * Create a new branch for your issue: `git checkout -b issue/my-issue`
29
+ * Lovingly craft your contribution:
30
+ * `rake develop` to get started, or if you prefer bundler `rake develop:using_bundler && bundle`.
31
+ * `rake test` to run tests
32
+ * Make sure that `rake test` passes. It's important, I said it twice.
33
+ * Add yourself to the contributors section below.
34
+ * Submit your [pull request][].
35
+
36
+ ## Building Windows Binaries
37
+
38
+ This is done using https://github.com/rake-compiler/rake-compiler-dock
39
+
40
+ 1. have VirtualBox installed
41
+ 2. have Docker Machine installed (https://docs.docker.com/engine/installation/)
42
+ 3. `gem install rake-compiler-dock`
43
+ 4. `rake-compiler-dock` (this could take a while)
44
+ 5. `bundle`
45
+ 6. `rake cross native gem`
46
+
47
+ # Contributors
48
+
49
+ * [Jeremy Hinegardner](https://github.com/copiousfreetime)
50
+ * [Jos Backus](https://github.com/josb)
51
+ * [Alex Young](https://github.com/regularfry)
52
+ * [Michael Granger](https://github.com/ged)
53
+ * [Alex Young](https://github.com/bmalex)
54
+
55
+ [GitHub Account]: https://github.com/signup/free "GitHub Signup"
56
+ [GitHub Issues]: https://github.com/copiousfreetime/amalgalite/issues "Amalgalite Issues"
57
+ [new issue]: https://github.com/copiousfreetime/amalgalite/issues/new "New Amalgalite Issue"
58
+ [gist]: https://gist.github.com/ "New Gist"
59
+ [repo]: https://github.com/copiousfreetime/amalgalite "Amalgalite Repo"
60
+ [pull request]: https://help.github.com/articles/using-pull-requests "Using Pull Requests"
data/HISTORY.md ADDED
@@ -0,0 +1,386 @@
1
+ # Amalgalite Changelog
2
+
3
+ ## Version 1.8.0 - 2023-02-06
4
+ * Update SQLite to 3.40.1
5
+ * Update ruby compaibility to 2.5 -> 3.2
6
+
7
+ ## Version 1.7.2 - 2022-06-17
8
+
9
+ * Update SQLIte to 3.38.5
10
+ * Update ruby compatability testing to 2.5 -> 3.1
11
+
12
+ ## Version 1.7.1 - 2021
13
+
14
+ * Update SQLite to 3.34.1
15
+
16
+ ## Version 1.7.0 - 2021-01-13
17
+
18
+ * Update to SQLite to 3.34.0
19
+ * enable new compile time options
20
+ * SQLITE_ENABLE_BYTECODE_VGAB
21
+ * SQLITE_ENABLE_DESERIALIZE
22
+ * SQLITE_ENABLE_EXPLAIN_COMMENTS
23
+ * SQLITE_ENABLE_NULL_TRIM
24
+ * SQLITE_ENABLE_QPSG
25
+ * SQLITE_ENABLE_SNAPSHOT
26
+ * resolve ruby deprecations for ruby 2.7.2
27
+ * rework the aggregator interface to handle issue with ruby warnings.
28
+
29
+ ## Version 1.6.3 - 2019-01-19
30
+
31
+ * Update to SQLite 3.26.0
32
+ * enable new compile time options
33
+ * SQLITE_ENABLE_GEOPOLY
34
+
35
+ ## Version 1.6.2 - 2018-11-10
36
+
37
+ * Update to SQLite 3.25.3
38
+
39
+ ## Version 1.6.1 - 2018-01-02
40
+
41
+ * Fix bug when using the `json` extension
42
+
43
+ ## Version 1.6.0 - 2017-12-13
44
+
45
+ * Update to SQLite 3.21.0
46
+ * source id access methods
47
+ * Amalgalite::SQLite3::Version.compiled_source_id
48
+ * Amalgalite::SQLite3::Version.runtime_source_id
49
+ * enable new compile time options
50
+ * SQLITE_ENABLE_DBPAGE_VTAB
51
+ * SQLITE_ENABLE_MEMORY_MANAGEMENT
52
+ * SQLITE_ENABLE_PREUPDATE_HOOK
53
+ * SQLITE_ENABLE_SESSION
54
+ * SQLITE_ENABLE_STMTVTAB
55
+
56
+ ## Version 1.5.0 - 2015-12-06
57
+
58
+ * Update to SQLite 3.9.2
59
+ * Enable new SQLite features FTS5, JSON1
60
+
61
+ ## Version 1.4.1 - 2015-09-13
62
+
63
+ * Update to SQLite 3.8.11.1
64
+ * Track down and cleanup sporadic rspec failures
65
+
66
+ ## Version 1.4.0 - 2015-01-11
67
+
68
+ ### Enhancements
69
+
70
+ * Update arrayfields dependency to 4.9.2
71
+ * Update to SQLite 3.8.7.4
72
+ * Make windows binary gems again, including ruby 2.1
73
+
74
+ ## Version 1.3.0 - 2013-03-13
75
+
76
+ ### Enhancements
77
+
78
+ * Update development dependencies to the latest levels
79
+ * Change up the development process to be inline with other projects
80
+ * Add Amalgalite::Database#import for mass execution of sql (bmalex 5a42f44f)
81
+ * Allow :memory: databases to Amalgalite::Requires (bmalex df9f70b8)
82
+ * Allow bootstrapping from an in-memory sql buffer (bmalex a17fb9cf)
83
+ * Make Amalgalite 1.9 -w clean
84
+ * Updates for Ruby 2.0
85
+
86
+ ### Bug Fixes
87
+
88
+ * Fix handling of debug flags in extconf.rb (ged #22)
89
+ * Remove deprected Config:: (github issue #23)
90
+ * Correct detection of being loaded in conjunction with 'sqlite3' gem (github issue #15)
91
+ * Fix incorrect loading/reload of schema [GH #16]
92
+ * Fix setting of LOADED_FEATRES when requiring from a database (bmalex edb81837)
93
+ * Fix setting of require_path for files to require that are stored in the * database (bmalex de321b86)
94
+
95
+ ## Version 1.1.2 - 2011-04-01
96
+
97
+ ### Bug Fixes
98
+
99
+ * Remove example database that was mistakenly packaged with version 1.1.1
100
+
101
+ ## Version 1.1.1 - 2011-03-27
102
+
103
+ ### Enhancements
104
+
105
+ * Update to SQLite 3.7.5
106
+ * Enable SQLite Full Text Search compile time options FTS3 and FTS4 [github issue #10]
107
+ http://www.sqlite.org/fts3.html
108
+ * Enable STAT2 SQLite compile time option to improve ANALYZE command support
109
+ http://www.sqlite.org/lang_analyze.html
110
+
111
+ ### Bug Fixes
112
+
113
+ * The C coded generated by gen_constants.rb was updated to support older
114
+ compilers [github issue #8] (patch from josb)
115
+ * Fix 'amalgalite-pack --self' on ruby 1.9
116
+
117
+ ## Version 1.0.0 - 2011-01-16
118
+
119
+ ### Enhancements
120
+
121
+ * Update to 1.0.0
122
+ * Update to SQLite 3.7.4
123
+ * Update all runtime and development dependencies to the latest version
124
+
125
+ ### Bug Fixes
126
+
127
+ * Fix FasterCSV/CSV compatibility issues with ruby 1.8/1.9 [github issue #4]
128
+ * Fix building issues for Ruby 1.9 [gitHub issue #5]
129
+ * Fix cross compilation problems when using rvm
130
+
131
+ ## Version 0.15.0 - 2010-10-30
132
+
133
+ ### Enhancements
134
+
135
+ * Update to sqlite 3.7.3
136
+ * Added Database#import_csv_to_table
137
+ * Added MemoryDatabase class
138
+
139
+ ### Bug Fixes
140
+
141
+ * Unable to run specs from gem [GH Issue #3]
142
+
143
+ ## Version 0.12.1 - 2010-02-17
144
+
145
+ ### Enhancements
146
+
147
+ * Update to sqlite 3.6.22
148
+
149
+ ## Version 0.12.0 - 2009-10-29
150
+
151
+ ### Enhancements
152
+
153
+ * Update to sqlite 3.6.19
154
+
155
+ ### Bug Fixes
156
+
157
+ * Improve detection of schema changes
158
+ * Add missing development dependencies
159
+ * Ensure the initialization of the underlying sqlite3 library
160
+ * Fix a segmentation fault that happend in Sequel tests
161
+ * Fix tracking of highwater memory usage
162
+ * Fix testing interruptability of sqlite3 commands
163
+
164
+ ## Version 0.11.0 - 2009-08-23
165
+
166
+ ### Enhancements
167
+
168
+ * Update to SQLite 3.6.17
169
+
170
+ ### Bug Fixes
171
+
172
+ * Add compiletime vs. runtime library checking.
173
+ * Fix missing datatypes to typemap (reported by Jay Godse)
174
+
175
+ ## Version 0.10.2 - 2009-08-10
176
+
177
+ ### Bug Fixes
178
+
179
+ * Statement#execute was not expanding an Array passed in to the positional
180
+ #bind parameters (reported by Steven Harris).
181
+
182
+ ## Version 0.10.1 - 2009-08-01
183
+
184
+ ### Enhancements
185
+
186
+ * Add version subdirectory for extension on all platforms for building locally
187
+ on gem install.
188
+ * Add gem for x86-ming32 platform
189
+ * Add specs to validate the R*Tree index is compiled correctly
190
+
191
+ ### Bug Fixes
192
+
193
+ * Small documentation change for Amalgalite::Database#new
194
+
195
+ ## Version 0.10.0 - 2009-06-28
196
+
197
+ ### Enhancements
198
+
199
+ * windows gem is now a fat binary to support installing into ruby 1.8 and 1.9
200
+ from the same gem
201
+ * Update to Sqlite 3.6.16 and fix errors returned by define_aggregate and
202
+ define_function based upon update
203
+
204
+ ## Version 0.9.0 - 2009-04-05
205
+
206
+ ### Enhancements
207
+
208
+ * Ruby 1.9 compatibility
209
+ * Update to SQLite 3.6.12
210
+ * Added support for the new SQLite Backup API, see Amalgalite::Database#replicate_to
211
+ * Added exclusive/immediate/deferred transaction helpers
212
+
213
+ ## Version 0.8.0 - 2009-03-23
214
+
215
+ ### Enhancements
216
+
217
+ * Add in support for obtaining limited schema information on temporary tables
218
+ and indexes
219
+ * Add support for returning the primary key columns of a table
220
+ * Other miscellaneous items to support the ActiveRecord adapter
221
+
222
+ ## Version 0.7.7 - 2009-03-03
223
+
224
+ ### Bug Fixes
225
+
226
+ * roll back to SQLite 3.6.10 because of substr() bug in 3.6.11
227
+
228
+ ## Version 0.7.6 - 2009-03-02
229
+
230
+ ### Enhancements
231
+
232
+ * Update to SQLite 3.6.11
233
+
234
+ ### Bug Fixes
235
+
236
+ * fix issues with the wrong error message appearing in statement closing
237
+ * incorrectly raise an exception if a transaction is started when rescuing an
238
+ exception [reported by James Edwared Gray II]
239
+
240
+ ## Version 0.7.5 - 2009-02-12
241
+
242
+ ### Bug Fixes
243
+
244
+ * another ruby -w pass to clear up warnings
245
+ * force all tests to run with -w turned on
246
+
247
+ ## Version 0.7.4 - 2009-02-08
248
+
249
+ ### Bug Fixes
250
+
251
+ * fix Database#first_row_from not behaving the same as Database#execute() when
252
+ there are no results. [reported by James Edward Gray II]
253
+
254
+ ## Version 0.7.3 - 2009-02-08
255
+
256
+ ### Enhancements
257
+
258
+ * added Database#first_row_from
259
+ * added Database#first_value_from
260
+
261
+ ### Bug Fixes
262
+
263
+ * clean up ruby warnings when run with -w
264
+ * fix documenation on Database#execute
265
+
266
+ ## Version 0.7.2 - 2009-01-24
267
+ ### Enhancements
268
+
269
+ * added quoting and escaping of text support, used for database drivers
270
+ * added ability to access columns of the schame in original definition order
271
+
272
+ ## Version 0.7.1 - 2009-01-18
273
+
274
+ ### Enhancements
275
+
276
+ * added support for sqlite's nexted transactions which appeared in sqlite
277
+ * update to SQLite version 3.6.10
278
+ * added ability to set the SQLite temporary directory
279
+ * added amalgalite-pack --require-order
280
+
281
+ ### Bug Fixes
282
+
283
+ * fix exception when accessing the special 'rowid' column
284
+ * fix internal require order list for use in packing
285
+
286
+ ## Version 0.6.0 - 2009-01-10
287
+
288
+ ### Enhancements
289
+
290
+ * Added ability to define custom SQL functions implemented in Ruby
291
+ * Added ability to define custom SQL aggregates implemented in Ruby
292
+ * Added support for Ruby busy handlers
293
+ * Added database 'interrupt' support
294
+ * Added support for Ruby progress handlers
295
+ * update to SQLite version 3.6.7
296
+
297
+ ## Version 0.5.1 - 2008-11-30
298
+
299
+ ### Enhancements
300
+
301
+ * update to SQLite version 3.6.6.2
302
+
303
+ ## Version 0.5.0 - 2008-11-16
304
+
305
+ ### Enhancements
306
+
307
+ * amalgalite-pack-into-db has been reworked into amalgalite-pack
308
+ * ruby code that is packed into a database for later requiring can now be
309
+ compressed
310
+ * update to SQLite version 3.6.5
311
+
312
+ ## Version 0.4.2 - 2008-10-12
313
+
314
+ ### Enhancements
315
+
316
+ * release of windows gem
317
+
318
+ ## Version 0.4.1 - 2008-09-28
319
+
320
+ ### Enhancements
321
+
322
+ * update to SQLite3 version 3.6.3
323
+ * change rdoc template to darkfish
324
+
325
+ ## Version 0.4.0 - 2008-09-14
326
+
327
+ ### Enhancements
328
+ * update to SQLite3 version 3.6.2 and enable the RTree option by default
329
+ * Amalgalite::Requires module allowing ruby code to be 'required' from columns in an SQLite database
330
+ * Amagalite::Requires::Bootstrap extension module enabling low level boot
331
+ strapping of the pure ruby Amalgalite code from an sqlite database
332
+ * more indepth information about indexes is available via the Index class
333
+ * add support for sqlite3_status and sqlite3_db_status information
334
+
335
+ ### Bugfixes
336
+
337
+ * fix nil exception when using a declared_data_type on primary key column that
338
+ has no declared_data_type
339
+ * when Database#transaction is passed a block, the return value is the return
340
+ value of the block
341
+ * nested transactions are 'faked'. Calling Database#transaction while
342
+ Databased#in_transaction? is true does not result in an exception, but
343
+ continues on in the current transaction.
344
+ * raise LoadError if required in the same program as sqlite3-ruby. These
345
+ libraries conflict with each other.
346
+
347
+ ## Version 0.2.4 - 2008-07-13
348
+
349
+ ### Bugfixes
350
+ * fix compilation when ruby is compiled without pthreads using
351
+
352
+ ## Version 0.2.3 - 2008-07-12
353
+
354
+ ### Bugfixes
355
+ * make sure file permissions are all read before shipping gem
356
+
357
+ ## Version 0.2.2 - 2008-07-12
358
+
359
+ ### Bugfixes
360
+ * Database#pragma should accept a block just like Database#execute does
361
+ * convert to using extconf.rb instead of mkrf to enable compilation as a
362
+ direct ruby extension in the ruby source tree
363
+
364
+ ## Version 0.2.1 - 2008-07-05
365
+
366
+ ### Bugfixes
367
+ * make sure that the pthread support in sqlite3 matches that of ruby
368
+ * fix schema reloading in the example scripts
369
+
370
+ ## Version 0.2.0 - 2008-07-04
371
+
372
+ ### Enhancements
373
+ * blob support, both incremental access and normal access
374
+ * added examples/gem_db.rb script demonstrating taps and prepared statements
375
+ * added examples/schema-info.rb script demonstrating meta information
376
+ * added examples/blob.rb demonstrating incremental blob IO
377
+ * added access to the SQLite3 errcode and errmsg api
378
+
379
+ ### Bugfixes
380
+ * added taps.rb for requiring
381
+ * fixed prepared statement reset
382
+ * caught an error in executing prepared statements earlier in the process so the correct error is reported
383
+
384
+ ## Version 0.1.0 - 2008-06-21
385
+
386
+ * Initial public release
data/LICENSE ADDED
@@ -0,0 +1,31 @@
1
+ BSD License - https://opensource.org/licenses/BSD-3-Clause
2
+
3
+ Copyright (c) 2008-2022 Jeremy Hinegardner
4
+
5
+ All rights reserved.
6
+
7
+ Redistribution and use in source and binary forms, with or without
8
+ modification, are permitted provided that the following conditions are met:
9
+
10
+ * Redistributions of source code must retain the above copyright notice,
11
+ this list of conditions and the following disclaimer.
12
+
13
+ * Redistributions in binary form must reproduce the above copyright notice,
14
+ this list of conditions and the following disclaimer in the documentation
15
+ and/or other materials provided with the distribution.
16
+
17
+ * Neither the name of Jeremy Hinegardner nor the names of its contributors
18
+ may be used to endorse or promote products derived from this software without
19
+ specific prior written permission.
20
+
21
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
22
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
23
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
24
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
25
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
26
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
27
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
28
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
29
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
30
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
31
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
data/Manifest.txt ADDED
@@ -0,0 +1,105 @@
1
+ CONTRIBUTING.md
2
+ HISTORY.md
3
+ LICENSE
4
+ Manifest.txt
5
+ README.md
6
+ Rakefile
7
+ TODO.md
8
+ bin/amalgalite-pack
9
+ examples/a.rb
10
+ examples/blob.rb
11
+ examples/bootstrap.rb
12
+ examples/define_aggregate.rb
13
+ examples/define_function.rb
14
+ examples/fts5.rb
15
+ examples/gem-db.rb
16
+ examples/require_me.rb
17
+ examples/requires.rb
18
+ examples/schema-info.rb
19
+ ext/amalgalite/c/amalgalite.c
20
+ ext/amalgalite/c/amalgalite.h
21
+ ext/amalgalite/c/amalgalite_blob.c
22
+ ext/amalgalite/c/amalgalite_constants.c
23
+ ext/amalgalite/c/amalgalite_database.c
24
+ ext/amalgalite/c/amalgalite_requires_bootstrap.c
25
+ ext/amalgalite/c/amalgalite_statement.c
26
+ ext/amalgalite/c/extconf.rb
27
+ ext/amalgalite/c/gen_constants.rb
28
+ ext/amalgalite/c/notes.txt
29
+ ext/amalgalite/c/sqlite3.c
30
+ ext/amalgalite/c/sqlite3.h
31
+ ext/amalgalite/c/sqlite3_options.h
32
+ ext/amalgalite/c/sqlite3ext.h
33
+ lib/amalgalite.rb
34
+ lib/amalgalite/aggregate.rb
35
+ lib/amalgalite/blob.rb
36
+ lib/amalgalite/boolean.rb
37
+ lib/amalgalite/busy_timeout.rb
38
+ lib/amalgalite/column.rb
39
+ lib/amalgalite/core_ext/kernel/require.rb
40
+ lib/amalgalite/csv_table_importer.rb
41
+ lib/amalgalite/database.rb
42
+ lib/amalgalite/function.rb
43
+ lib/amalgalite/index.rb
44
+ lib/amalgalite/memory_database.rb
45
+ lib/amalgalite/packer.rb
46
+ lib/amalgalite/paths.rb
47
+ lib/amalgalite/profile_tap.rb
48
+ lib/amalgalite/progress_handler.rb
49
+ lib/amalgalite/requires.rb
50
+ lib/amalgalite/schema.rb
51
+ lib/amalgalite/sqlite3.rb
52
+ lib/amalgalite/sqlite3/constants.rb
53
+ lib/amalgalite/sqlite3/database/function.rb
54
+ lib/amalgalite/sqlite3/database/status.rb
55
+ lib/amalgalite/sqlite3/status.rb
56
+ lib/amalgalite/sqlite3/version.rb
57
+ lib/amalgalite/statement.rb
58
+ lib/amalgalite/table.rb
59
+ lib/amalgalite/taps.rb
60
+ lib/amalgalite/taps/console.rb
61
+ lib/amalgalite/taps/io.rb
62
+ lib/amalgalite/trace_tap.rb
63
+ lib/amalgalite/type_map.rb
64
+ lib/amalgalite/type_maps/default_map.rb
65
+ lib/amalgalite/type_maps/storage_map.rb
66
+ lib/amalgalite/type_maps/text_map.rb
67
+ lib/amalgalite/version.rb
68
+ lib/amalgalite/view.rb
69
+ spec/aggregate_spec.rb
70
+ spec/amalgalite_spec.rb
71
+ spec/blob_spec.rb
72
+ spec/boolean_spec.rb
73
+ spec/busy_handler.rb
74
+ spec/data/iso-3166-country.txt
75
+ spec/data/iso-3166-schema.sql
76
+ spec/data/iso-3166-subcountry.txt
77
+ spec/data/make-iso-db.sh
78
+ spec/database_spec.rb
79
+ spec/default_map_spec.rb
80
+ spec/function_spec.rb
81
+ spec/integeration_spec.rb
82
+ spec/iso_3166_database.rb
83
+ spec/json_spec.rb
84
+ spec/packer_spec.rb
85
+ spec/paths_spec.rb
86
+ spec/progress_handler_spec.rb
87
+ spec/requires_spec.rb
88
+ spec/rtree_spec.rb
89
+ spec/schema_spec.rb
90
+ spec/spec_helper.rb
91
+ spec/sqlite3/constants_spec.rb
92
+ spec/sqlite3/database_status_spec.rb
93
+ spec/sqlite3/status_spec.rb
94
+ spec/sqlite3/version_spec.rb
95
+ spec/sqlite3_spec.rb
96
+ spec/statement_spec.rb
97
+ spec/storage_map_spec.rb
98
+ spec/tap_spec.rb
99
+ spec/text_map_spec.rb
100
+ spec/type_map_spec.rb
101
+ spec/version_spec.rb
102
+ tasks/custom.rake
103
+ tasks/default.rake
104
+ tasks/extension.rake
105
+ tasks/this.rb
data/README.md ADDED
@@ -0,0 +1,62 @@
1
+ ## Amalgalite
2
+
3
+ [![Build Status](https://copiousfreetime.semaphoreci.com/badges/amalgalite/branches/main.svg?key=6d8f47c8-bfc7-4969-a128-424478908a27)](https://copiousfreetime.semaphoreci.com/projects/amalgalite)
4
+
5
+ * [Homepage](http://github.com/copiousfreetime/amalgalite)
6
+ * `git clone git://github.com/copiousfreetime/amalgalite.git`
7
+ * [Github](http://github.com/copiousfreetime/amalgalite/)
8
+ * [Bug Tracking](http://github.com/copiousfreetime/amalgalite/issues)
9
+
10
+ ## Articles
11
+
12
+ * [Writing SQL Functions in Ruby](http://copiousfreetime.org/articles/2009/01/10/writing-sql-functions-in-ruby.html)
13
+
14
+ ## INSTALL
15
+
16
+ * `gem install amalgalite`
17
+
18
+ ## DESCRIPTION
19
+
20
+ Amalgalite embeds the SQLite database engine as a ruby extension. There is no
21
+ need to install SQLite separately.
22
+
23
+ Look in the examples/ directory to see
24
+
25
+ * general usage
26
+ * blob io
27
+ * schema information
28
+ * custom functions
29
+ * custom aggregates
30
+ * requiring ruby code from a database
31
+ * full text search
32
+
33
+ Also Scroll through Amalgalite::Database for a quick example, and a general
34
+ overview of the API.
35
+
36
+ Amalgalite adds in the following additional non-default SQLite extensions:
37
+
38
+ * [R*Tree index extension](http://sqlite.org/rtree.html)
39
+ * [Full Text Search](http://sqlite.org/fts5.html) - both fts3 and fts5
40
+ * [Geopoly Interface to R*Tree](https://www.sqlite.org/geopoly.html)
41
+ * [JSON Extension](https://www.sqlite.org/json1.html)
42
+
43
+ Other extensions are add that might not be usable/visible by users of the gem.
44
+ The full list of extensions added is in
45
+ [extconf.rb](ext/amalgalite/c/extconf.rb). And those may be cross referenced
46
+ against the [compile options from SQLite](https://www.sqlite.org/compile.html)
47
+
48
+ ## CREDITS
49
+
50
+ * Jamis Buck for the first [ruby sqlite implementation](http://www.rubyforge.org/projects/sqlite-ruby)
51
+
52
+ ## CHANGES
53
+
54
+ Read the HISTORY.rdoc file.
55
+
56
+ ## LICENSE
57
+
58
+ Copyright (c) 2008 Jeremy Hinegardner
59
+
60
+ All rights reserved.
61
+
62
+ See LICENSE and/or COPYING for details.
data/Rakefile ADDED
@@ -0,0 +1,27 @@
1
+ # vim: syntax=ruby
2
+ load 'tasks/this.rb'
3
+
4
+ This.name = "amalgalite"
5
+ This.author = "Jeremy Hinegardner"
6
+ This.email = "jeremy@copiousfreetime.org"
7
+ This.homepage = "http://github.com/copiousfreetime/#{ This.name }"
8
+
9
+ This.ruby_gemspec do |spec|
10
+ spec.add_dependency( 'arrayfields', '~> 4.9' )
11
+
12
+ spec.add_development_dependency( 'rspec', '~> 3.12' )
13
+ spec.add_development_dependency( 'rspec_junit_formatter','~> 0.6' )
14
+ spec.add_development_dependency( 'rake', '~> 13.0' )
15
+ spec.add_development_dependency( 'rake-compiler', '~> 1.2' )
16
+ spec.add_development_dependency( 'rake-compiler-dock', '~> 1.2' )
17
+ spec.add_development_dependency( 'rdoc', '~> 6.5' )
18
+ spec.add_development_dependency( 'simplecov', '~> 0.21' )
19
+ spec.add_development_dependency( 'archive-zip', '~> 0.12' )
20
+
21
+ spec.extensions.concat This.extension_conf_files
22
+ spec.license = "BSD-3-Clause"
23
+ end
24
+
25
+ load 'tasks/default.rake'
26
+ load 'tasks/extension.rake'
27
+ load 'tasks/custom.rake'