sequel_core 1.0
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.
- data/CHANGELOG +1003 -0
- data/COPYING +18 -0
- data/README +81 -0
- data/Rakefile +176 -0
- data/bin/sequel +41 -0
- data/lib/sequel_core.rb +59 -0
- data/lib/sequel_core/adapters/adapter_skeleton.rb +68 -0
- data/lib/sequel_core/adapters/ado.rb +100 -0
- data/lib/sequel_core/adapters/db2.rb +158 -0
- data/lib/sequel_core/adapters/dbi.rb +126 -0
- data/lib/sequel_core/adapters/informix.rb +87 -0
- data/lib/sequel_core/adapters/jdbc.rb +108 -0
- data/lib/sequel_core/adapters/mysql.rb +269 -0
- data/lib/sequel_core/adapters/odbc.rb +145 -0
- data/lib/sequel_core/adapters/odbc_mssql.rb +93 -0
- data/lib/sequel_core/adapters/openbase.rb +90 -0
- data/lib/sequel_core/adapters/oracle.rb +99 -0
- data/lib/sequel_core/adapters/postgres.rb +519 -0
- data/lib/sequel_core/adapters/sqlite.rb +192 -0
- data/lib/sequel_core/array_keys.rb +296 -0
- data/lib/sequel_core/connection_pool.rb +152 -0
- data/lib/sequel_core/core_ext.rb +59 -0
- data/lib/sequel_core/core_sql.rb +191 -0
- data/lib/sequel_core/database.rb +433 -0
- data/lib/sequel_core/dataset.rb +409 -0
- data/lib/sequel_core/dataset/convenience.rb +321 -0
- data/lib/sequel_core/dataset/sequelizer.rb +354 -0
- data/lib/sequel_core/dataset/sql.rb +586 -0
- data/lib/sequel_core/exceptions.rb +45 -0
- data/lib/sequel_core/migration.rb +191 -0
- data/lib/sequel_core/model.rb +8 -0
- data/lib/sequel_core/pretty_table.rb +73 -0
- data/lib/sequel_core/schema.rb +8 -0
- data/lib/sequel_core/schema/schema_generator.rb +131 -0
- data/lib/sequel_core/schema/schema_sql.rb +131 -0
- data/lib/sequel_core/worker.rb +58 -0
- data/spec/adapters/informix_spec.rb +139 -0
- data/spec/adapters/mysql_spec.rb +330 -0
- data/spec/adapters/oracle_spec.rb +130 -0
- data/spec/adapters/postgres_spec.rb +189 -0
- data/spec/adapters/sqlite_spec.rb +345 -0
- data/spec/array_keys_spec.rb +679 -0
- data/spec/connection_pool_spec.rb +356 -0
- data/spec/core_ext_spec.rb +67 -0
- data/spec/core_sql_spec.rb +301 -0
- data/spec/database_spec.rb +812 -0
- data/spec/dataset_spec.rb +2381 -0
- data/spec/migration_spec.rb +261 -0
- data/spec/pretty_table_spec.rb +66 -0
- data/spec/rcov.opts +4 -0
- data/spec/schema_generator_spec.rb +86 -0
- data/spec/schema_spec.rb +230 -0
- data/spec/sequelizer_spec.rb +448 -0
- data/spec/spec.opts +5 -0
- data/spec/spec_helper.rb +44 -0
- data/spec/worker_spec.rb +96 -0
- metadata +162 -0
data/CHANGELOG
ADDED
@@ -0,0 +1,1003 @@
|
|
1
|
+
=== 1.0 (2008-01-02)
|
2
|
+
|
3
|
+
* Removed deprecated adapter stubs.
|
4
|
+
|
5
|
+
* Removed Sequel::Model() stub.
|
6
|
+
|
7
|
+
* Changed name to sequel_core.
|
8
|
+
|
9
|
+
* 100% code coverage.
|
10
|
+
|
11
|
+
* Fixed error behavior when sequel_model is not available.
|
12
|
+
|
13
|
+
* Fixed error behavior when parse_tree or ruby2ruby are not available.
|
14
|
+
|
15
|
+
=== 0.5.0.2 (2008-01-01)
|
16
|
+
|
17
|
+
* Fixed String#to_time to raise error correctly for invalid time stamps.
|
18
|
+
|
19
|
+
* Improved code coverage - now at 99.2%.
|
20
|
+
|
21
|
+
=== 0.5.0.1 (2007-12-31)
|
22
|
+
|
23
|
+
* Added a stub for Sequel::Model that auto-loads sequel_model.
|
24
|
+
|
25
|
+
* Changed Sequel.method_missing and Database.adapter_class to raise AdapterNotFound if an adapter could not be loaded.
|
26
|
+
|
27
|
+
* Fixed behavior of error trap in sequel command line tool.
|
28
|
+
|
29
|
+
=== 0.5 (2007-12-30)
|
30
|
+
|
31
|
+
* Removed model code into separate sub-project. Rearranged trunk into core, model and model_plugins.
|
32
|
+
|
33
|
+
=== 0.4.5 (2007-12-25)
|
34
|
+
|
35
|
+
* Added rdoc for new alter_table functionality (#109).
|
36
|
+
|
37
|
+
* Fixed update_sql with array sub-item keys (#110).
|
38
|
+
|
39
|
+
* Refactored model specs.
|
40
|
+
|
41
|
+
* Added Model#update as alias to #set.
|
42
|
+
|
43
|
+
* Refactored validations code. Renamed Model.validations? into Model.has_validations?.
|
44
|
+
|
45
|
+
* Added initial Model validations (Thanks Lance Carlson)
|
46
|
+
|
47
|
+
* Added Database#set_column_default method (thanks Jim Morris.)
|
48
|
+
|
49
|
+
* Removed warning on uninitialized @transform value (thanks Jim Morris).
|
50
|
+
|
51
|
+
=== 0.4.4.2 (2007-12-20)
|
52
|
+
|
53
|
+
* Fixed parsing errors in Ruby 1.9.
|
54
|
+
|
55
|
+
* Fixed sync problem in connection_pool_spec.
|
56
|
+
|
57
|
+
* Changed String#to_time to raise Error::InvalidValue if Time.parse fails.
|
58
|
+
|
59
|
+
* Refactored sequel error classes.
|
60
|
+
|
61
|
+
=== 0.4.4.1 (2007-12-19)
|
62
|
+
|
63
|
+
* Fixed schema generation code to use field quoting and support adapter-specific literalization of default values (#108).
|
64
|
+
|
65
|
+
=== 0.4.4 (2007-12-17)
|
66
|
+
|
67
|
+
* Implemented Database#rename_table (#104).
|
68
|
+
|
69
|
+
* Fixed drop_index in mysql adapter (#103).
|
70
|
+
|
71
|
+
* Added ALTER TABLE specs for postgres, sqlite and mysql adapters. Added custom alter_table behavior for sqlite and mysql adapters (#101, #102).
|
72
|
+
|
73
|
+
* Added direct Database API for altering tables.
|
74
|
+
|
75
|
+
* Added Database#alter_table method with support for adding, dropping, renaming, modifying columns and adding and droppping indexes.
|
76
|
+
|
77
|
+
* Added #unique schema method for defining unique indexes (thanks Dado).
|
78
|
+
|
79
|
+
* Implemented unfolding of #each calls inside sequelizer blocks (thanks Jim Morris).
|
80
|
+
|
81
|
+
=== 0.4.3 (2007-12-15)
|
82
|
+
|
83
|
+
* Fixed Dataset#update to accept strings (#98).
|
84
|
+
|
85
|
+
* Fixed Model.[] to raise for boolean argument (#97).
|
86
|
+
|
87
|
+
* Added Database#add_index method (thanks coda.hale).
|
88
|
+
|
89
|
+
* Added error reporting for filtering on comparison not in a block (thanks Jim Morris).
|
90
|
+
|
91
|
+
* Added support for inline index definition (thanks Dado).
|
92
|
+
|
93
|
+
* Added Database#create_table! method for forcibly creating a table (thanks Dado).
|
94
|
+
|
95
|
+
* Added support for using Dataset#update with block.
|
96
|
+
|
97
|
+
* Changed subscript access to use | operator.
|
98
|
+
|
99
|
+
* Fixed subscript access in sequelizer.
|
100
|
+
|
101
|
+
* Added support for subscript access using Symbol#/ operator.
|
102
|
+
|
103
|
+
=== 0.4.2.2 (2007-12-10)
|
104
|
+
|
105
|
+
* Improved code coverage.
|
106
|
+
|
107
|
+
* Fixed Dataset#count to work properly with datasets with fixed SQL (when using #fetch).
|
108
|
+
|
109
|
+
* Added Model.create_with_params method that filters the given parameters accordring to the model's columns (thanks Aman Gupta).
|
110
|
+
|
111
|
+
=== 0.4.2.1 (2007-12-09)
|
112
|
+
|
113
|
+
* Refactored and fixed Dataset#reverse_order to work with field quoting (thanks Christian).
|
114
|
+
|
115
|
+
* Fixed problem with field quoting in insert statements.
|
116
|
+
|
117
|
+
* Changed sequelizer code to silently fail on any error when requiring parsetree and ruby2ruby.
|
118
|
+
|
119
|
+
* Added Database#create_view, #create_or_replace_view and #drop_view methods. Also implemented Dataset#create_view and #create_or_replace_view convenience methods.
|
120
|
+
|
121
|
+
* Keep DRY by re-using Model#[]= from method_missing.
|
122
|
+
|
123
|
+
* Added Model.fetch alias for DB.fetch.set_model(Model)
|
124
|
+
|
125
|
+
=== 0.4.2 (2007-12-07)
|
126
|
+
|
127
|
+
* Implemented Model#save_changes.
|
128
|
+
|
129
|
+
* Extended Model#save to accept specific columns to update.
|
130
|
+
|
131
|
+
* Implemented experimental JDBC adapter.
|
132
|
+
|
133
|
+
* Added adapter skeleton as starting point for new adapters.
|
134
|
+
|
135
|
+
* Cleaned-up adapters and moved automatic requiring of 'sequel' to adapter stubs.
|
136
|
+
|
137
|
+
=== 0.4.1.3 (2007-12-05)
|
138
|
+
|
139
|
+
* Better plugin conventions.
|
140
|
+
|
141
|
+
* Added experimental OpenBase adapter.
|
142
|
+
|
143
|
+
* Fixed Sequel.<xxx> methods to accept options hash as well as database name. Fixed Sequel.connect to accept options hash as well as URI (Wayne).
|
144
|
+
|
145
|
+
=== 0.4.1.2 (2007-12-04)
|
146
|
+
|
147
|
+
* Added release rake task (using RubyForge).
|
148
|
+
|
149
|
+
* Changed Model.is to accept variable arity.
|
150
|
+
|
151
|
+
* Implemented plugin loading for model classes.
|
152
|
+
|
153
|
+
* Fixed odbc-mssql and odbc adapters (thanks Dusty.)
|
154
|
+
|
155
|
+
* Implemented odbc-mssql adapter (thanks Dusty.)
|
156
|
+
|
157
|
+
=== 0.4.1.1 (2007-11-27)
|
158
|
+
|
159
|
+
* Fixed #first and #last functionality in Informix::Dataset (thanks Gerardo Santana).
|
160
|
+
|
161
|
+
=== 0.4.1 (2007-11-25)
|
162
|
+
|
163
|
+
* Put adapter files in lib/sequel/adapters. Requiring sequel/<adapter> is now deprecated. Users can now just require 'sequel' and adapters are automagically loaded (#93).
|
164
|
+
|
165
|
+
=== 0.4.0 (2007-11-24)
|
166
|
+
|
167
|
+
* Reorganized lib directory structure.
|
168
|
+
|
169
|
+
* Added support for dbi-xxx URI schemes (#86).
|
170
|
+
|
171
|
+
* Fixed problem in Database#uri where setting the password would raise an error (#87).
|
172
|
+
|
173
|
+
* Improved Dataset#insert_sql to correctly handle string keys (#92).
|
174
|
+
|
175
|
+
* Improved error-handling for worker threads. Errors are saved to an array and are accessible through #errors (#91).
|
176
|
+
|
177
|
+
* Dataset#uniq/distinct can now accept a column list for DISTINCT ON clauses.
|
178
|
+
|
179
|
+
* Fixed Model.all.
|
180
|
+
|
181
|
+
* Fixed literalization of strings with escape sequences in postgres adapter (#90).
|
182
|
+
|
183
|
+
* Added support for literalizing BigDecimal values (#89).
|
184
|
+
|
185
|
+
* Fixed column qualification for joined datasets (thanks Christian).
|
186
|
+
|
187
|
+
* Implemented experimental informix adapter.
|
188
|
+
|
189
|
+
=== 0.3.4.1 (2007-11-10)
|
190
|
+
|
191
|
+
* Changed Dataset#select_sql to support queries without a FROM clause.
|
192
|
+
|
193
|
+
=== 0.3.4 (2007-11-10)
|
194
|
+
|
195
|
+
* Fixed MySQL adapter to allow calling stored procedures (thanks Sebastian).
|
196
|
+
|
197
|
+
* Changed Dataset#each to always return self.
|
198
|
+
|
199
|
+
* Fixed SQL functions without arguments in block filters.
|
200
|
+
|
201
|
+
* Implemented super-cool Symbol#cast_as method.
|
202
|
+
|
203
|
+
* Fixed error message in command-line tool if failed to load adapter (#85).
|
204
|
+
|
205
|
+
* Refactored code relating to column references for better extendibility (#88).
|
206
|
+
|
207
|
+
* Tiny fix to Model#run_hooks.
|
208
|
+
|
209
|
+
=== 0.3.3 (2007-11-04)
|
210
|
+
|
211
|
+
* Revised code to generate SQL statements without trailing semicolons.
|
212
|
+
|
213
|
+
* Added Sequel::Worker implementation of a simple worker thread for asynchronous execution.
|
214
|
+
|
215
|
+
* Added spec for Oracle adapter.
|
216
|
+
|
217
|
+
* Fixed Oracle adapter to format INSERT statements without semicolons (thanks Liming Lian).
|
218
|
+
|
219
|
+
* Renamed alias to Array#keys as Array#columns instead of Array#fields.
|
220
|
+
|
221
|
+
* Renamed FieldCompositionMethods as ColumnCompositionMethods.
|
222
|
+
|
223
|
+
* Implemented Sequel::NumericExtensions to provide stuff like 30.days.ago.
|
224
|
+
|
225
|
+
=== 0.3.2 (2007-11-01)
|
226
|
+
|
227
|
+
* Added #to_column_name as alias to #to_field_name, #column_title as alias to #field_title.
|
228
|
+
|
229
|
+
* Added Dataset#interval method for getting interval between minimum/maximum values for a column.
|
230
|
+
|
231
|
+
* Fixed Oracle::Database#execute (#84).
|
232
|
+
|
233
|
+
* Added group_and_count as general implementation for count_by_xxx.
|
234
|
+
|
235
|
+
* Added count_by magic method.
|
236
|
+
|
237
|
+
* Added Dataset#range method for getting the minimum/maximum values for a column.
|
238
|
+
|
239
|
+
* Fixed timestamp translation in SQLite adapter (#83).
|
240
|
+
|
241
|
+
* Experimental DB2 adapter.
|
242
|
+
|
243
|
+
* Added Dataset#set as alias to Dataset#update.
|
244
|
+
|
245
|
+
* Removed long deprecated expressions.rb code.
|
246
|
+
|
247
|
+
* Better documentation.
|
248
|
+
|
249
|
+
* Implemented Dataset magic methods: order_by_xxx, group_by_xxx, filter_by_xxx, all_by_xxx, first_by_xxx, last_by_xxx.
|
250
|
+
|
251
|
+
* Changed Model.create and Model.new to accept a block.
|
252
|
+
|
253
|
+
=== 0.3.1 (2007-10-30)
|
254
|
+
|
255
|
+
* Typo fixes (#79).
|
256
|
+
|
257
|
+
* Added require 'yaml' to dataset.rb (#78).
|
258
|
+
|
259
|
+
* Changed postgres adapter to use the ruby-postgres library's type conversion if available (#76).
|
260
|
+
|
261
|
+
* Fixed string literalization in mysql adapter for strings with comment backslashes in them (#75).
|
262
|
+
|
263
|
+
* Fixed ParseTree dependency to work with version 2.0.0 and later (#74).
|
264
|
+
|
265
|
+
* foreign_key definitions now accept :key option for specifying the remote key (#73).
|
266
|
+
|
267
|
+
* Fixed Model#method_missing to not raise error for columns not in the table but for which a value exists (#77).
|
268
|
+
|
269
|
+
* New documentation for Model.
|
270
|
+
|
271
|
+
* Implemented Oracle adapter based on ruby-oci8 library.
|
272
|
+
|
273
|
+
* Implemented Model#pk_hash. Is it really necessary?
|
274
|
+
|
275
|
+
* Deprecated Model#pkey. Implemented better Model#pk method.
|
276
|
+
|
277
|
+
* Specs and docs for Model.one_to_one, Model.one_to_many macros.
|
278
|
+
|
279
|
+
=== 0.3.0.1 (2007-10-20)
|
280
|
+
|
281
|
+
* Changed Database#fetch to return a modified dataset.
|
282
|
+
|
283
|
+
=== 0.3 (2007-10-20)
|
284
|
+
|
285
|
+
* Added stock transforms to Dataset#transform. Refactored Model.serialize.
|
286
|
+
|
287
|
+
* Added Database#logger= method for setting the database logger object.
|
288
|
+
|
289
|
+
* Fixed Model.[] to act as shortcut to Model.find when a hash is given (#71).
|
290
|
+
|
291
|
+
* Added support for old and new decimal types in MySQL adapter, and updated MYSQL_TYPES with MySQL 5.0 constants (#72).
|
292
|
+
|
293
|
+
* Implemented Database#disconnect method for all adapters.
|
294
|
+
|
295
|
+
* Fixed small bug in ArrayKeys module.
|
296
|
+
|
297
|
+
* Implemented model caching by primary key.
|
298
|
+
|
299
|
+
* Separated Model.find and Model.[] functionality. Model.find takes a filter. Model.[] is strictly for finding by primary keys.
|
300
|
+
|
301
|
+
* Enhanced Dataset#first to accept a filter block. Model#find can also now accept a filter block.
|
302
|
+
|
303
|
+
* Changed Database#[] to act as shortcut to #fetch if a string is given.
|
304
|
+
|
305
|
+
* Renamed Database#each to #fetch. If no block is given, the method returns an enumerator.
|
306
|
+
|
307
|
+
* Changed Dataset#join methods to correctly literalize values in join conditions (#70).
|
308
|
+
|
309
|
+
* Fixed #filter with ranges to correctly literalize field names (#69).
|
310
|
+
|
311
|
+
* Implemented Database#each method for quickly retrieving records with arbitrary SQL (thanks Aman Gupta).
|
312
|
+
|
313
|
+
* Fixed bug in postgres adapter where a LiteralString would be literalized as a regular String.
|
314
|
+
|
315
|
+
* Fixed SQLite insert with subquery (#68).
|
316
|
+
|
317
|
+
* Reverted back to hashes as default mode. Added Sequel.use_array_tuples and Sequel.use_hash_tuples methods.
|
318
|
+
|
319
|
+
* Fixed problem with arrays with keys when using #delete.
|
320
|
+
|
321
|
+
* Implemented ArrayKeys as substitute for ArrayFields.
|
322
|
+
|
323
|
+
* Added Dataset#each_hash method.
|
324
|
+
|
325
|
+
* Rewrote SQLite::Database#transaction to use sqlite3-ruby library implementation of transactions.
|
326
|
+
|
327
|
+
* Fixed Model.destroy_all to work correctly in cases where no before_destroy hook is defined and an after_destroy hook is defined.
|
328
|
+
|
329
|
+
* Restored Model.has_hooks? implementation.
|
330
|
+
|
331
|
+
* Changed Database#<< to strip comments and whitespace only when an array is given.
|
332
|
+
|
333
|
+
* Changed Schema::Generator#primary_key to accept calls with the type argument omitted.
|
334
|
+
|
335
|
+
* Hooks can now be prepended or appended by choice.
|
336
|
+
|
337
|
+
* Changed Model.subset to define filter method on the underlying dataset instead of the model class.
|
338
|
+
|
339
|
+
* Fixed Dataset#transform to work with array fields.
|
340
|
+
|
341
|
+
* Added Dataset#to_csv method.
|
342
|
+
|
343
|
+
* PrettyTable can now extract column names from arrayfields.
|
344
|
+
|
345
|
+
* Converted ado, dbi, odbc adapters to use arrayfields instead of hashes.
|
346
|
+
|
347
|
+
* Fixed composite key support.
|
348
|
+
|
349
|
+
* Fixed Dataset#insert_sql, update_sql to support array fields.
|
350
|
+
|
351
|
+
* Converted sqlite, mysql, postgres adapters to use arrayfields instead of hashes.
|
352
|
+
|
353
|
+
* Extended Dataset#from to auto alias sub-queries.
|
354
|
+
|
355
|
+
* Extended Dataset#from to accept hash for aliasing tables.
|
356
|
+
|
357
|
+
* Added before_update, after_update hooks.
|
358
|
+
|
359
|
+
=== 0.2.1.1 (2007-10-07)
|
360
|
+
|
361
|
+
* Added Date literalization to sqlite adapter (#60).
|
362
|
+
|
363
|
+
* Changed Model.serialize to allow calling it after the class is defined (#59).
|
364
|
+
|
365
|
+
* Fixed after_create hooks to allow calling save inside the hook (#58).
|
366
|
+
|
367
|
+
* Fixed MySQL quoting of sql functions (#57).
|
368
|
+
|
369
|
+
* Implemented rollback! global method for cancelling transactions in progress.
|
370
|
+
|
371
|
+
* Fixed =~ operator in Sequelizer.
|
372
|
+
|
373
|
+
* Fixed ODBC::Dataset#fetch_rows (thanks Dusty).
|
374
|
+
|
375
|
+
* Renamed Model.recreate_table to create_table!. recreate_table is deprecated and will issue a warning (#56).
|
376
|
+
|
377
|
+
=== 0.2.1 (2007-09-24)
|
378
|
+
|
379
|
+
* Added default implementation of Model.primary_key_hash.
|
380
|
+
|
381
|
+
* Fixed Sequel::Model() to set dataset for inherited classes.
|
382
|
+
|
383
|
+
* Rewrote Model.serialize to use Dataset#transform.
|
384
|
+
|
385
|
+
* Implemented Dataset#transform.
|
386
|
+
|
387
|
+
* Added gem spec for Windows (without ParseTree dependency).
|
388
|
+
|
389
|
+
* Added support for dynamic strings in Sequelizer (#49).
|
390
|
+
|
391
|
+
* Query branch merged into trunk.
|
392
|
+
|
393
|
+
* Implemented self-changing methods.
|
394
|
+
|
395
|
+
* Add support for ternary operator to Sequelizer.
|
396
|
+
|
397
|
+
* Fixed sequelizer to evaluate expressions if they don't involve symbols or literal strings.
|
398
|
+
|
399
|
+
* Added protection against using #each, #delete, #insert, #update inside query blocks.
|
400
|
+
|
401
|
+
* Improved Model#method_missing to deal with invalid attributes.
|
402
|
+
|
403
|
+
* Implemented Dataset#query.
|
404
|
+
|
405
|
+
* Added Dataset#group_by as alias for Dataset#group.
|
406
|
+
|
407
|
+
* Added Dataset#order_by as alias for Dataset#order.
|
408
|
+
|
409
|
+
* More model refactoring. Added support for composite keys.
|
410
|
+
|
411
|
+
* Added Dataset#empty? method (#46).
|
412
|
+
|
413
|
+
* Fixed Symbol#to_field_name to support names with numbers and upper-case characters (#45).
|
414
|
+
|
415
|
+
* Added install_no_doc rake task.
|
416
|
+
|
417
|
+
* Partial refactoring of model code.
|
418
|
+
|
419
|
+
* Refactored dataset-model association and added Dataset#set_row_filter method.
|
420
|
+
|
421
|
+
* Added support for case-sensitive regexps to mysql adapter.
|
422
|
+
|
423
|
+
* Changed mysql adapter to support encoding option as well.
|
424
|
+
|
425
|
+
* Added charset/encoding option to postgres adapter.
|
426
|
+
|
427
|
+
* Implemented Model.serialize (thanks Aman Gupta.)
|
428
|
+
|
429
|
+
* Changed Model.create to INSERT DEFAULT VALUES instead of (id) VALUES (null) (brings back #41.)
|
430
|
+
|
431
|
+
* Fixed Model.new to work without arguments.
|
432
|
+
|
433
|
+
* Added Model.no_primary_key method to allow models without primary keys.
|
434
|
+
|
435
|
+
* Added Model#this method (#42 thanks Duane Johnson).
|
436
|
+
|
437
|
+
* Fixed Dataset#insert_sql to use DEFAULT VALUES clause if argument is an empty hash.
|
438
|
+
|
439
|
+
* Fixed Model.create to work correctly when no argument is passed (#41).
|
440
|
+
|
441
|
+
=== 0.2.0.2 (2007-09-07)
|
442
|
+
|
443
|
+
* Dataset#insert can now accept subqueries.
|
444
|
+
|
445
|
+
* Changed Migrator.apply to return the version.
|
446
|
+
|
447
|
+
* Changed Sequel::Model() to cache intermediate classes so descendant classes can be reopened (#39).
|
448
|
+
|
449
|
+
* Added :charset option to MySQL adapter (#40).
|
450
|
+
|
451
|
+
* Fixed Dataset#exclude to add parens around NOT expression (#38).
|
452
|
+
|
453
|
+
* Fixed use of sub-queries with all comparison operators in block filters (#38).
|
454
|
+
|
455
|
+
* Fixed arithmetic expressions in block filters to not be literalized.
|
456
|
+
|
457
|
+
* Changed Symbol#method_missing to return LiteralString.
|
458
|
+
|
459
|
+
* Changed PrettyTable to right-align numbers.
|
460
|
+
|
461
|
+
* Fixed Model.create_table (thanks Duane Johnson.)
|
462
|
+
|
463
|
+
=== 0.2.0.1 (2007-09-04)
|
464
|
+
|
465
|
+
* Improved support for invoking methods with inline procs inside block filters.
|
466
|
+
|
467
|
+
=== 0.2.0 (2007-09-02)
|
468
|
+
|
469
|
+
* Fixed Model.drop_table (thanks Duane Johnson.)
|
470
|
+
|
471
|
+
* Dataset#each can now return rows for arbitrary SQL by specifying :sql option.
|
472
|
+
|
473
|
+
* Added spec for postgres adapter.
|
474
|
+
|
475
|
+
* Fixed Model.method_missing to work with new SQL generation.
|
476
|
+
|
477
|
+
* Fixed #compare_expr to support regexps.
|
478
|
+
|
479
|
+
* Fixed postgres, mysql adapters to support regexps.
|
480
|
+
|
481
|
+
* More specs for block filters. Updated README.
|
482
|
+
|
483
|
+
* Added support for globals and $X macros in block filters.
|
484
|
+
|
485
|
+
* Fixed Sequelizer to not fail if ParseTree or Ruby2Ruby gems are missing.
|
486
|
+
|
487
|
+
* Renamed String#expr into String#lit (#expr should be deprecated in future versions).
|
488
|
+
|
489
|
+
* Renamed Sequel::ExpressionString into LiteralString.
|
490
|
+
|
491
|
+
* Fixed Symbol#[] to return an ExpressionString, so as not to be literalized.
|
492
|
+
|
493
|
+
* Renamed Dataset::Expressions to Dataset::Sequelizer.
|
494
|
+
|
495
|
+
* Renamed Expressions#format_re_expression to match_expr.
|
496
|
+
|
497
|
+
* Renamed Expressions#format_eq_expression to compare_expr.
|
498
|
+
|
499
|
+
* Added support for Regexp in MySQL adapter.
|
500
|
+
|
501
|
+
* Refactored Regexp expressions into a separate #format_re_expression method.
|
502
|
+
|
503
|
+
* Added support for arithmetic in proc filters.
|
504
|
+
|
505
|
+
* Added support for nested proc expressions, more specs.
|
506
|
+
|
507
|
+
* Added support for SQL function using symbols, e.g. :sum[:x].
|
508
|
+
|
509
|
+
* Fixed deadlock bug in ConnectionPool.
|
510
|
+
|
511
|
+
* Removed deprecated old expressions.rb.
|
512
|
+
|
513
|
+
* Rewrote Proc filter feature using ParseTree.
|
514
|
+
|
515
|
+
* Added support for additional functions on columns using Symbol#method_missing.
|
516
|
+
|
517
|
+
* Added support for supplying filter block to DB#[] method, to allow stuff like DB[:nodes] {:path =~ /^icex1/}.
|
518
|
+
|
519
|
+
=== 0.1.9.12 (2007-08-26)
|
520
|
+
|
521
|
+
* Added spec for PrettyTable.
|
522
|
+
|
523
|
+
* Added specs for Schema::Generator and Model (#36 thanks technoweenie).
|
524
|
+
|
525
|
+
* Fixed Sequel::Model.set_schema (#36 thanks technoweenie.)
|
526
|
+
|
527
|
+
* Added support for no options on Schema::Generator#foreign_key (#36 thanks technoweenie.)
|
528
|
+
|
529
|
+
* Implemented (restored?) Schema::Generator#primary_key_name (#36 thanks technoweenie.)
|
530
|
+
|
531
|
+
* Better spec code coverage.
|
532
|
+
|
533
|
+
=== 0.1.9.11 (2007-08-24)
|
534
|
+
|
535
|
+
* Changed Dataset#set_model to allow supplying additional arguments to the model's initialize method (#35). Thanks Sunny Hirai.
|
536
|
+
|
537
|
+
=== 0.1.9.10 (2007-08-22)
|
538
|
+
|
539
|
+
* Changed schema generation code to generate separate statements for CREATE TABLE and each CREATE INDEX (#34).
|
540
|
+
|
541
|
+
* Refactored Dataset::SQL#field_name for better support of different field quoting standards by specific adapters.
|
542
|
+
|
543
|
+
* Added #current_page_record_count for paginated datasets.
|
544
|
+
|
545
|
+
* Removed Database#literal and included Dataset::SQL instead.
|
546
|
+
|
547
|
+
* Sequel::Dataset:SQL#field_name can now take a hash (as well as #select and any method that uses #field_name) for aliasing column names. E.g. DB[:test].select(:_qqa => 'Date').sql #=> 'SELECT _qqa AS Date FROM test'.
|
548
|
+
|
549
|
+
* Moved SingleThreadedPool to lib/sequel/connection_pool.rb.
|
550
|
+
|
551
|
+
* Changed SQLite::Dataset to return affected rows for #delete and #update (#33).
|
552
|
+
|
553
|
+
* ADO adapter: Added use of Enumerable for Recordset#Fields, playing it safe and moving to the first row before getting results, and changing the auto_increment constant to work for MSSQL.
|
554
|
+
|
555
|
+
=== 0.1.9.9 (2007-08-18)
|
556
|
+
|
557
|
+
* New ADO adapter by cdcarter (#31).
|
558
|
+
|
559
|
+
* Added automatic column aliasing to #avg, #sum, #min and #max (#30).
|
560
|
+
|
561
|
+
* Fixed broken Sequel::DBI::Dataset#fetch_rows (#29 thanks cdcarter.)
|
562
|
+
|
563
|
+
=== 0.1.9.8 (2007-08-15)
|
564
|
+
|
565
|
+
* Fixed DBI adapter.
|
566
|
+
|
567
|
+
=== 0.1.9.7 (2007-08-15)
|
568
|
+
|
569
|
+
* Added support for executing batch statements in sqlite adapter.
|
570
|
+
|
571
|
+
* Changed #current_page_record_range to return 0..0 for an invalid page.
|
572
|
+
|
573
|
+
* Fixed joining of aliased tables.
|
574
|
+
|
575
|
+
* Improved Symbol#to_field_name to prevent false positives.
|
576
|
+
|
577
|
+
* Implemented Dataset#multi_insert with :commit_every option.
|
578
|
+
|
579
|
+
* More docs for Dataset#set_model.
|
580
|
+
|
581
|
+
* Implemented automatic creation of convenience methods for each adapter (e.g. Sequel.sqlite etc.)
|
582
|
+
|
583
|
+
=== 0.1.9.6 (2007-08-13)
|
584
|
+
|
585
|
+
* Refactored schema definition code. Gets rid of famous primary_key problem as well as other issues (e.g. issue #22).
|
586
|
+
|
587
|
+
* Added #pagination_record_count, #page_range and #current_page_record_range for paginated datasets.
|
588
|
+
|
589
|
+
* Changed MySQL adapter to automatically reconnect (issue #26).
|
590
|
+
|
591
|
+
* Changed Sequel() to accept variable arity.
|
592
|
+
|
593
|
+
* Added :elements option to column definition, in order to support ENUM and SET types.
|
594
|
+
|
595
|
+
=== 0.1.9.5 (2007-08-12)
|
596
|
+
|
597
|
+
* Fixed migration docs.
|
598
|
+
|
599
|
+
* Removed dependency on PGconn in Schema class.
|
600
|
+
|
601
|
+
=== 0.1.9.4 (2007-08-11)
|
602
|
+
|
603
|
+
* Added Sequel.dbi convenience method for using DBI connection strings to open DBI databases.
|
604
|
+
|
605
|
+
=== 0.1.9.3 (2007-08-10)
|
606
|
+
|
607
|
+
* Added support for specifying field size in schema definitions (thanks Florian Aßmann.)
|
608
|
+
|
609
|
+
* Added migration code based on work by Florian Aßmann.
|
610
|
+
|
611
|
+
* Reintroduced metaid dependency. No need to keep a local copy of it.
|
612
|
+
|
613
|
+
=== 0.1.9.2 (2007-07-24)
|
614
|
+
|
615
|
+
* Removed metaid dependency. Re-factored requires in lib/sequel.rb.
|
616
|
+
|
617
|
+
=== 0.1.9.1 (2007-07-22)
|
618
|
+
|
619
|
+
* Improved robustness of MySQL::Dataset#field_name.
|
620
|
+
|
621
|
+
* Added Sequel.single_threaded= convenience method.
|
622
|
+
|
623
|
+
=== 0.1.9 (2007-07-21)
|
624
|
+
|
625
|
+
* Fixed #update_sql and #insert_sql to support field quoting by calling #field_name.
|
626
|
+
|
627
|
+
* Implemented automatic data type conversion in mysql adapter.
|
628
|
+
|
629
|
+
* Added support for boolean literals in mysql adapter.
|
630
|
+
|
631
|
+
* Added support for ORDER and LIMIT clauses in UPDATE statements in mysql adapter.
|
632
|
+
|
633
|
+
* Implemented correct field quoting (using back-ticks) in mysql adapter.
|
634
|
+
|
635
|
+
* Wrote basic MySQL spec.
|
636
|
+
|
637
|
+
* Fixd MySQL::Dataset to return correct data types with symbols as hash keys.
|
638
|
+
|
639
|
+
* Removed discunctional MySQL::Database#transaction.
|
640
|
+
|
641
|
+
* Added support for single threaded operation.
|
642
|
+
|
643
|
+
* Fixed bug in Dataset#format_eq_expression where Range objects would not be literalized correctly.
|
644
|
+
|
645
|
+
* Added parens around postgres LIKE expressions using regexps.
|
646
|
+
|
647
|
+
=== 0.1.8 (2007-07-10)
|
648
|
+
|
649
|
+
* Implemented Dataset#columns for retrieving the columns in the result set.
|
650
|
+
|
651
|
+
* Updated Model with changes to how model-associated datasets work.
|
652
|
+
|
653
|
+
* Beefed-up specs. Coverage is now at 95.0%.
|
654
|
+
|
655
|
+
* Added support for polymorphic datasets.
|
656
|
+
|
657
|
+
* The adapter dataset interface was simplified and standardized. Only four methods need be overriden: fetch_rows, update, insert and delete.
|
658
|
+
|
659
|
+
* The Dataset class was refactored. The bulk of the dataset code was moved into separate modules.
|
660
|
+
|
661
|
+
* Renamed Dataset#hash_column to Dataset#to_hash.
|
662
|
+
|
663
|
+
* Added some common pragmas to sqlite adapter.
|
664
|
+
|
665
|
+
* Added Postgres::Dataset#analyze for EXPLAIN ANALYZE queries.
|
666
|
+
|
667
|
+
* Fixed broken Postgres::Dataset#explain.
|
668
|
+
|
669
|
+
=== 0.1.7
|
670
|
+
|
671
|
+
* Removed db.synchronize wrapping calls in sqlite adapter.
|
672
|
+
|
673
|
+
* Implemented Model.join method to restrict returned columns to the model table (thanks Pedro Gutierrez).
|
674
|
+
|
675
|
+
* Implemented Dataset#paginate method.
|
676
|
+
|
677
|
+
* Fixed after_destroy hook.
|
678
|
+
|
679
|
+
* Improved Dataset#first and #last to accept a filter hash.
|
680
|
+
|
681
|
+
* Added Dataset#[]= method.
|
682
|
+
|
683
|
+
* Added Sequel() convenience method.
|
684
|
+
|
685
|
+
* Fixed Dataset#first to include a LIMIT clause for a single record.
|
686
|
+
|
687
|
+
* Small fix to Postgres driver to return a primary_key value for the inserted record if it is specified in the insertion values (thanks Florian Aßmann and Pedro Gutierrez).
|
688
|
+
|
689
|
+
* Fixed Symbol#DESC to support qualified notation (thanks Pedro Gutierrez).
|
690
|
+
|
691
|
+
=== 0.1.6
|
692
|
+
|
693
|
+
* Fixed Model#method_missing to raise for an invalid attribute.
|
694
|
+
|
695
|
+
* Fixed PrettyTable to print model objects (thanks snok.)
|
696
|
+
|
697
|
+
* Fixed ODBC timestamp conversion to return DateTime rather than Time object (thanks snok.)
|
698
|
+
|
699
|
+
* Fixed Model.method_missing (thanks snok.)
|
700
|
+
|
701
|
+
* Model.method_missing now creates stubs for calling Model.dataset methods. Methods like Model.each etc are removed.
|
702
|
+
|
703
|
+
* Changed default join type to INNER JOIN (thanks snok.)
|
704
|
+
|
705
|
+
* Added support for literal expressions, e.g. DB[:items].filter(:col1 => 'col2 - 10'.expr).
|
706
|
+
|
707
|
+
* Added Dataset#and.
|
708
|
+
|
709
|
+
* SQLite adapter opens a memory DB if no database is specified, e.g. Sequel.open 'sqlite:/'.
|
710
|
+
|
711
|
+
* Added Dataset#or, pretty nifty.
|
712
|
+
|
713
|
+
=== 0.1.5
|
714
|
+
|
715
|
+
* Fixed Dataset#join to support multiple joins. Added #left_outer_join, #right_outer_join, #full_outer_join, #inner_join methods.
|
716
|
+
|
717
|
+
=== 0.1.4
|
718
|
+
|
719
|
+
* Added String#split_sql.
|
720
|
+
|
721
|
+
* Implemented Array#to_sql and String#to_sql. Database#to_sql can now take an array of strings and convert into an SQL string. Comments and excessive white-space are removed.
|
722
|
+
|
723
|
+
* Improved Schema generator to support data types as method names:
|
724
|
+
DB.create_table :test do
|
725
|
+
integer :abc
|
726
|
+
text :def
|
727
|
+
...
|
728
|
+
end
|
729
|
+
|
730
|
+
* Implemented ODBC adapter.
|
731
|
+
|
732
|
+
=== 0.1.3
|
733
|
+
|
734
|
+
* Implemented DBI adapter.
|
735
|
+
|
736
|
+
* Refactored database connection code. Now handled through Database#connect.
|
737
|
+
|
738
|
+
=== 0.1.2
|
739
|
+
|
740
|
+
* The first opened database is automatically assigned to to Model.db.
|
741
|
+
|
742
|
+
* Removed SequelConnectionError. Exception class errors are converted to RuntimeError.
|
743
|
+
|
744
|
+
* Added support for UNION, INTERSECT and EXCEPT set operations.
|
745
|
+
|
746
|
+
* Fixed Dataset#single_record to return nil if no record is found.
|
747
|
+
|
748
|
+
* Updated specs to conform to RSpec 1.0.
|
749
|
+
|
750
|
+
* Added Model#find_or_create method.
|
751
|
+
|
752
|
+
* Fixed MySQL::Dataset#query_single (thanks Dries Harnie.)
|
753
|
+
|
754
|
+
* Added Model.subset method. Fixed Model.filter and Model.exclude to accept blocks.
|
755
|
+
|
756
|
+
* Added Database#uri method.
|
757
|
+
|
758
|
+
* Refactored and removed deprecated code in postgres adapter.
|
759
|
+
|
760
|
+
===0.1.1
|
761
|
+
|
762
|
+
* More documentation for Dataset.
|
763
|
+
|
764
|
+
* Added Dataset#size as alias to Dataset#count.
|
765
|
+
|
766
|
+
* Changed Database#<< to call execute (instead of being an alias). Thus it will work for descendants as well.
|
767
|
+
|
768
|
+
* Fixed Sequel.open to accept variable arity.
|
769
|
+
|
770
|
+
* Refactored Model#refresh, Model.create. Removed Model#reload.
|
771
|
+
|
772
|
+
* Refactored Model hooks.
|
773
|
+
|
774
|
+
* Cleaned up Dataset API.
|
775
|
+
|
776
|
+
=== 0.1.0
|
777
|
+
|
778
|
+
* Changed Database#create_table to only accept a block. Nobody's gonna use the other way.
|
779
|
+
|
780
|
+
* Removed Dataset#[]= method. Too confusing and not really useful.
|
781
|
+
|
782
|
+
* Fixed ConnectionPool#hold to wrap exceptions only once.
|
783
|
+
|
784
|
+
* Dataset#where_list Renamed Dataset#expression_list.
|
785
|
+
|
786
|
+
* Added support for qualified fields in Proc expressions (e.g. filter {items.id == 1}.)
|
787
|
+
|
788
|
+
* Added like? and in? Proc expression operators.
|
789
|
+
|
790
|
+
* Added require 'date' in dataset.rb. Is this a 1.8.5 thing?
|
791
|
+
|
792
|
+
* Refactored Dataset to use literal strings instead of format strings (slight performance improvement and better readability.)
|
793
|
+
|
794
|
+
* Added support for literalizing Date objects.
|
795
|
+
|
796
|
+
* Refactored literalization of Time objects.
|
797
|
+
|
798
|
+
=== 0.0.20
|
799
|
+
|
800
|
+
* Refactored Dataset where clause construction to use expressions.
|
801
|
+
|
802
|
+
* Implemented Proc expressions (adapted from a great idea by Sam Smoot.)
|
803
|
+
|
804
|
+
* Fixed Model#map.
|
805
|
+
|
806
|
+
* Documentation for ConnectionPool.
|
807
|
+
|
808
|
+
* Specs for Database.
|
809
|
+
|
810
|
+
=== 0.0.19
|
811
|
+
|
812
|
+
* More specs for Dataset.
|
813
|
+
|
814
|
+
* Fixed Dataset#invert_order to work correctly with strings.
|
815
|
+
|
816
|
+
* Fixed Model#== to check equality of values.
|
817
|
+
|
818
|
+
* Added Model#exclude and Model#order.
|
819
|
+
|
820
|
+
* Fixed Dataset#order and Dataset#group to behave correctly when supplied with qualified field name symbols.
|
821
|
+
|
822
|
+
* Removed Database#literal. Shouldn't have been there.
|
823
|
+
|
824
|
+
* Added SQLite::Dataset#explain. Returns an array of opcode hashes.
|
825
|
+
|
826
|
+
* Specs for ConnectionPool.
|
827
|
+
|
828
|
+
=== 0.0.18
|
829
|
+
|
830
|
+
* Implemented SequelError and SequelConnectionError classes. ConnectionPool#hold now catches any connection errors and reraises them SequelConnectionError.
|
831
|
+
|
832
|
+
* Removed duplication in Database#[].
|
833
|
+
|
834
|
+
* :from and :select options are now always arrays (patch by Alex Bradbury.)
|
835
|
+
|
836
|
+
* Fixed Dataset#exclude to work correctly (patch and specs by Alex Bradbury.)
|
837
|
+
|
838
|
+
=== 0.0.17
|
839
|
+
|
840
|
+
* Fixed Postgres::Database#tables to return table names as symbols (caused problem when using Database#table_exists?).
|
841
|
+
|
842
|
+
* Fixed Dataset#from to have variable arity, like Dataset#select and Dataset#where (patch by Alex Bradbury.)
|
843
|
+
|
844
|
+
* Added support for GROUP BY and HAVING clauses (patches by Alex Bradbury.) Refactored Dataset#filter.
|
845
|
+
|
846
|
+
* More specs.
|
847
|
+
|
848
|
+
* Refactored Dataset#where for better composability.
|
849
|
+
|
850
|
+
* Added Dataset#[]= method.
|
851
|
+
|
852
|
+
* Added support for DISTINCT and OFFSET clauses (patches by Alex Bradbury.) Dataset#limit now accepts ranges. Added Dataset#uniq and distinct methods.
|
853
|
+
|
854
|
+
=== 0.0.16
|
855
|
+
|
856
|
+
* More documentation.
|
857
|
+
|
858
|
+
* Added support for subqueries in Dataset#literal.
|
859
|
+
|
860
|
+
* Added support for Model.all_by_XXX methods through Model.method_missing.
|
861
|
+
|
862
|
+
* Added basic SQL logging to Database.
|
863
|
+
|
864
|
+
* Added Enumerable#send_each convenience method.
|
865
|
+
|
866
|
+
* Changed Dataset#destroy to return the number of deleted records.
|
867
|
+
|
868
|
+
=== 0.0.15
|
869
|
+
|
870
|
+
* Improved Dataset#insert_sql to allow arrays as well as hashes.
|
871
|
+
|
872
|
+
* Database#drop_table now accepts a list of table names.
|
873
|
+
|
874
|
+
* Added Model#id to to return the id column.
|
875
|
+
|
876
|
+
=== 0.0.14
|
877
|
+
|
878
|
+
* Fixed Model's attribute accessors (hopefully for the last time).
|
879
|
+
|
880
|
+
* Changed Model.db and Model.db= to allow different databases for different model classes.
|
881
|
+
|
882
|
+
* Fixed bug in aggregate methods (max, min, etc) for datasets using record classes.
|
883
|
+
|
884
|
+
=== 0.0.13
|
885
|
+
|
886
|
+
* Fixed Model#method_missing to do both find, filter and attribute accessors. duh.
|
887
|
+
|
888
|
+
* Fixed bug in Dataset#literal when quoting arrays of strings (thanks Douglas Koszerek.)
|
889
|
+
|
890
|
+
=== 0.0.12
|
891
|
+
|
892
|
+
* Model#save now correctly performs an INSERT for new objects.
|
893
|
+
|
894
|
+
* Added Model#reload for reloading an object from the database.
|
895
|
+
|
896
|
+
* Added Dataset#naked method for getting a version of a dataset that fetches records as hashes.
|
897
|
+
|
898
|
+
* Implemented attribute accessors for column values ala ActiveRecord models.
|
899
|
+
|
900
|
+
* Fixed filtering using nil values (e.g. dataset.filter(:parent_id => nil)).
|
901
|
+
|
902
|
+
=== 0.0.11
|
903
|
+
|
904
|
+
* Renamed Model.schema to Model.set_schema and Model.get_schema to Model.schema.
|
905
|
+
|
906
|
+
* Improved Model class to allow descendants of model clases (thanks Pedro Gutierrez.)
|
907
|
+
|
908
|
+
* Removed require 'postgres' in schema.rb (thanks Douglas Koszerek.)
|
909
|
+
|
910
|
+
=== 0.0.10
|
911
|
+
|
912
|
+
* Added some examples.
|
913
|
+
|
914
|
+
* Added Dataset#print method for pretty-printing tables.
|
915
|
+
|
916
|
+
=== 0.0.9
|
917
|
+
|
918
|
+
* Fixed Postgres::Database#tables and #locks methods.
|
919
|
+
|
920
|
+
* Added PGconn#last_insert_id method that should support all 7.x and 8.x versions of Postgresql.
|
921
|
+
|
922
|
+
* Added Dataset#exists method for EXISTS where clauses.
|
923
|
+
|
924
|
+
* Changed behavior of Dataset#literal to regard symbols as field names.
|
925
|
+
|
926
|
+
* Refactored and DRY'd Dataset#literal and overrides therof. Added support for subqueries in where clause.
|
927
|
+
|
928
|
+
=== 0.0.8
|
929
|
+
|
930
|
+
* Fixed Dataset#reverse_order to provide chainability. This method can be called without arguments to invert the current order or with arguments to provide a descending order.
|
931
|
+
|
932
|
+
* Fixed literal representation of literals in SQLite adapter (thanks Christian Neukirchen!)
|
933
|
+
|
934
|
+
* Refactored insert code in Postgres adapter (in preparation for fetching the last insert id for pre-8.1 versions).
|
935
|
+
|
936
|
+
=== 0.0.7
|
937
|
+
|
938
|
+
* Fixed bug in Model.schema, duh!
|
939
|
+
|
940
|
+
=== 0.0.6
|
941
|
+
|
942
|
+
* Added Dataset#sql as alias to Dataset#select_sql.
|
943
|
+
|
944
|
+
* Dataset#where and Dataset#exclude can now be used for refining dataset conditions, enabling stuff like posts.where(:title => 'abcdef').exclude(:user_id => 3).
|
945
|
+
|
946
|
+
* Implemented Dataset#exclude method.
|
947
|
+
|
948
|
+
* Added Sequel::Schema#auto_primary_key method for setting an automatic primary key to be added to every table definition. Changed the schema generator to not define a primary key by default.
|
949
|
+
|
950
|
+
* Changed Sequel::Database#table_exists? to rely on the tables method if it is available.
|
951
|
+
|
952
|
+
* Implemented SQLite::Database#tables.
|
953
|
+
|
954
|
+
=== 0.0.5
|
955
|
+
|
956
|
+
* Added Dataset#[] method. Refactored Model#find and Model#[].
|
957
|
+
|
958
|
+
* Renamed Pool#conn_maker to Pool#connection_proc.
|
959
|
+
|
960
|
+
* Added automatic require 'sequel' to all adapters for convenience.
|
961
|
+
|
962
|
+
=== 0.0.4
|
963
|
+
|
964
|
+
* Added preliminary MySQL support.
|
965
|
+
|
966
|
+
* Code cleanup.
|
967
|
+
|
968
|
+
=== 0.0.3
|
969
|
+
|
970
|
+
* Add Dataset#sum method.
|
971
|
+
|
972
|
+
* Added support for exclusive ranges (thanks Christian Neukirchen.)
|
973
|
+
|
974
|
+
* Added sequel console for quick'n'dirty access to databases.
|
975
|
+
|
976
|
+
* Fixed small bug in Dataset#qualified_field_name for better join support.
|
977
|
+
|
978
|
+
=== 0.0.2
|
979
|
+
|
980
|
+
* Added Sequel.open as alias to Sequel.connect.
|
981
|
+
|
982
|
+
* Refactored Dataset#where_equal_condition into Dataset#where_condition, allowing arrays and ranges, e.g. posts.filter(:stamp => (3.days.ago)..(1.day.ago)), or posts.filter(:category => ['ruby', 'postgres', 'linux']).
|
983
|
+
|
984
|
+
* Added Model#[]= method for changing column values and Model#save
|
985
|
+
method for saving them.
|
986
|
+
|
987
|
+
* Added Dataset#destroy for deleting each record individually as support for models. Renamed Model#delete to Model#destroy (and Model#destroy_all) ala ActiveRecord.
|
988
|
+
|
989
|
+
* Refactored Dataset#first and Dataset#last code. These methods can now accept the number of records to fetch.
|
990
|
+
|
991
|
+
=== 0.0.1
|
992
|
+
|
993
|
+
* More documentation for Dataset.
|
994
|
+
|
995
|
+
* Renamed Database#query to Database#dataset.
|
996
|
+
|
997
|
+
* Added Dataset#insert_multiple for inserting multiple records.
|
998
|
+
|
999
|
+
* Added Dataset#<< as shorthand for inserting records.
|
1000
|
+
|
1001
|
+
* Added Database#<< method for executing arbitrary SQL.
|
1002
|
+
|
1003
|
+
* Imported Sequel code.
|