sqlite3-full 1.3.9.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +7 -0
  2. data/.gemtest +0 -0
  3. data/API_CHANGES.rdoc +50 -0
  4. data/CHANGELOG.rdoc +278 -0
  5. data/ChangeLog.cvs +88 -0
  6. data/Gemfile +15 -0
  7. data/LICENSE +34 -0
  8. data/Manifest.txt +52 -0
  9. data/README.rdoc +90 -0
  10. data/Rakefile +10 -0
  11. data/ext/sqlite3/backup.c +168 -0
  12. data/ext/sqlite3/backup.h +15 -0
  13. data/ext/sqlite3/database.c +825 -0
  14. data/ext/sqlite3/database.h +15 -0
  15. data/ext/sqlite3/exception.c +94 -0
  16. data/ext/sqlite3/exception.h +8 -0
  17. data/ext/sqlite3/extconf.rb +86 -0
  18. data/ext/sqlite3/sqlite3.c +97 -0
  19. data/ext/sqlite3/sqlite3_ruby.h +52 -0
  20. data/ext/sqlite3/sqlite3amalgamation.c +153367 -0
  21. data/ext/sqlite3/statement.c +447 -0
  22. data/ext/sqlite3/statement.h +16 -0
  23. data/faq/faq.rb +145 -0
  24. data/faq/faq.yml +426 -0
  25. data/lib/sqlite3/constants.rb +49 -0
  26. data/lib/sqlite3/database.rb +590 -0
  27. data/lib/sqlite3/errors.rb +44 -0
  28. data/lib/sqlite3/pragmas.rb +280 -0
  29. data/lib/sqlite3/resultset.rb +195 -0
  30. data/lib/sqlite3/statement.rb +144 -0
  31. data/lib/sqlite3/translator.rb +118 -0
  32. data/lib/sqlite3/value.rb +57 -0
  33. data/lib/sqlite3/version.rb +25 -0
  34. data/lib/sqlite3.rb +10 -0
  35. data/setup.rb +1333 -0
  36. data/tasks/faq.rake +9 -0
  37. data/tasks/gem.rake +38 -0
  38. data/tasks/native.rake +52 -0
  39. data/tasks/vendor_sqlite3.rake +91 -0
  40. data/test/helper.rb +18 -0
  41. data/test/test_backup.rb +33 -0
  42. data/test/test_collation.rb +82 -0
  43. data/test/test_database.rb +367 -0
  44. data/test/test_database_readonly.rb +29 -0
  45. data/test/test_deprecated.rb +44 -0
  46. data/test/test_encoding.rb +153 -0
  47. data/test/test_integration.rb +572 -0
  48. data/test/test_integration_open_close.rb +30 -0
  49. data/test/test_integration_pending.rb +115 -0
  50. data/test/test_integration_resultset.rb +159 -0
  51. data/test/test_integration_statement.rb +194 -0
  52. data/test/test_result_set.rb +37 -0
  53. data/test/test_sqlite3.rb +9 -0
  54. data/test/test_statement.rb +260 -0
  55. data/test/test_statement_execute.rb +35 -0
  56. metadata +205 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 6affde88fde67c581836a4ee48ffc64d4440f3ba
4
+ data.tar.gz: e54b1aff3a25a80c2525805ec799c8f59ad8b729
5
+ SHA512:
6
+ metadata.gz: f8be6bcd9ea51105ff62be9c7ee5e6b7d9266a8b9d865de344ef0665cb3844e24e72730a81448ce4738107303aab343ecbea1992a0357709d4adf35b868ad0ca
7
+ data.tar.gz: 54aef6580ebf0778e4ca37c6ef2cd35a0b844901201c0cb681f0fb2f6dbd7538fcef0f6214405deb0c24291407a2fadb1fdf0f8a2cc85390fbcf70c26f2b8ba5
data/.gemtest ADDED
File without changes
data/API_CHANGES.rdoc ADDED
@@ -0,0 +1,50 @@
1
+ = API Changes
2
+
3
+ * SQLite3::Database#execute only accepts an array for bind parameters.
4
+
5
+ * SQLite3::ResultSet used to query the database for the first row, regardless
6
+ of whether the user asked for it or not. I have removed that so that rows
7
+ will not be returned until the user asks for them. This is a subtle but
8
+ sometimes important change in behavior.
9
+
10
+ 83882d2208ed189361617d5ab8532a325aaf729d
11
+
12
+ * SQLite3::Database#trace now takes either a block or an object that responds
13
+ to "call". The previous implementation passed around a VALUE that was cast
14
+ to a void *. This is dangerous because the value could get garbage collected
15
+ before the proc was called. If the user wants data passed around with the
16
+ block, they should use variables available to the closure or create an
17
+ object.
18
+
19
+ * SQLite3::Statement#step automatically converts to ruby types, where before
20
+ all values were automatically yielded as strings. This will only be a
21
+ problem for people who were accessing information about the database that
22
+ wasn't previously passed through the pure ruby conversion code.
23
+
24
+ * SQLite3::Database#errmsg no longer takes a parameter to return error
25
+ messages as UTF-16. Do people even use that? I opt for staying UTF-8 when
26
+ possible. See test_integration.rb test_errmsg_utf16
27
+
28
+ * SQLite3::Database#authorize same changes as trace
29
+
30
+ * test/test_tc_database.rb was removed because we no longer use the Driver
31
+ design pattern.
32
+
33
+ = Garbage Collection Strategy
34
+
35
+ All statements keep pointers back to their respective database connections.
36
+ The @connection instance variable on the Statement handle keeps the database
37
+ connection alive. Memory allocated for a statement handler will be freed in
38
+ two cases:
39
+
40
+ * close is called on the statement
41
+ * The SQLite3::Database object gets garbage collected
42
+
43
+ We can't free the memory for the statement in the garbage collection function
44
+ for the statement handler. The reason is because there exists a race
45
+ condition. We cannot guarantee the order in which objects will be garbage
46
+ collected. So, it is possible that a connection and a statement are up for
47
+ garbage collection. If the database connection were to be free'd before the
48
+ statement, then boom. Instead we'll be conservative and free unclosed
49
+ statements when the connection is terminated.
50
+
data/CHANGELOG.rdoc ADDED
@@ -0,0 +1,278 @@
1
+ === (in Git)
2
+
3
+ * Enhancements:
4
+ * Windows: build against SQLite 3.8.6. Closes #135 [Hubro]
5
+
6
+ === 1.3.9 / 2014-02-25
7
+
8
+ * Bugfixes:
9
+ * Reset exception message. Closes #80
10
+ * Reduce warnings due unused pointers. Closes #89
11
+ * Add BSD-3 license reference to gemspec. Refs #99 and #106
12
+
13
+ === 1.3.8 / 2013-08-17
14
+
15
+ * Enhancements:
16
+ * Windows: build against SQLite 3.7.17
17
+
18
+ * Bugfixes:
19
+ * Reset exception message. Closes #80
20
+ * Correctly convert BLOB values to Ruby. Closes #65
21
+ * Add MIT license reference to gemspec. Closes #99
22
+ * Remove unused pointer. Closes #89
23
+
24
+ * Internal:
25
+ * Backport improvements in cross compilation for Windows
26
+ * Use of Minitest for internal tests
27
+ * Use Gemfile (generated by Hoe) to deal with dependencies
28
+ * Cleanup Travis CI
29
+
30
+ === 1.3.7 / 2013-01-11
31
+
32
+ * Bugfixes
33
+ * Closing a bad statement twice will not segv.
34
+ * Aggregate handlers are initialized on each query. Closes #44
35
+
36
+ * Internal
37
+ * Unset environment variables that could affect cross compilation.
38
+
39
+ === 1.3.6 / 2012-04-16
40
+
41
+ * Enhancements
42
+ * Windows: build against SQLite 3.7.11
43
+ * Added SQLite3::ResultSet#each_hash for fetching each row as a hash.
44
+ * Added SQLite3::ResultSet#next_hash for fetching one row as a hash.
45
+
46
+ * Bugfixes
47
+ * Support both UTF-16LE and UTF-16BE encoding modes on PPC. Closes #63
48
+ * Protect parameters to custom functions from being garbage collected too
49
+ soon. Fixes #60. Thanks hirataya!
50
+ * Fix backwards compatibility with 1.2.5 with bind vars and `query` method.
51
+ Fixes #35.
52
+ * Fix double definition error caused by defining sqlite3_int64/uint64.
53
+ * Fix suspicious version regexp.
54
+
55
+ * Deprecations
56
+ * ArrayWithTypesAndFields#types is deprecated and the class will be removed
57
+ in version 2.0.0. Please use the `types` method on the ResultSet class
58
+ that created this object.
59
+ * ArrayWithTypesAndFields#fields is deprecated and the class will be removed
60
+ in version 2.0.0. Please use the `columns` method on the ResultSet class
61
+ that created this object.
62
+ * The ArrayWithTypesAndFields class will be removed in 2.0.0
63
+ * The ArrayWithTypes class will be removed in 2.0.0
64
+ * HashWithTypesAndFields#types is deprecated and the class will be removed
65
+ in version 2.0.0. Please use the `types` method on the ResultSet class
66
+ that created this object.
67
+ * HashWithTypesAndFields#fields is deprecated and the class will be removed
68
+ in version 2.0.0. Please use the `columns` method on the ResultSet class
69
+ that created this object.
70
+
71
+ === 1.3.5 / 2011-12-03 - ZOMG Holidays are here Edition!
72
+
73
+ * Enhancements
74
+ * Windows: build against SQLite 3.7.9
75
+ * Static: enable SQLITE_ENABLE_COLUMN_METADATA
76
+ * Added Statement#clear_bindings! to set bindings back to nil
77
+
78
+ * Bugfixes
79
+ * Fixed a segv on Database.new. Fixes #34 (thanks nobu!)
80
+ * Database error is not reset, so don't check it in Statement#reset!
81
+ * Remove conditional around Bignum statement bindings.
82
+ Fixes #52. Fixes #56. Thank you Evgeny Myasishchev.
83
+
84
+ * Internal
85
+ * Use proper endianness when testing database connection with UTF-16.
86
+ Fixes #40. Fixes #51
87
+ * Use -fPIC for static compilation when host is x86_64.
88
+
89
+ === 1.3.4 / 2011-07-25
90
+
91
+ * Enhancements:
92
+ * Windows: build against SQLite 3.7.7.1
93
+ * Windows: build static binaries that do not depend on sqlite3.dll be
94
+ installed anymore
95
+
96
+ * Bugfixes
97
+ * Backup API is conditionaly required so that older libsqlite3 can be used.
98
+ Thanks Hongli Lai.
99
+ * Fixed segmentation fault when nil is passed to SQLite3::Statement.new
100
+ * Fix extconf's hardcoded path that affected installation on certain systems.
101
+
102
+ === 1.3.3 / 2010-01-16
103
+
104
+ * Bugfixes
105
+ * Abort on installation if sqlite3_backup_init is missing. Fixes #19
106
+ * Gem has been renamed to 'sqlite3'. Please use `gem install sqlite3`
107
+
108
+ === 1.3.2 / 2010-10-30 / RubyConf Uruguay Edition!
109
+
110
+ * Enhancements:
111
+ * Windows: build against 3.7.3 version of SQLite3
112
+ * SQLite3::Database can now be open as readonly
113
+
114
+ db = SQLite3::Database.new('my.db', :readonly => true)
115
+
116
+ * Added SQLite3::SQLITE_VERSION and SQLite3::SQLITE_VERSION_NUMBER [nurse]
117
+
118
+ * Bugfixes
119
+ * type_translation= works along with Database#execute and a block
120
+ * defined functions are kept in a hash to prevent GC. #7
121
+ * Removed GCC specific flags from extconf.
122
+
123
+ * DEPRECATIONS
124
+ * SQLite3::Database#type_translation= will be deprecated in the future with
125
+ no replacement.
126
+ * SQlite3::Version will be deprecated in 2.0.0 with SQLite3::VERSION as the
127
+ replacement.
128
+
129
+ === 1.3.1 / 2010-07-09
130
+
131
+ * Enhancements
132
+ * Custom collations may be defined using SQLite3::Database#collation
133
+
134
+ * Bugfixes
135
+ * Statements returning 0 columns are automatically stepped. [RF #28308]
136
+ * SQLite3::Database#encoding works on 1.8 and 1.9
137
+
138
+ === 1.3.0 / 2010-06-06
139
+
140
+ * Enhancements
141
+ * Complete rewrite of C-based adapter from SWIG to hand-crafted one [tenderlove]
142
+ See API_CHANGES document for details.
143
+ This closes: Bug #27300, Bug #27241, Patch #16020
144
+ * Improved UTF, Unicode, M17N, all that handling and proper BLOB handling [tenderlove, nurse]
145
+ * Added support for type translations [tenderlove]
146
+
147
+ @db.translator.add_translator('sometime') do |type, thing|
148
+ 'output' # this will be returned as value for that column
149
+ end
150
+
151
+ * Experimental
152
+ * Added API to access and load extensions. [kashif]
153
+ These functions maps directly into SQLite3 own enable_load_extension()
154
+ and load_extension() C-API functions. See SQLite3::Database API documentation for details.
155
+ This closes: Patches #9178
156
+
157
+ * Bugfixes
158
+ * Corrected gem dependencies (runtime and development)
159
+ * Fixed threaded tests [Alexey Borzenkov]
160
+ * Removed GitHub gemspec
161
+ * Fixed "No definition for" warnings from RDoc
162
+ * Generate zip and tgz files for releases
163
+ * Added Luis Lavena as gem Author (maintainer)
164
+ * Prevent mkmf interfere with Mighty Snow Leopard
165
+ * Allow extension compilation search for common lib paths [kashif]
166
+ (lookup /usr/local, /opt/local and /usr)
167
+ * Corrected extension compilation under MSVC [romuloceccon]
168
+ * Define load_extension functionality based on availability [tenderlove]
169
+ * Deprecation notices for Database#query. Fixes RF #28192
170
+
171
+ === 1.3.0.beta.2 / 2010-05-15
172
+
173
+ * Enhancements
174
+ * Added support for type translations [tenderlove]
175
+
176
+ @db.translator.add_translator('sometime') do |type, thing|
177
+ 'output' # this will be returned as value for that column
178
+ end
179
+
180
+ * Bugfixes
181
+ * Allow extension compilation search for common lib paths [kashif]
182
+ (lookup /usr/local, /opt/local and /usr)
183
+ * Corrected extension compilation under MSVC [romuloceccon]
184
+ * Define load_extension functionality based on availability [tenderlove]
185
+ * Deprecation notices for Database#query. Fixes RF #28192
186
+
187
+ === 1.3.0.beta.1 / 2010-05-10
188
+
189
+ * Enhancements
190
+ * Complete rewrite of C-based adapter from SWIG to hand-crafted one [tenderlove]
191
+ See API_CHANGES document for details.
192
+ This closes: Bug #27300, Bug #27241, Patch #16020
193
+ * Improved UTF, Unicode, M17N, all that handling and proper BLOB handling [tenderlove, nurse]
194
+
195
+ * Experimental
196
+ * Added API to access and load extensions. [kashif]
197
+ These functions maps directly into SQLite3 own enable_load_extension()
198
+ and load_extension() C-API functions. See SQLite3::Database API documentation for details.
199
+ This closes: Patches #9178
200
+
201
+ * Bugfixes
202
+ * Corrected gem dependencies (runtime and development)
203
+ * Fixed threaded tests [Alexey Borzenkov]
204
+ * Removed GitHub gemspec
205
+ * Fixed "No definition for" warnings from RDoc
206
+ * Generate zip and tgz files for releases
207
+ * Added Luis Lavena as gem Author (maintainer)
208
+ * Prevent mkmf interfere with Mighty Snow Leopard
209
+
210
+ === 1.2.5 / 25 Jul 2009
211
+
212
+ * Check for illegal nil before executing SQL [Erik Veenstra]
213
+ * Switch to Hoe for gem task management and packaging.
214
+ * Advertise rake-compiler as development dependency.
215
+ * Build gem binaries for Windows.
216
+ * Improved Ruby 1.9 support compatibility.
217
+ * Taint returned values. Patch #20325.
218
+ * Database.open and Database.new now take an optional block [Gerrit Kaiser]
219
+
220
+
221
+ === 1.2.4.1 (internal) / 5 Jul 2009
222
+
223
+ * Check for illegal nil before executing SQL [Erik Veenstra]
224
+ * Switch to Hoe for gem task management and packaging.
225
+ * Advertise rake-compiler as development dependency.
226
+ * Build gem binaries for Windows.
227
+ * Improved Ruby 1.9 support compatibility.
228
+
229
+
230
+ === 1.2.4 / 27 Aug 2008
231
+
232
+ * Package the updated C file for source builds. [Jamis Buck]
233
+
234
+
235
+ === 1.2.3 / 26 Aug 2008
236
+
237
+ * Fix incorrect permissions on database.rb and translator.rb [Various]
238
+
239
+ * Avoid using Object#extend for greater speedups [Erik Veenstra]
240
+
241
+ * Ruby 1.9 compatibility tweaks for Array#zip [jimmy88@gmail.com]
242
+
243
+ * Fix linking against Ruby 1.8.5 [Rob Holland <rob@inversepath.com>]
244
+
245
+
246
+ === 1.2.2 / 31 May 2008
247
+
248
+ * Make the table_info method adjust the returned default value for the rows
249
+ so that the sqlite3 change in 3.3.8 and greater can be handled
250
+ transparently [Jamis Buck <jamis@37signals.com>]
251
+
252
+ * Ruby 1.9 compatibility tweaks [Roman Le Negrate <roman2k@free.fr>]
253
+
254
+ * Various performance enhancements [thanks Erik Veenstra]
255
+
256
+ * Correct busy_handler documentation [Rob Holland <rob@inversepath.com>]
257
+
258
+ * Use int_bind64 on Fixnum values larger than a 32bit C int can take. [Rob Holland <rob@inversepath.com>]
259
+
260
+ * Work around a quirk in SQLite's error reporting by calling sqlite3_reset
261
+ to produce a more informative error code upon a failure from
262
+ sqlite3_step. [Rob Holland <rob@inversepath.com>]
263
+
264
+ * Various documentation, test, and style tweaks [Rob Holland <rob@inversepath.com>]
265
+
266
+ * Be more granular with time/data translation [Rob Holland <rob@inversepath.com>]
267
+
268
+ * Use Date directly for parsing rather than going via Time [Rob Holland <rob@inversepath.com>]
269
+
270
+ * Check for the rt library and fdatasync so we link against that when
271
+ needed [Rob Holland <rob@inversepath.com>]
272
+
273
+ * Rename data structures to avoid collision on win32. based on patch
274
+ by: Luis Lavena [Rob Holland <rob@inversepath.com>]
275
+
276
+ * Add test for defaults [Daniel Rodríguez Troitiño]
277
+
278
+ * Correctly unquote double-quoted pragma defaults [Łukasz Dargiewicz <lukasz.dargiewicz@gmail.com>]
data/ChangeLog.cvs ADDED
@@ -0,0 +1,88 @@
1
+ 2005-01-05 09:40 minam
2
+
3
+ * Rakefile, sqlite3-ruby-win32.gemspec, sqlite3-ruby.gemspec: Added
4
+ win32 gem.
5
+
6
+ 2005-01-05 07:31 minam
7
+
8
+ * Rakefile, test/tc_integration.rb, test/tests.rb: Added
9
+ native-vs-dl benchmark to Rakefile. Added SQLITE3_DRIVERS
10
+ environment variable to integration test to specify which
11
+ driver(s) should be tested (defaults to "Native").
12
+
13
+ 2005-01-04 14:26 minam
14
+
15
+ * ext/sqlite3_api/sqlite3_api.i, lib/sqlite3/database.rb,
16
+ lib/sqlite3/driver/native/driver.rb, test/tc_database.rb,
17
+ test/tc_integration.rb, test/tests.rb: Unit tests: done. Bugs:
18
+ fixed.
19
+
20
+ 2005-01-03 23:13 minam
21
+
22
+ * ext/sqlite3_api/sqlite3_api.i, lib/sqlite3/database.rb,
23
+ lib/sqlite3/driver/dl/driver.rb,
24
+ lib/sqlite3/driver/native/driver.rb, test/tc_integration.rb:
25
+ Custom functions (aggregate and otherwise) are supported by the
26
+ native driver now. Test cases for the same.
27
+
28
+ 2005-01-03 13:51 minam
29
+
30
+ * ext/sqlite3_api/MANIFEST, ext/sqlite3_api/extconf.rb,
31
+ ext/sqlite3_api/post-clean.rb, ext/sqlite3_api/post-distclean.rb,
32
+ ext/sqlite3_api/sqlite3_api.i, lib/sqlite3/database.rb,
33
+ lib/sqlite3/resultset.rb, lib/sqlite3/version.rb,
34
+ lib/sqlite3/driver/dl/driver.rb,
35
+ lib/sqlite3/driver/native/driver.rb, test/native-vs-dl.rb,
36
+ test/tc_integration.rb: Added preliminary implementation of
37
+ native driver (swig-based), and integration tests.
38
+
39
+ 2004-12-29 19:37 minam
40
+
41
+ * lib/sqlite3/driver/dl/driver.rb: Some fixes to allow the DL
42
+ driver to work with Ruby 1.8.1.
43
+
44
+ 2004-12-29 14:52 minam
45
+
46
+ * lib/sqlite3/: database.rb, version.rb: Made #quote a class method
47
+ (again). Bumped version to 0.6.
48
+
49
+ 2004-12-25 22:59 minam
50
+
51
+ * lib/sqlite3/driver/dl/api.rb: Added check for darwin in supported
52
+ platforms (thanks to bitsweat).
53
+
54
+ 2004-12-22 12:38 minam
55
+
56
+ * Rakefile: Rakefile wasn't packaging the README file.
57
+
58
+ 2004-12-21 22:28 minam
59
+
60
+ * Rakefile, sqlite3-ruby.gemspec, test/bm.rb: Packaging now works.
61
+ Added benchmarks.
62
+
63
+ 2004-12-21 21:45 minam
64
+
65
+ * LICENSE, README, Rakefile, setup.rb, sqlite3-ruby.gemspec,
66
+ doc/faq/faq.rb, doc/faq/faq.yml, lib/sqlite3.rb,
67
+ lib/sqlite3/statement.rb, lib/sqlite3/constants.rb,
68
+ lib/sqlite3/database.rb, lib/sqlite3/resultset.rb,
69
+ lib/sqlite3/translator.rb, lib/sqlite3/value.rb,
70
+ lib/sqlite3/version.rb, lib/sqlite3/errors.rb,
71
+ lib/sqlite3/pragmas.rb, lib/sqlite3/driver/dl/api.rb,
72
+ lib/sqlite3/driver/dl/driver.rb, test/mocks.rb,
73
+ test/tc_database.rb, test/tests.rb, test/driver/dl/tc_driver.rb:
74
+ Initial import
75
+
76
+ 2004-12-21 21:45 minam
77
+
78
+ * LICENSE, README, Rakefile, setup.rb, sqlite3-ruby.gemspec,
79
+ doc/faq/faq.rb, doc/faq/faq.yml, lib/sqlite3.rb,
80
+ lib/sqlite3/statement.rb, lib/sqlite3/constants.rb,
81
+ lib/sqlite3/database.rb, lib/sqlite3/resultset.rb,
82
+ lib/sqlite3/translator.rb, lib/sqlite3/value.rb,
83
+ lib/sqlite3/version.rb, lib/sqlite3/errors.rb,
84
+ lib/sqlite3/pragmas.rb, lib/sqlite3/driver/dl/api.rb,
85
+ lib/sqlite3/driver/dl/driver.rb, test/mocks.rb,
86
+ test/tc_database.rb, test/tests.rb, test/driver/dl/tc_driver.rb:
87
+ Initial revision
88
+
data/Gemfile ADDED
@@ -0,0 +1,15 @@
1
+ # -*- ruby -*-
2
+
3
+ # DO NOT EDIT THIS FILE. Instead, edit Rakefile, and run `rake bundler:gemfile`.
4
+
5
+ source "https://rubygems.org/"
6
+
7
+
8
+ gem "mini_portile", "~>0.6.1", :group => [:development, :test]
9
+ gem "minitest", "~>5.4", :group => [:development, :test]
10
+ gem "hoe-bundler", "~>1.0", :group => [:development, :test]
11
+ gem "rake-compiler", "~>0.9.3", :group => [:development, :test]
12
+ gem "rdoc", "~>4.0", :group => [:development, :test]
13
+ gem "hoe", "~>3.12", :group => [:development, :test]
14
+
15
+ # vim: syntax=ruby
data/LICENSE ADDED
@@ -0,0 +1,34 @@
1
+ Copyright (c) 2004, Jamis Buck (jamis@jamisbuck.org)
2
+ All rights reserved.
3
+
4
+ Redistribution and use in source and binary forms, with or without
5
+ modification, are permitted provided that the following conditions are met:
6
+
7
+ * Redistributions of source code must retain the above copyright notice,
8
+ this list of conditions and the following disclaimer.
9
+
10
+ * Redistributions in binary form must reproduce the above copyright
11
+ notice, this list of conditions and the following disclaimer in the
12
+ documentation and/or other materials provided with the distribution.
13
+
14
+ * The names of its contributors may not be used to endorse or promote
15
+ products derived from this software without specific prior written
16
+ permission.
17
+
18
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
22
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
25
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
26
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
+
29
+ Parts of this code are exempt from the above copyright. This includes the following
30
+ files, that are original work of Richard D. Hipp and other contributors. Their
31
+ non-copyright is contained in those files.
32
+
33
+ - ext/sqlite3/sqlite3.h
34
+ - ext/sqlite3/sqlite3amalgamation.c
data/Manifest.txt ADDED
@@ -0,0 +1,52 @@
1
+ API_CHANGES.rdoc
2
+ CHANGELOG.rdoc
3
+ ChangeLog.cvs
4
+ Gemfile
5
+ LICENSE
6
+ Manifest.txt
7
+ README.rdoc
8
+ Rakefile
9
+ ext/sqlite3/backup.c
10
+ ext/sqlite3/backup.h
11
+ ext/sqlite3/database.c
12
+ ext/sqlite3/database.h
13
+ ext/sqlite3/exception.c
14
+ ext/sqlite3/exception.h
15
+ ext/sqlite3/extconf.rb
16
+ ext/sqlite3/sqlite3.c
17
+ ext/sqlite3/sqlite3_ruby.h
18
+ ext/sqlite3/statement.c
19
+ ext/sqlite3/statement.h
20
+ faq/faq.rb
21
+ faq/faq.yml
22
+ lib/sqlite3.rb
23
+ lib/sqlite3/constants.rb
24
+ lib/sqlite3/database.rb
25
+ lib/sqlite3/errors.rb
26
+ lib/sqlite3/pragmas.rb
27
+ lib/sqlite3/resultset.rb
28
+ lib/sqlite3/statement.rb
29
+ lib/sqlite3/translator.rb
30
+ lib/sqlite3/value.rb
31
+ lib/sqlite3/version.rb
32
+ setup.rb
33
+ tasks/faq.rake
34
+ tasks/gem.rake
35
+ tasks/native.rake
36
+ tasks/vendor_sqlite3.rake
37
+ test/helper.rb
38
+ test/test_backup.rb
39
+ test/test_collation.rb
40
+ test/test_database.rb
41
+ test/test_database_readonly.rb
42
+ test/test_deprecated.rb
43
+ test/test_encoding.rb
44
+ test/test_integration.rb
45
+ test/test_integration_open_close.rb
46
+ test/test_integration_pending.rb
47
+ test/test_integration_resultset.rb
48
+ test/test_integration_statement.rb
49
+ test/test_result_set.rb
50
+ test/test_sqlite3.rb
51
+ test/test_statement.rb
52
+ test/test_statement_execute.rb
data/README.rdoc ADDED
@@ -0,0 +1,90 @@
1
+ = SQLite3/Ruby Interface
2
+
3
+ * https://github.com/sparklemotion/sqlite3-ruby
4
+ * http://groups.google.com/group/sqlite3-ruby
5
+ * http://rubygems.org/gems/sqlite3
6
+ * http://www.rubydoc.info/gems/sqlite3/frames
7
+ * https://github.com/radiospiel/sqlite3-full
8
+
9
+ == DESCRIPTION
10
+
11
+ This module allows Ruby programs to interface with the SQLite3
12
+ database engine (http://www.sqlite.org). You must have the
13
+ SQLite engine installed in order to build this module.
14
+
15
+ == INTEGRATED Sqlite3 distribution
16
+
17
+ This gem (sqlite3-full) differs from sqlite3 only in so far, as it embeds
18
+ a standardized sqlite3 engine: instead of compiling against whatever version
19
+ exists on the target system this gem comes always with the same feature set.
20
+
21
+ The current feature set includes:
22
+
23
+ - The SOUNDEX extension (https://www.sqlite.org/lang_corefunc.html#soundex)
24
+ - The FTS3 and FTS4 fulltext search extensions (http://www.sqlite.org/fts3.html)
25
+ - The RTREE index extension (http://www.sqlite.org/rtree.html)
26
+
27
+ == SYNOPSIS
28
+
29
+ require "sqlite3"
30
+
31
+ # Open a database
32
+ db = SQLite3::Database.new "test.db"
33
+
34
+ # Create a database
35
+ rows = db.execute <<-SQL
36
+ create table numbers (
37
+ name varchar(30),
38
+ val int
39
+ );
40
+ SQL
41
+
42
+ # Execute a few inserts
43
+ {
44
+ "one" => 1,
45
+ "two" => 2,
46
+ }.each do |pair|
47
+ db.execute "insert into numbers values ( ?, ? )", pair
48
+ end
49
+
50
+ # Execute inserts with parameter markers
51
+ db.execute("INSERT INTO students (name, email, grade, blog)
52
+ VALUES (?, ?, ?, ?)", [@name, @email, @grade, @blog])
53
+
54
+ # Find a few rows
55
+ db.execute( "select * from numbers" ) do |row|
56
+ p row
57
+ end
58
+
59
+
60
+ == Compilation and Installation
61
+
62
+ gem install sqlite3-full
63
+
64
+ = SUPPORT!!!
65
+
66
+ == OMG! Something has gone wrong! Where do I get help?
67
+
68
+ If you can replicate the bug with the sqlite3-ruby gem, the best place to get help might be the
69
+ {sqlite3-ruby mailing list}[http://groups.google.com/group/sqlite3-ruby] which
70
+ can be found here:
71
+
72
+ * http://groups.google.com/group/sqlite3-ruby
73
+
74
+ Otherwise file the bug at sqlite3-full's bugtracker here:
75
+
76
+ * https://github.com/radiospiel/sqlite3-full/issues
77
+
78
+ == Usage
79
+
80
+ For help figuring out the SQLite3/Ruby interface, check out the
81
+ SYNOPSIS as well as the RDoc. It includes examples of
82
+ usage. If you have any questions that you feel should be address in the
83
+ FAQ, please send them to {the mailing list}[http://groups.google.com/group/sqlite3-ruby]
84
+
85
+ == Source Code
86
+
87
+ The source repository is accessible via git:
88
+
89
+ git clone git://github.com/radiospiel/sqlite3-full.git
90
+
data/Rakefile ADDED
@@ -0,0 +1,10 @@
1
+ #
2
+ # NOTE: Keep this file clean.
3
+ # Add your customizations inside tasks directory.
4
+ # Thank You.
5
+ #
6
+
7
+ # load rakefile extensions (tasks)
8
+ Dir['tasks/*.rake'].sort.each { |f| load f }
9
+
10
+ # vim: syntax=ruby