sqlite3-static 3.12.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 6cb1eac344f86c7f00a38e165d917a7b33fc6d8d
4
+ data.tar.gz: c4f6e363c482f6785d451f9ed99de61de026d189
5
+ SHA512:
6
+ metadata.gz: daefe73909d8a24d209f5971d290b302d9077bb2a8131f26c0d6ce79a04b91d6326ffd2a80229e5efbc9e59eb034756fd3fa1e5537391304a494be1598b496dd
7
+ data.tar.gz: c1b44f636a7577bf3afedb1bedb4ac7cafa22b293caa89d978a9a7fa7cff978ae06f4bdd3f7f21c3af1a08a14475d02aeaf6c16553fac67d261708fbbae14619
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,287 @@
1
+ === 1.3.11 / 2015-10-10
2
+
3
+ * Enhancements:
4
+ * Windows: build against SQLite 3.8.11.1
5
+
6
+ * Internal:
7
+ * Use rake-compiler-dock to build Windows binaries. Pull #159 [larskanis]
8
+ * Expand Ruby versions being tested for Travis and AppVeyor
9
+
10
+ === 1.3.10 / 2014-10-30
11
+
12
+ * Enhancements:
13
+ * Windows: build against SQLite 3.8.6. Closes #135 [Hubro]
14
+
15
+ === 1.3.9 / 2014-02-25
16
+
17
+ * Bugfixes:
18
+ * Reset exception message. Closes #80
19
+ * Reduce warnings due unused pointers. Closes #89
20
+ * Add BSD-3 license reference to gemspec. Refs #99 and #106
21
+
22
+ === 1.3.8 / 2013-08-17
23
+
24
+ * Enhancements:
25
+ * Windows: build against SQLite 3.7.17
26
+
27
+ * Bugfixes:
28
+ * Reset exception message. Closes #80
29
+ * Correctly convert BLOB values to Ruby. Closes #65
30
+ * Add MIT license reference to gemspec. Closes #99
31
+ * Remove unused pointer. Closes #89
32
+
33
+ * Internal:
34
+ * Backport improvements in cross compilation for Windows
35
+ * Use of Minitest for internal tests
36
+ * Use Gemfile (generated by Hoe) to deal with dependencies
37
+ * Cleanup Travis CI
38
+
39
+ === 1.3.7 / 2013-01-11
40
+
41
+ * Bugfixes
42
+ * Closing a bad statement twice will not segv.
43
+ * Aggregate handlers are initialized on each query. Closes #44
44
+
45
+ * Internal
46
+ * Unset environment variables that could affect cross compilation.
47
+
48
+ === 1.3.6 / 2012-04-16
49
+
50
+ * Enhancements
51
+ * Windows: build against SQLite 3.7.11
52
+ * Added SQLite3::ResultSet#each_hash for fetching each row as a hash.
53
+ * Added SQLite3::ResultSet#next_hash for fetching one row as a hash.
54
+
55
+ * Bugfixes
56
+ * Support both UTF-16LE and UTF-16BE encoding modes on PPC. Closes #63
57
+ * Protect parameters to custom functions from being garbage collected too
58
+ soon. Fixes #60. Thanks hirataya!
59
+ * Fix backwards compatibility with 1.2.5 with bind vars and `query` method.
60
+ Fixes #35.
61
+ * Fix double definition error caused by defining sqlite3_int64/uint64.
62
+ * Fix suspicious version regexp.
63
+
64
+ * Deprecations
65
+ * ArrayWithTypesAndFields#types is deprecated and the class will be removed
66
+ in version 2.0.0. Please use the `types` method on the ResultSet class
67
+ that created this object.
68
+ * ArrayWithTypesAndFields#fields is deprecated and the class will be removed
69
+ in version 2.0.0. Please use the `columns` method on the ResultSet class
70
+ that created this object.
71
+ * The ArrayWithTypesAndFields class will be removed in 2.0.0
72
+ * The ArrayWithTypes class will be removed in 2.0.0
73
+ * HashWithTypesAndFields#types is deprecated and the class will be removed
74
+ in version 2.0.0. Please use the `types` method on the ResultSet class
75
+ that created this object.
76
+ * HashWithTypesAndFields#fields is deprecated and the class will be removed
77
+ in version 2.0.0. Please use the `columns` method on the ResultSet class
78
+ that created this object.
79
+
80
+ === 1.3.5 / 2011-12-03 - ZOMG Holidays are here Edition!
81
+
82
+ * Enhancements
83
+ * Windows: build against SQLite 3.7.9
84
+ * Static: enable SQLITE_ENABLE_COLUMN_METADATA
85
+ * Added Statement#clear_bindings! to set bindings back to nil
86
+
87
+ * Bugfixes
88
+ * Fixed a segv on Database.new. Fixes #34 (thanks nobu!)
89
+ * Database error is not reset, so don't check it in Statement#reset!
90
+ * Remove conditional around Bignum statement bindings.
91
+ Fixes #52. Fixes #56. Thank you Evgeny Myasishchev.
92
+
93
+ * Internal
94
+ * Use proper endianness when testing database connection with UTF-16.
95
+ Fixes #40. Fixes #51
96
+ * Use -fPIC for static compilation when host is x86_64.
97
+
98
+ === 1.3.4 / 2011-07-25
99
+
100
+ * Enhancements:
101
+ * Windows: build against SQLite 3.7.7.1
102
+ * Windows: build static binaries that do not depend on sqlite3.dll be
103
+ installed anymore
104
+
105
+ * Bugfixes
106
+ * Backup API is conditionaly required so that older libsqlite3 can be used.
107
+ Thanks Hongli Lai.
108
+ * Fixed segmentation fault when nil is passed to SQLite3::Statement.new
109
+ * Fix extconf's hardcoded path that affected installation on certain systems.
110
+
111
+ === 1.3.3 / 2010-01-16
112
+
113
+ * Bugfixes
114
+ * Abort on installation if sqlite3_backup_init is missing. Fixes #19
115
+ * Gem has been renamed to 'sqlite3'. Please use `gem install sqlite3`
116
+
117
+ === 1.3.2 / 2010-10-30 / RubyConf Uruguay Edition!
118
+
119
+ * Enhancements:
120
+ * Windows: build against 3.7.3 version of SQLite3
121
+ * SQLite3::Database can now be open as readonly
122
+
123
+ db = SQLite3::Database.new('my.db', :readonly => true)
124
+
125
+ * Added SQLite3::SQLITE_VERSION and SQLite3::SQLITE_VERSION_NUMBER [nurse]
126
+
127
+ * Bugfixes
128
+ * type_translation= works along with Database#execute and a block
129
+ * defined functions are kept in a hash to prevent GC. #7
130
+ * Removed GCC specific flags from extconf.
131
+
132
+ * DEPRECATIONS
133
+ * SQLite3::Database#type_translation= will be deprecated in the future with
134
+ no replacement.
135
+ * SQlite3::Version will be deprecated in 2.0.0 with SQLite3::VERSION as the
136
+ replacement.
137
+
138
+ === 1.3.1 / 2010-07-09
139
+
140
+ * Enhancements
141
+ * Custom collations may be defined using SQLite3::Database#collation
142
+
143
+ * Bugfixes
144
+ * Statements returning 0 columns are automatically stepped. [RF #28308]
145
+ * SQLite3::Database#encoding works on 1.8 and 1.9
146
+
147
+ === 1.3.0 / 2010-06-06
148
+
149
+ * Enhancements
150
+ * Complete rewrite of C-based adapter from SWIG to hand-crafted one [tenderlove]
151
+ See API_CHANGES document for details.
152
+ This closes: Bug #27300, Bug #27241, Patch #16020
153
+ * Improved UTF, Unicode, M17N, all that handling and proper BLOB handling [tenderlove, nurse]
154
+ * Added support for type translations [tenderlove]
155
+
156
+ @db.translator.add_translator('sometime') do |type, thing|
157
+ 'output' # this will be returned as value for that column
158
+ end
159
+
160
+ * Experimental
161
+ * Added API to access and load extensions. [kashif]
162
+ These functions maps directly into SQLite3 own enable_load_extension()
163
+ and load_extension() C-API functions. See SQLite3::Database API documentation for details.
164
+ This closes: Patches #9178
165
+
166
+ * Bugfixes
167
+ * Corrected gem dependencies (runtime and development)
168
+ * Fixed threaded tests [Alexey Borzenkov]
169
+ * Removed GitHub gemspec
170
+ * Fixed "No definition for" warnings from RDoc
171
+ * Generate zip and tgz files for releases
172
+ * Added Luis Lavena as gem Author (maintainer)
173
+ * Prevent mkmf interfere with Mighty Snow Leopard
174
+ * Allow extension compilation search for common lib paths [kashif]
175
+ (lookup /usr/local, /opt/local and /usr)
176
+ * Corrected extension compilation under MSVC [romuloceccon]
177
+ * Define load_extension functionality based on availability [tenderlove]
178
+ * Deprecation notices for Database#query. Fixes RF #28192
179
+
180
+ === 1.3.0.beta.2 / 2010-05-15
181
+
182
+ * Enhancements
183
+ * Added support for type translations [tenderlove]
184
+
185
+ @db.translator.add_translator('sometime') do |type, thing|
186
+ 'output' # this will be returned as value for that column
187
+ end
188
+
189
+ * Bugfixes
190
+ * Allow extension compilation search for common lib paths [kashif]
191
+ (lookup /usr/local, /opt/local and /usr)
192
+ * Corrected extension compilation under MSVC [romuloceccon]
193
+ * Define load_extension functionality based on availability [tenderlove]
194
+ * Deprecation notices for Database#query. Fixes RF #28192
195
+
196
+ === 1.3.0.beta.1 / 2010-05-10
197
+
198
+ * Enhancements
199
+ * Complete rewrite of C-based adapter from SWIG to hand-crafted one [tenderlove]
200
+ See API_CHANGES document for details.
201
+ This closes: Bug #27300, Bug #27241, Patch #16020
202
+ * Improved UTF, Unicode, M17N, all that handling and proper BLOB handling [tenderlove, nurse]
203
+
204
+ * Experimental
205
+ * Added API to access and load extensions. [kashif]
206
+ These functions maps directly into SQLite3 own enable_load_extension()
207
+ and load_extension() C-API functions. See SQLite3::Database API documentation for details.
208
+ This closes: Patches #9178
209
+
210
+ * Bugfixes
211
+ * Corrected gem dependencies (runtime and development)
212
+ * Fixed threaded tests [Alexey Borzenkov]
213
+ * Removed GitHub gemspec
214
+ * Fixed "No definition for" warnings from RDoc
215
+ * Generate zip and tgz files for releases
216
+ * Added Luis Lavena as gem Author (maintainer)
217
+ * Prevent mkmf interfere with Mighty Snow Leopard
218
+
219
+ === 1.2.5 / 25 Jul 2009
220
+
221
+ * Check for illegal nil before executing SQL [Erik Veenstra]
222
+ * Switch to Hoe for gem task management and packaging.
223
+ * Advertise rake-compiler as development dependency.
224
+ * Build gem binaries for Windows.
225
+ * Improved Ruby 1.9 support compatibility.
226
+ * Taint returned values. Patch #20325.
227
+ * Database.open and Database.new now take an optional block [Gerrit Kaiser]
228
+
229
+
230
+ === 1.2.4.1 (internal) / 5 Jul 2009
231
+
232
+ * Check for illegal nil before executing SQL [Erik Veenstra]
233
+ * Switch to Hoe for gem task management and packaging.
234
+ * Advertise rake-compiler as development dependency.
235
+ * Build gem binaries for Windows.
236
+ * Improved Ruby 1.9 support compatibility.
237
+
238
+
239
+ === 1.2.4 / 27 Aug 2008
240
+
241
+ * Package the updated C file for source builds. [Jamis Buck]
242
+
243
+
244
+ === 1.2.3 / 26 Aug 2008
245
+
246
+ * Fix incorrect permissions on database.rb and translator.rb [Various]
247
+
248
+ * Avoid using Object#extend for greater speedups [Erik Veenstra]
249
+
250
+ * Ruby 1.9 compatibility tweaks for Array#zip [jimmy88@gmail.com]
251
+
252
+ * Fix linking against Ruby 1.8.5 [Rob Holland <rob@inversepath.com>]
253
+
254
+
255
+ === 1.2.2 / 31 May 2008
256
+
257
+ * Make the table_info method adjust the returned default value for the rows
258
+ so that the sqlite3 change in 3.3.8 and greater can be handled
259
+ transparently [Jamis Buck <jamis@37signals.com>]
260
+
261
+ * Ruby 1.9 compatibility tweaks [Roman Le Negrate <roman2k@free.fr>]
262
+
263
+ * Various performance enhancements [thanks Erik Veenstra]
264
+
265
+ * Correct busy_handler documentation [Rob Holland <rob@inversepath.com>]
266
+
267
+ * Use int_bind64 on Fixnum values larger than a 32bit C int can take. [Rob Holland <rob@inversepath.com>]
268
+
269
+ * Work around a quirk in SQLite's error reporting by calling sqlite3_reset
270
+ to produce a more informative error code upon a failure from
271
+ sqlite3_step. [Rob Holland <rob@inversepath.com>]
272
+
273
+ * Various documentation, test, and style tweaks [Rob Holland <rob@inversepath.com>]
274
+
275
+ * Be more granular with time/data translation [Rob Holland <rob@inversepath.com>]
276
+
277
+ * Use Date directly for parsing rather than going via Time [Rob Holland <rob@inversepath.com>]
278
+
279
+ * Check for the rt library and fdatasync so we link against that when
280
+ needed [Rob Holland <rob@inversepath.com>]
281
+
282
+ * Rename data structures to avoid collision on win32. based on patch
283
+ by: Luis Lavena [Rob Holland <rob@inversepath.com>]
284
+
285
+ * Add test for defaults [Daniel Rodríguez Troitiño]
286
+
287
+ * Correctly unquote double-quoted pragma defaults [Łukasz Dargiewicz <lukasz.dargiewicz@gmail.com>]
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,100 @@
1
+ = SQLite3/Ruby Interface with embedded SQLite3 library
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
+
8
+ == DESCRIPTION
9
+
10
+ This module allows Ruby programs to interface with the SQLite3
11
+ database engine (http://www.sqlite.org). You must have the
12
+ SQLite engine installed in order to build this module.
13
+
14
+ This module embeds its own SQLite3 library built from the SQLite
15
+ amalgamation, so it doesn't have any external dependencies
16
+
17
+ == SYNOPSIS
18
+
19
+ require "sqlite3"
20
+
21
+ # Open a database
22
+ db = SQLite3::Database.new "test.db"
23
+
24
+ # Create a table
25
+ rows = db.execute <<-SQL
26
+ create table numbers (
27
+ name varchar(30),
28
+ val int
29
+ );
30
+ SQL
31
+
32
+ # Execute a few inserts
33
+ {
34
+ "one" => 1,
35
+ "two" => 2,
36
+ }.each do |pair|
37
+ db.execute "insert into numbers values ( ?, ? )", pair
38
+ end
39
+
40
+ # Create another table with multiple columns
41
+
42
+ db.execute <<-SQL
43
+ create table students (
44
+ name varchar(50),
45
+ email varchar(50),
46
+ grade varchar(5),
47
+ blog varchar(50)
48
+ );
49
+ SQL
50
+
51
+ # Execute inserts with parameter markers
52
+ db.execute("INSERT INTO students (name, email, grade, blog)
53
+ VALUES (?, ?, ?, ?)", ["Jane", "me@janedoe.com", "A", "http://blog.janedoe.com"])
54
+
55
+ # Find a few rows
56
+ db.execute( "select * from numbers" ) do |row|
57
+ p row
58
+ end
59
+
60
+
61
+ == Compilation and Installation
62
+
63
+ Do the following:
64
+
65
+ ruby setup.rb config
66
+ ruby setup.rb setup
67
+ ruby setup.rb install
68
+
69
+ = SUPPORT!!!
70
+
71
+ == OMG! Something has gone wrong! Where do I get help?
72
+
73
+ The best place to get help is from the
74
+ {sqlite3-ruby mailing list}[http://groups.google.com/group/sqlite3-ruby] which
75
+ can be found here:
76
+
77
+ * http://groups.google.com/group/sqlite3-ruby
78
+
79
+ == I've found a bug! Where do I file it?
80
+
81
+ Uh oh. After contacting the mailing list, you've found that you've actually
82
+ discovered a bug. You can file the bug at the
83
+ {github issues page}[https://github.com/sparklemotion/sqlite3-ruby/issues]
84
+ which can be found here:
85
+
86
+ * https://github.com/sparklemotion/sqlite3-ruby/issues
87
+
88
+ == Usage
89
+
90
+ For help figuring out the SQLite3/Ruby interface, check out the
91
+ SYNOPSIS as well as the RDoc. It includes examples of
92
+ usage. If you have any questions that you feel should be address in the
93
+ FAQ, please send them to {the mailing list}[http://groups.google.com/group/sqlite3-ruby]
94
+
95
+ == Source Code
96
+
97
+ The source repository is accessible via git:
98
+
99
+ git clone git://github.com/sparklemotion/sqlite3-ruby.git
100
+