amalgalite 1.1.2 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. checksums.yaml +15 -0
  2. data/CONTRIBUTING.md +49 -0
  3. data/{HISTORY.rdoc → HISTORY.md} +96 -73
  4. data/LICENSE +2 -2
  5. data/Manifest.txt +104 -0
  6. data/README.md +73 -0
  7. data/Rakefile +25 -0
  8. data/TODO.md +50 -0
  9. data/ext/amalgalite/{amalgalite3.c → c/amalgalite.c} +12 -12
  10. data/ext/amalgalite/{amalgalite3.h → c/amalgalite.h} +5 -5
  11. data/ext/amalgalite/{amalgalite3_blob.c → c/amalgalite_blob.c} +2 -2
  12. data/ext/amalgalite/{amalgalite3_constants.c → c/amalgalite_constants.c} +2 -2
  13. data/ext/amalgalite/{amalgalite3_database.c → c/amalgalite_database.c} +49 -21
  14. data/ext/amalgalite/{amalgalite3_requires_bootstrap.c → c/amalgalite_requires_bootstrap.c} +131 -58
  15. data/ext/amalgalite/{amalgalite3_statement.c → c/amalgalite_statement.c} +2 -2
  16. data/ext/amalgalite/{extconf.rb → c/extconf.rb} +4 -4
  17. data/ext/amalgalite/{gen_constants.rb → c/gen_constants.rb} +3 -3
  18. data/ext/amalgalite/c/notes.txt +134 -0
  19. data/ext/amalgalite/{sqlite3.c → c/sqlite3.c} +94602 -80497
  20. data/ext/amalgalite/{sqlite3.h → c/sqlite3.h} +1047 -216
  21. data/ext/amalgalite/{sqlite3_options.h → c/sqlite3_options.h} +0 -0
  22. data/ext/amalgalite/{sqlite3ext.h → c/sqlite3ext.h} +40 -13
  23. data/lib/amalgalite.rb +13 -6
  24. data/lib/amalgalite/column.rb +7 -5
  25. data/lib/amalgalite/database.rb +18 -10
  26. data/lib/amalgalite/packer.rb +5 -2
  27. data/lib/amalgalite/requires.rb +47 -16
  28. data/lib/amalgalite/schema.rb +63 -36
  29. data/lib/amalgalite/sqlite3/version.rb +0 -1
  30. data/lib/amalgalite/statement.rb +7 -5
  31. data/lib/amalgalite/table.rb +9 -8
  32. data/lib/amalgalite/type_maps/default_map.rb +0 -1
  33. data/lib/amalgalite/type_maps/storage_map.rb +0 -2
  34. data/lib/amalgalite/type_maps/text_map.rb +0 -1
  35. data/lib/amalgalite/version.rb +3 -32
  36. data/spec/aggregate_spec.rb +1 -1
  37. data/spec/amalgalite_spec.rb +1 -1
  38. data/spec/blob_spec.rb +1 -1
  39. data/spec/boolean_spec.rb +2 -1
  40. data/spec/busy_handler.rb +1 -1
  41. data/spec/database_spec.rb +16 -11
  42. data/spec/default_map_spec.rb +1 -1
  43. data/spec/function_spec.rb +1 -1
  44. data/spec/integeration_spec.rb +2 -1
  45. data/spec/packer_spec.rb +4 -4
  46. data/spec/paths_spec.rb +1 -1
  47. data/spec/progress_handler_spec.rb +4 -5
  48. data/spec/requires_spec.rb +36 -2
  49. data/spec/rtree_spec.rb +6 -5
  50. data/spec/schema_spec.rb +28 -20
  51. data/spec/spec_helper.rb +2 -7
  52. data/spec/sqlite3/constants_spec.rb +1 -1
  53. data/spec/sqlite3/database_status_spec.rb +4 -4
  54. data/spec/sqlite3/status_spec.rb +5 -5
  55. data/spec/sqlite3/version_spec.rb +7 -7
  56. data/spec/sqlite3_spec.rb +3 -3
  57. data/spec/statement_spec.rb +3 -4
  58. data/spec/storage_map_spec.rb +1 -1
  59. data/spec/tap_spec.rb +4 -4
  60. data/spec/text_map_spec.rb +1 -1
  61. data/spec/type_map_spec.rb +1 -1
  62. data/spec/version_spec.rb +2 -9
  63. data/tasks/custom.rake +99 -0
  64. data/tasks/default.rake +277 -0
  65. data/tasks/extension.rake +28 -202
  66. data/tasks/this.rb +209 -0
  67. metadata +186 -244
  68. data/README.rdoc +0 -54
  69. data/gemspec.rb +0 -63
  70. data/tasks/announce.rake +0 -44
  71. data/tasks/config.rb +0 -107
  72. data/tasks/distribution.rake +0 -77
  73. data/tasks/documentation.rake +0 -36
  74. data/tasks/rspec.rake +0 -30
  75. data/tasks/utils.rb +0 -80
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ OGM3NjBlNGJhM2U3ZGM4YjMwMGYyZDE3NzE4OTFkNzY0ZWFmYjA0OQ==
5
+ data.tar.gz: !binary |-
6
+ YTk2NjY1YzEzNWNjY2I3YzVkMGYxODkzMGIxZWUyOTkyZmIzYWIxZQ==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ YTRjYjc0ZDMwNzZiOTYxY2U0NTc0MThiM2NmZjBjZGY0MWU0ZDdiMjdmZGVl
10
+ ZGNhMTZmZDQzZjMwNWFiMjJiZGYwMzJhMjFiY2U2NGE2ZTRhZjI3NDI5NDMy
11
+ NjU3Y2IyYWYxYjU0OWU5OWRiMThlZDg2M2QyY2JlOWFjNDdhYjE=
12
+ data.tar.gz: !binary |-
13
+ ZjU5ZGU1ZGNhMzRmMjk4NWVkMGRjOGRhNGI2ZGVhYzEwZjBkMDI3ODE0Zjgz
14
+ YmEwMzg0NjVlMTA4YWZkZmYwMDVkOTNmZDk0NmQ3NTNjOWI2YTczOGE5ZGE2
15
+ OTc4YmNhNTUwMjk1NDc5NjgwOGU0MTcyYTVkMjMxMjliZWRlNzk=
@@ -0,0 +1,49 @@
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
+ # Contributors
37
+
38
+ * [Jeremy Hinegardner](https://github.com/copiousfreetime)
39
+ * [Jos Backus](https://github.com/josb)
40
+ * [Alex Young](https://github.com/regularfry)
41
+ * [Michael Granger](https://github.com/ged)
42
+ * [Alex Young](https://github.com/bmalex)
43
+
44
+ [GitHub Account]: https://github.com/signup/free "GitHub Signup"
45
+ [GitHub Issues]: https://github.com/copiousfreetime/amalgalite/issues "Amalgalite Issues"
46
+ [new issue]: https://github.com/copiousfreetime/amalgalite/issues/new "New Amalgalite Issue"
47
+ [gist]: https://gist.github.com/ "New Gist"
48
+ [repo]: https://github.com/copiousfreetime/amalgalite "Amalgalite Repo"
49
+ [pull request]: https://help.github.com/articles/using-pull-requests "Using Pull Requests"
@@ -1,12 +1,35 @@
1
- = Amalgalite Changelog
2
- == Version 1.1.2 - 2011-04-01
1
+ # Amalgalite Changelog
2
+
3
+ ## Version 1.3.0 - 2013-03-13
4
+
5
+ ### Enhancements
6
+
7
+ * Update development dependencies to the latest levels
8
+ * Change up the development process to be inline with other projects
9
+ * Add Amalgalite::Database#import for mass execution of sql (bmalex 5a42f44f)
10
+ * Allow :memory: databases to Amalgalite::Requires (bmalex df9f70b8)
11
+ * Allow bootstrapping from an in-memory sql buffer (bmalex a17fb9cf)
12
+ * Make Amalgalite 1.9 -w clean
13
+ * Updates for Ruby 2.0
14
+
15
+ ### Bug Fixes
16
+
17
+ * Fix handling of debug flags in extconf.rb (ged #22)
18
+ * Remove deprected Config:: (github issue #23)
19
+ * Correct detection of being loaded in conjunction with 'sqlite3' gem (github issue #15)
20
+ * Fix incorrect loading/reload of schema [GH #16]
21
+ * Fix setting of LOADED_FEATRES when requiring from a database (bmalex edb81837)
22
+ * Fix setting of require_path for files to require that are stored in the * database (bmalex de321b86)
23
+
24
+ ## Version 1.1.2 - 2011-04-01
25
+
26
+ ### Bug Fixes
3
27
 
4
- === Bug Fixes
5
28
  * Remove example database that was mistakenly packaged with version 1.1.1
6
29
 
7
- == Version 1.1.1 - 2011-03-27
30
+ ## Version 1.1.1 - 2011-03-27
8
31
 
9
- === Enhancements
32
+ ### Enhancements
10
33
 
11
34
  * Update to SQLite 3.7.5
12
35
  * Enable SQLite Full Text Search compile time options FTS3 and FTS4 [github issue #10]
@@ -14,51 +37,51 @@
14
37
  * Enable STAT2 SQLite compile time option to improve ANALYZE command support
15
38
  http://www.sqlite.org/lang_analyze.html
16
39
 
17
- === Bug Fixes
40
+ ### Bug Fixes
18
41
 
19
42
  * The C coded generated by gen_constants.rb was updated to support older
20
43
  compilers [github issue #8] (patch from josb)
21
44
  * Fix 'amalgalite-pack --self' on ruby 1.9
22
45
 
23
- == Version 1.0.0 - 2011-01-16
46
+ ## Version 1.0.0 - 2011-01-16
24
47
 
25
- === Enhancements
48
+ ### Enhancements
26
49
 
27
50
  * Update to 1.0.0
28
51
  * Update to SQLite 3.7.4
29
52
  * Update all runtime and development dependencies to the latest version
30
53
 
31
- === Bug Fixes
54
+ ### Bug Fixes
32
55
 
33
56
  * Fix FasterCSV/CSV compatibility issues with ruby 1.8/1.9 [github issue #4]
34
57
  * Fix building issues for Ruby 1.9 [gitHub issue #5]
35
58
  * Fix cross compilation problems when using rvm
36
59
 
37
- == Version 0.15.0 - 2010-10-30
60
+ ## Version 0.15.0 - 2010-10-30
38
61
 
39
- === Enhancements
62
+ ### Enhancements
40
63
 
41
64
  * Update to sqlite 3.7.3
42
65
  * Added Database#import_csv_to_table
43
66
  * Added MemoryDatabase class
44
67
 
45
- === Bug Fixes
68
+ ### Bug Fixes
46
69
 
47
70
  * Unable to run specs from gem [GH Issue #3]
48
71
 
49
- == Version 0.12.1 - 2010-02-17
72
+ ## Version 0.12.1 - 2010-02-17
50
73
 
51
- === Enhancements
74
+ ### Enhancements
52
75
 
53
76
  * Update to sqlite 3.6.22
54
77
 
55
- == Version 0.12.0 - 2009-10-29
78
+ ## Version 0.12.0 - 2009-10-29
56
79
 
57
- === Enhancements
80
+ ### Enhancements
58
81
 
59
82
  * Update to sqlite 3.6.19
60
83
 
61
- === Bug Fixes
84
+ ### Bug Fixes
62
85
 
63
86
  * Improve detection of schema changes
64
87
  * Add missing development dependencies
@@ -67,131 +90,131 @@
67
90
  * Fix tracking of highwater memory usage
68
91
  * Fix testing interruptability of sqlite3 commands
69
92
 
70
- == Version 0.11.0 - 2009-08-23
93
+ ## Version 0.11.0 - 2009-08-23
71
94
 
72
- === Enhancements
95
+ ### Enhancements
73
96
 
74
97
  * Update to SQLite 3.6.17
75
98
 
76
- === Bug Fixes
99
+ ### Bug Fixes
77
100
 
78
101
  * Add compiletime vs. runtime library checking.
79
102
  * Fix missing datatypes to typemap (reported by Jay Godse)
80
103
 
81
- == Version 0.10.2 - 2009-08-10
104
+ ## Version 0.10.2 - 2009-08-10
82
105
 
83
- === Bug Fixes
106
+ ### Bug Fixes
84
107
 
85
108
  * Statement#execute was not expanding an Array passed in to the positional
86
109
  #bind parameters (reported by Steven Harris).
87
110
 
88
- == Version 0.10.1 - 2009-08-01
111
+ ## Version 0.10.1 - 2009-08-01
89
112
 
90
- === Enhancements
113
+ ### Enhancements
91
114
 
92
115
  * Add version subdirectory for extension on all platforms for building locally
93
116
  on gem install.
94
117
  * Add gem for x86-ming32 platform
95
118
  * Add specs to validate the R*Tree index is compiled correctly
96
119
 
97
- === Bug Fixes
120
+ ### Bug Fixes
98
121
 
99
122
  * Small documentation change for Amalgalite::Database#new
100
123
 
101
- == Version 0.10.0 - 2009-06-28
124
+ ## Version 0.10.0 - 2009-06-28
102
125
 
103
- === Enhancements
126
+ ### Enhancements
104
127
 
105
128
  * windows gem is now a fat binary to support installing into ruby 1.8 and 1.9
106
129
  from the same gem
107
130
  * Update to Sqlite 3.6.16 and fix errors returned by define_aggregate and
108
131
  define_function based upon update
109
132
 
110
- == Version 0.9.0 - 2009-04-05
133
+ ## Version 0.9.0 - 2009-04-05
111
134
 
112
- === Enhancements
135
+ ### Enhancements
113
136
 
114
137
  * Ruby 1.9 compatibility
115
138
  * Update to SQLite 3.6.12
116
139
  * Added support for the new SQLite Backup API, see Amalgalite::Database#replicate_to
117
140
  * Added exclusive/immediate/deferred transaction helpers
118
141
 
119
- == Version 0.8.0 - 2009-03-23
142
+ ## Version 0.8.0 - 2009-03-23
120
143
 
121
- === Enhancements
144
+ ### Enhancements
122
145
 
123
146
  * Add in support for obtaining limited schema information on temporary tables
124
147
  and indexes
125
148
  * Add support for returning the primary key columns of a table
126
149
  * Other miscellaneous items to support the ActiveRecord adapter
127
150
 
128
- == Version 0.7.7 - 2009-03-03
151
+ ## Version 0.7.7 - 2009-03-03
129
152
 
130
- === Bug Fixes
153
+ ### Bug Fixes
131
154
 
132
155
  * roll back to SQLite 3.6.10 because of substr() bug in 3.6.11
133
156
 
134
- == Version 0.7.6 - 2009-03-02
157
+ ## Version 0.7.6 - 2009-03-02
135
158
 
136
- === Enhancements
159
+ ### Enhancements
137
160
 
138
161
  * Update to SQLite 3.6.11
139
162
 
140
- === Bug Fixes
163
+ ### Bug Fixes
141
164
 
142
165
  * fix issues with the wrong error message appearing in statement closing
143
166
  * incorrectly raise an exception if a transaction is started when rescuing an
144
167
  exception [reported by James Edwared Gray II]
145
168
 
146
- == Version 0.7.5 - 2009-02-12
169
+ ## Version 0.7.5 - 2009-02-12
147
170
 
148
- === Bug Fixes
171
+ ### Bug Fixes
149
172
 
150
173
  * another ruby -w pass to clear up warnings
151
174
  * force all tests to run with -w turned on
152
175
 
153
- == Version 0.7.4 - 2009-02-08
176
+ ## Version 0.7.4 - 2009-02-08
154
177
 
155
- === Bug Fixes
178
+ ### Bug Fixes
156
179
 
157
180
  * fix Database#first_row_from not behaving the same as Database#execute() when
158
181
  there are no results. [reported by James Edward Gray II]
159
182
 
160
- == Version 0.7.3 - 2009-02-08
183
+ ## Version 0.7.3 - 2009-02-08
161
184
 
162
- === Enhancements
185
+ ### Enhancements
163
186
 
164
187
  * added Database#first_row_from
165
188
  * added Database#first_value_from
166
189
 
167
- === Bug Fixes
190
+ ### Bug Fixes
168
191
 
169
192
  * clean up ruby warnings when run with -w
170
193
  * fix documenation on Database#execute
171
194
 
172
- == Version 0.7.2 - 2009-01-24
173
- === Enhancements
195
+ ## Version 0.7.2 - 2009-01-24
196
+ ### Enhancements
174
197
 
175
198
  * added quoting and escaping of text support, used for database drivers
176
199
  * added ability to access columns of the schame in original definition order
177
200
 
178
- == Version 0.7.1 - 2009-01-18
201
+ ## Version 0.7.1 - 2009-01-18
179
202
 
180
- === Enhancements
203
+ ### Enhancements
181
204
 
182
205
  * added support for sqlite's nexted transactions which appeared in sqlite
183
206
  * update to SQLite version 3.6.10
184
207
  * added ability to set the SQLite temporary directory
185
208
  * added amalgalite-pack --require-order
186
209
 
187
- === Bug Fixes
210
+ ### Bug Fixes
188
211
 
189
212
  * fix exception when accessing the special 'rowid' column
190
213
  * fix internal require order list for use in packing
191
214
 
192
- == Version 0.6.0 - 2009-01-10
215
+ ## Version 0.6.0 - 2009-01-10
193
216
 
194
- === Enhancements
217
+ ### Enhancements
195
218
 
196
219
  * Added ability to define custom SQL functions implemented in Ruby
197
220
  * Added ability to define custom SQL aggregates implemented in Ruby
@@ -200,37 +223,37 @@
200
223
  * Added support for Ruby progress handlers
201
224
  * update to SQLite version 3.6.7
202
225
 
203
- == Version 0.5.1 - 2008-11-30
226
+ ## Version 0.5.1 - 2008-11-30
204
227
 
205
- === Enhancements
228
+ ### Enhancements
206
229
 
207
230
  * update to SQLite version 3.6.6.2
208
231
 
209
- == Version 0.5.0 - 2008-11-16
232
+ ## Version 0.5.0 - 2008-11-16
210
233
 
211
- === Enhancements
234
+ ### Enhancements
212
235
 
213
236
  * amalgalite-pack-into-db has been reworked into amalgalite-pack
214
237
  * ruby code that is packed into a database for later requiring can now be
215
238
  compressed
216
239
  * update to SQLite version 3.6.5
217
240
 
218
- == Version 0.4.2 - 2008-10-12
241
+ ## Version 0.4.2 - 2008-10-12
219
242
 
220
- === Enhancements
243
+ ### Enhancements
221
244
 
222
245
  * release of windows gem
223
246
 
224
- == Version 0.4.1 - 2008-09-28
247
+ ## Version 0.4.1 - 2008-09-28
225
248
 
226
- === Enhancements
249
+ ### Enhancements
227
250
 
228
251
  * update to SQLite3 version 3.6.3
229
252
  * change rdoc template to darkfish
230
253
 
231
- == Version 0.4.0 - 2008-09-14
254
+ ## Version 0.4.0 - 2008-09-14
232
255
 
233
- === Enhancements
256
+ ### Enhancements
234
257
  * update to SQLite3 version 3.6.2 and enable the RTree option by default
235
258
  * Amalgalite::Requires module allowing ruby code to be 'required' from columns in an SQLite database
236
259
  * Amagalite::Requires::Bootstrap extension module enabling low level boot
@@ -238,7 +261,7 @@
238
261
  * more indepth information about indexes is available via the Index class
239
262
  * add support for sqlite3_status and sqlite3_db_status information
240
263
 
241
- === Bugfixes
264
+ ### Bugfixes
242
265
 
243
266
  * fix nil exception when using a declared_data_type on primary key column that
244
267
  has no declared_data_type
@@ -250,43 +273,43 @@
250
273
  * raise LoadError if required in the same program as sqlite3-ruby. These
251
274
  libraries conflict with each other.
252
275
 
253
- == Version 0.2.4 - 2008-07-13
276
+ ## Version 0.2.4 - 2008-07-13
254
277
 
255
- === Bugfixes
278
+ ### Bugfixes
256
279
  * fix compilation when ruby is compiled without pthreads using
257
280
 
258
- == Version 0.2.3 - 2008-07-12
281
+ ## Version 0.2.3 - 2008-07-12
259
282
 
260
- === Bugfixes
283
+ ### Bugfixes
261
284
  * make sure file permissions are all read before shipping gem
262
285
 
263
- == Version 0.2.2 - 2008-07-12
286
+ ## Version 0.2.2 - 2008-07-12
264
287
 
265
- === Bugfixes
288
+ ### Bugfixes
266
289
  * Database#pragma should accept a block just like Database#execute does
267
290
  * convert to using extconf.rb instead of mkrf to enable compilation as a
268
291
  direct ruby extension in the ruby source tree
269
292
 
270
- == Version 0.2.1 - 2008-07-05
293
+ ## Version 0.2.1 - 2008-07-05
271
294
 
272
- === Bugfixes
295
+ ### Bugfixes
273
296
  * make sure that the pthread support in sqlite3 matches that of ruby
274
297
  * fix schema reloading in the example scripts
275
298
 
276
- == Version 0.2.0 - 2008-07-04
299
+ ## Version 0.2.0 - 2008-07-04
277
300
 
278
- === Enhancements
301
+ ### Enhancements
279
302
  * blob support, both incremental access and normal access
280
303
  * added examples/gem_db.rb script demonstrating taps and prepared statements
281
304
  * added examples/schema-info.rb script demonstrating meta information
282
305
  * added examples/blob.rb demonstrating incremental blob IO
283
306
  * added access to the SQLite3 errcode and errmsg api
284
307
 
285
- === Bugfixes
308
+ ### Bugfixes
286
309
  * added taps.rb for requiring
287
310
  * fixed prepared statement reset
288
311
  * caught an error in executing prepared statements earlier in the process so the correct error is reported
289
312
 
290
- == Version 0.1.0 - 2008-06-21
313
+ ## Version 0.1.0 - 2008-06-21
291
314
 
292
315
  * Initial public release
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2008, Jeremy Hinegardner
1
+ Copyright (c) 2008-2012 Jeremy Hinegardner
2
2
 
3
3
  All rights reserved.
4
4
 
@@ -11,7 +11,7 @@ modification, are permitted provided that the following conditions are met:
11
11
  * Redistributions in binary form must reproduce the above copyright notice,
12
12
  this list of conditions and the following disclaimer in the documentation
13
13
  and/or other materials provided with the distribution.
14
-
14
+
15
15
  * Neither the name of Jeremy Hinegardner nor the names of its contributors
16
16
  may be used to endorse or promote products derived from this software without
17
17
  specific prior written permission.