sequel 2.2.0 → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +1551 -4
- data/README +306 -19
- data/Rakefile +84 -56
- data/bin/sequel +106 -0
- data/doc/cheat_sheet.rdoc +225 -0
- data/doc/dataset_filtering.rdoc +182 -0
- data/lib/sequel_core.rb +136 -0
- data/lib/sequel_core/adapters/adapter_skeleton.rb +54 -0
- data/lib/sequel_core/adapters/ado.rb +80 -0
- data/lib/sequel_core/adapters/db2.rb +148 -0
- data/lib/sequel_core/adapters/dbi.rb +117 -0
- data/lib/sequel_core/adapters/informix.rb +78 -0
- data/lib/sequel_core/adapters/jdbc.rb +186 -0
- data/lib/sequel_core/adapters/jdbc/mysql.rb +55 -0
- data/lib/sequel_core/adapters/jdbc/postgresql.rb +66 -0
- data/lib/sequel_core/adapters/jdbc/sqlite.rb +47 -0
- data/lib/sequel_core/adapters/mysql.rb +231 -0
- data/lib/sequel_core/adapters/odbc.rb +155 -0
- data/lib/sequel_core/adapters/odbc_mssql.rb +106 -0
- data/lib/sequel_core/adapters/openbase.rb +64 -0
- data/lib/sequel_core/adapters/oracle.rb +170 -0
- data/lib/sequel_core/adapters/postgres.rb +199 -0
- data/lib/sequel_core/adapters/shared/mysql.rb +275 -0
- data/lib/sequel_core/adapters/shared/postgres.rb +351 -0
- data/lib/sequel_core/adapters/shared/sqlite.rb +146 -0
- data/lib/sequel_core/adapters/sqlite.rb +138 -0
- data/lib/sequel_core/connection_pool.rb +194 -0
- data/lib/sequel_core/core_ext.rb +203 -0
- data/lib/sequel_core/core_sql.rb +184 -0
- data/lib/sequel_core/database.rb +471 -0
- data/lib/sequel_core/database/schema.rb +156 -0
- data/lib/sequel_core/dataset.rb +457 -0
- data/lib/sequel_core/dataset/callback.rb +13 -0
- data/lib/sequel_core/dataset/convenience.rb +245 -0
- data/lib/sequel_core/dataset/pagination.rb +96 -0
- data/lib/sequel_core/dataset/query.rb +41 -0
- data/lib/sequel_core/dataset/schema.rb +15 -0
- data/lib/sequel_core/dataset/sql.rb +889 -0
- data/lib/sequel_core/deprecated.rb +26 -0
- data/lib/sequel_core/exceptions.rb +42 -0
- data/lib/sequel_core/migration.rb +187 -0
- data/lib/sequel_core/object_graph.rb +216 -0
- data/lib/sequel_core/pretty_table.rb +71 -0
- data/lib/sequel_core/schema.rb +2 -0
- data/lib/sequel_core/schema/generator.rb +239 -0
- data/lib/sequel_core/schema/sql.rb +325 -0
- data/lib/sequel_core/sql.rb +812 -0
- data/lib/sequel_model.rb +5 -1
- data/lib/sequel_model/association_reflection.rb +3 -8
- data/lib/sequel_model/base.rb +15 -10
- data/lib/sequel_model/inflector.rb +3 -5
- data/lib/sequel_model/plugins.rb +1 -1
- data/lib/sequel_model/record.rb +11 -3
- data/lib/sequel_model/schema.rb +4 -4
- data/lib/sequel_model/validations.rb +6 -1
- data/spec/adapters/ado_spec.rb +17 -0
- data/spec/adapters/informix_spec.rb +96 -0
- data/spec/adapters/mysql_spec.rb +764 -0
- data/spec/adapters/oracle_spec.rb +222 -0
- data/spec/adapters/postgres_spec.rb +441 -0
- data/spec/adapters/spec_helper.rb +7 -0
- data/spec/adapters/sqlite_spec.rb +400 -0
- data/spec/integration/dataset_test.rb +51 -0
- data/spec/integration/eager_loader_test.rb +702 -0
- data/spec/integration/schema_test.rb +102 -0
- data/spec/integration/spec_helper.rb +44 -0
- data/spec/integration/type_test.rb +43 -0
- data/spec/rcov.opts +2 -0
- data/spec/sequel_core/connection_pool_spec.rb +363 -0
- data/spec/sequel_core/core_ext_spec.rb +156 -0
- data/spec/sequel_core/core_sql_spec.rb +427 -0
- data/spec/sequel_core/database_spec.rb +964 -0
- data/spec/sequel_core/dataset_spec.rb +2977 -0
- data/spec/sequel_core/expression_filters_spec.rb +346 -0
- data/spec/sequel_core/migration_spec.rb +261 -0
- data/spec/sequel_core/object_graph_spec.rb +234 -0
- data/spec/sequel_core/pretty_table_spec.rb +58 -0
- data/spec/sequel_core/schema_generator_spec.rb +122 -0
- data/spec/sequel_core/schema_spec.rb +497 -0
- data/spec/sequel_core/spec_helper.rb +51 -0
- data/spec/{association_reflection_spec.rb → sequel_model/association_reflection_spec.rb} +6 -6
- data/spec/{associations_spec.rb → sequel_model/associations_spec.rb} +47 -18
- data/spec/{base_spec.rb → sequel_model/base_spec.rb} +2 -1
- data/spec/{caching_spec.rb → sequel_model/caching_spec.rb} +0 -0
- data/spec/{dataset_methods_spec.rb → sequel_model/dataset_methods_spec.rb} +13 -1
- data/spec/{eager_loading_spec.rb → sequel_model/eager_loading_spec.rb} +75 -14
- data/spec/{hooks_spec.rb → sequel_model/hooks_spec.rb} +4 -4
- data/spec/sequel_model/inflector_spec.rb +119 -0
- data/spec/{model_spec.rb → sequel_model/model_spec.rb} +30 -11
- data/spec/{plugins_spec.rb → sequel_model/plugins_spec.rb} +0 -0
- data/spec/{record_spec.rb → sequel_model/record_spec.rb} +47 -6
- data/spec/{schema_spec.rb → sequel_model/schema_spec.rb} +18 -4
- data/spec/{spec_helper.rb → sequel_model/spec_helper.rb} +3 -2
- data/spec/{validations_spec.rb → sequel_model/validations_spec.rb} +37 -17
- data/spec/spec_config.rb +9 -0
- data/spec/spec_config.rb.example +10 -0
- metadata +110 -37
- data/spec/inflector_spec.rb +0 -34
data/CHANGELOG
CHANGED
@@ -1,3 +1,39 @@
|
|
1
|
+
=== 2.3.0 (2008-07-25)
|
2
|
+
|
3
|
+
* Enable almost full support for MySQL using JDBC (jeremyevans)
|
4
|
+
|
5
|
+
* Fix ODBC adapter's conversion of ::ODBC::Time values (Michael Xavier)
|
6
|
+
|
7
|
+
* Enable full support for SQLite-JDBC using the JDBC adapter (jeremyevans)
|
8
|
+
|
9
|
+
* Minor changes to allow for full Ruby 1.9 compatibility (jeremyevans)
|
10
|
+
|
11
|
+
* Make Database#disconnect work for the ADO adapter (spicyj)
|
12
|
+
|
13
|
+
* Don't raise an exception in the ADO adapter if the dataset contains no records (nusco)
|
14
|
+
|
15
|
+
* Enable almost full support of PostgreSQL-JDBC using the JDBC adapter (jeremyevans)
|
16
|
+
|
17
|
+
* Remove Sequel::Worker (jeremyevans)
|
18
|
+
|
19
|
+
* Make PostgreSQL adapter not raise an error when inserting records into a table without a primary key (jeremyevans)
|
20
|
+
|
21
|
+
* Make Database.uri_to_options a private class method (jeremyevans)
|
22
|
+
|
23
|
+
* Make JDBC load drivers automatically for PostgreSQL, MySQL, SQLite, Oracle, and MSSQL (jeremyevans)
|
24
|
+
|
25
|
+
* Make Oracle adapter work with a nonstandard Oracle database port (pavel.lukin)
|
26
|
+
|
27
|
+
* Typecast '' to nil by default for non-string non-blob columns, add typecast_empty_string_to_nil= model class and instance methods (jeremyevans)
|
28
|
+
|
29
|
+
* Use a simpler select in Dataset#empty?, fixes use with MySQL (jeremyevans)
|
30
|
+
|
31
|
+
* Add integration test suite, testing sequel against a real database, with nothing mocked (jeremyevans)
|
32
|
+
|
33
|
+
* Make validates_length_of default tag depend on presence of options passed to it (jeremyevans)
|
34
|
+
|
35
|
+
* Combine the directory structure for sequel_model and sequel_core, now there is going to be only one gem named sequel (jeremyevans)
|
36
|
+
|
1
37
|
=== 2.2.0 (2008-07-05)
|
2
38
|
|
3
39
|
* Add :extend association option, extending the dataset with module(s) (jeremyevans)
|
@@ -34,6 +70,42 @@
|
|
34
70
|
|
35
71
|
* Add the Model.to_hash dataset method (jeremyevans)
|
36
72
|
|
73
|
+
* Filter blocks now yield a SQL::VirtualRow argument, which is useful if another library defines operator methods on Symbol (jeremyevans)
|
74
|
+
|
75
|
+
* Add Symbol#identifier method, to make x__a be treated as "x__a" instead of "x"."a" (jeremyevans)
|
76
|
+
|
77
|
+
* Dataset#update no longer takes a block, please use a hash argument with the expression syntax instead (jeremyevans)
|
78
|
+
|
79
|
+
* ParseTree support has been removed from Sequel (jeremyevans)
|
80
|
+
|
81
|
+
* Database#drop_column is now supported in the SQLite adapter (abhay)
|
82
|
+
|
83
|
+
* Tinyint columns can now be considered integers instead of booleans by setting Sequel.convert_tinyint_to_bool = false (samsouder)
|
84
|
+
|
85
|
+
* Allow the use of URL parameters in connection strings (jeremyevans)
|
86
|
+
|
87
|
+
* Ignore any previously selected columns when using Dataset#graph for the first time (jeremyevans)
|
88
|
+
|
89
|
+
* Dataset#graph now accepts a block which is passed to join_table (jeremyevans)
|
90
|
+
|
91
|
+
* Make Dataset#columns ignore any filtering, ordering, and distinct clauses (jeremyevans)
|
92
|
+
|
93
|
+
* Use the safer connection-specific string escaping methods for PostgreSQL (jeremyevans)
|
94
|
+
|
95
|
+
* Database#transaction now yields a connection when using the Postgres adapter, just like it does for other adapters (jeremyevans)
|
96
|
+
|
97
|
+
* Dataset#count now works for a limited dataset (divoxx)
|
98
|
+
|
99
|
+
* Database#add_index is now supported in the SQLite adapter (abhay)
|
100
|
+
|
101
|
+
* Sequel's MySQL adapter should no longer conflict with ActiveRecord's use of MySQL (careo)
|
102
|
+
|
103
|
+
* Treat Hash as expression instead of column alias when used in DISTINCT, ORDER BY, and GROUP BY clauses (jeremyevans)
|
104
|
+
|
105
|
+
* PostgreSQL bytea fields are now fully supported (dlee)
|
106
|
+
|
107
|
+
* For PostgreSQL, don't raise an error when assigning a value to a SERIAL PRIMARY KEY field when inserting records (jeremyevans)
|
108
|
+
|
37
109
|
=== 2.1.0 (2008-06-17)
|
38
110
|
|
39
111
|
* Break association add_/remove_/remove_all_ methods into two parts, for easier overriding (jeremyevans)
|
@@ -51,7 +123,7 @@
|
|
51
123
|
* The :reciprocal option to associations should now be the symbol name of the reciprocal association, not an instance variable symbol (jeremyevans)
|
52
124
|
|
53
125
|
* Add Model#associations, which is a hash holding a cache of associated objects, with each association being a separate key (jeremyevans)
|
54
|
-
|
126
|
+
|
55
127
|
* Make all associations support a :graph_select option, specifying a column or array of columns to select when using eager_graph (jeremyevans)
|
56
128
|
|
57
129
|
* Bring back Model#set and Model#update, now the same as Model#set_with_params and Model#update_with_params (jeremyevans)
|
@@ -72,12 +144,72 @@
|
|
72
144
|
|
73
145
|
* Add support for :if option on validations, using a symbol (specifying an instance method) or a proc (dtsato)
|
74
146
|
|
147
|
+
* Support bitwise operators for NumericExpressions: &, |, ^, ~, <<, >> (jeremyevans)
|
148
|
+
|
149
|
+
* No longer raise an error for Dataset#filter(true) or Dataset#filter(false) (jeremyevans)
|
150
|
+
|
151
|
+
* Allow Dataset #filter, #or, #exclude and other methods that call them to use both the block and regular arguments (jeremyevans)
|
152
|
+
|
153
|
+
* ParseTree support is now officially deprecated, use Sequel.use_parse_tree = false to use the expression (blockless) filters inside blocks (jeremyevans)
|
154
|
+
|
155
|
+
* Remove :pool_reuse_connections ConnectionPool/Database option, MySQL users need to be careful with nested queries (jeremyevans)
|
156
|
+
|
157
|
+
* Allow Dataset#graph :select option to take an array of columns to select (jeremyevans)
|
158
|
+
|
159
|
+
* Allow Dataset#to_hash to be called with only one argument, allowing for easy creation of lookup tables for a single key (jeremyevans)
|
160
|
+
|
161
|
+
* Allow join_table to accept a block providing the aliases and previous joins, that allows you to specify arbitrary conditions properly qualified (jeremyevans)
|
162
|
+
|
163
|
+
* Support NATURAL, CROSS, and USING joins in join_table (jeremyevans)
|
164
|
+
|
165
|
+
* Make sure HAVING comes before ORDER BY, per the SQL standard and at least MySQL, PostgreSQL, and SQLite (juco)
|
166
|
+
|
167
|
+
* Add cast_numeric and cast_string methods for use in the Sequel DSL, that have default types and wrap the object in the correct class (jeremyevans)
|
168
|
+
|
169
|
+
* Add Symbol#qualify, for adding a table/schema qualifier to a column/table name (jeremyevans)
|
170
|
+
|
171
|
+
* Remove Module#metaprivate, since it duplicates the standard Module#private_class_method (jeremyevans)
|
172
|
+
|
173
|
+
* Support the SQL CASE expression via Array#case and Hash#case (jeremyevans)
|
174
|
+
|
175
|
+
* Support the SQL EXTRACT function: :date.extract(:year) (jeremyevans)
|
176
|
+
|
177
|
+
* Convert numeric fields to BigDecimal in PostgreSQL adapter (jeremyevans)
|
178
|
+
|
179
|
+
* Add :decimal fields to the schema parser (jeremyevans)
|
180
|
+
|
181
|
+
* The expr argument in join table now allows the same argument as filter, so it can take a string or a blockless filter expression (brushbox, jeremyevans)
|
182
|
+
|
183
|
+
* No longer assume the expr argument to join_table references the primary key column (jeremyevans)
|
184
|
+
|
185
|
+
* Rename the Sequel.time_class setting to Sequel.datetime_class (jeremyevans)
|
186
|
+
|
187
|
+
* Add savepoint/nesting support to postgresql transactions (elven)
|
188
|
+
|
189
|
+
* Use the specified table alias when joining a dataset, instead of the automatically generated alias (brushbox)
|
190
|
+
|
75
191
|
=== 2.0.1 (2008-06-04)
|
76
192
|
|
77
193
|
* Make the choice of Time or DateTime optional for typecasting :datetime types, default to Time (jeremyevans)
|
78
194
|
|
79
195
|
* Reload database schema for table when calling Model.create_table (jeremyevans)
|
80
196
|
|
197
|
+
* Have PostgreSQL money type use BigDecimal instead of Float (jeremyevans)
|
198
|
+
|
199
|
+
* Have the PostgreSQL and MySQL adapters use the Sequel.time_class setting for datetime/timestamp types (jeremyevans)
|
200
|
+
|
201
|
+
* Add Sequel.time_class and String#to_sequel_time, used for converting time values from the database to either Time (default) or DateTime (jeremyevans)
|
202
|
+
|
203
|
+
* Make identifier quoting uppercase by default, to work better with the SQL standard, override in PostgreSQL (jeremyevans) (#232)
|
204
|
+
|
205
|
+
* Add StringExpression#+, for simple SQL string concatenation (:x.sql_string + :y) (jeremyevans)
|
206
|
+
|
207
|
+
* Make StringMethods.like to a case sensensitive search on MySQL (use ilike for the old behavior) (jeremyevans)
|
208
|
+
|
209
|
+
* Add StringMethods.ilike, for case insensitive pattern matching (jeremyevans)
|
210
|
+
|
211
|
+
* Refactor ComplexExpression into three subclasses and a few modules, so operators that don't make sense are not defined for the class (jeremyevans)
|
212
|
+
|
81
213
|
=== 2.0.0 (2008-06-01)
|
82
214
|
|
83
215
|
* Comprehensive update of all documentation (jeremyevans)
|
@@ -101,17 +233,133 @@
|
|
101
233
|
* Make all associations support the :select option, not just many_to_many (jeremyevans)
|
102
234
|
|
103
235
|
* Allow the use of blocks when eager loading, and add the :eager_block and :allow_eager association options for configuration (jeremyevans)
|
104
|
-
|
236
|
+
|
105
237
|
* Add the :graph_join_type, :graph_conditions, and :graph_join_table_conditions association options, used when eager graphing (jeremyevans)
|
106
238
|
|
107
239
|
* Add AssociationReflection class (subclass of Hash), to make calling a couple of private Model methods unnecessary (jeremyevans)
|
108
240
|
|
109
241
|
* Change hook methods so that if a tag/method is specified it overwrites an existing hook block with the same tag/method (jeremyevans)
|
110
242
|
|
243
|
+
* Refactor String inflection support, you must use String.inflections instead of Inflector.inflections now (jeremyevans)
|
244
|
+
|
245
|
+
* Allow connection to ODBC-MSSQL via a URL (petersumskas) (#230)
|
246
|
+
|
247
|
+
* Comprehensive update of all documentation, except for the block filters and adapters (jeremyevans)
|
248
|
+
|
249
|
+
* Handle Date and DateTime value literalization correctly in adapters (jeremyevans)
|
250
|
+
|
251
|
+
* Literalize DateTime values the same as Time values (jeremyevans)
|
252
|
+
|
253
|
+
* MySQL tinyints are now returned as boolean values instead of integers (jeremyevans)
|
254
|
+
|
255
|
+
* Set additional MySQL charset options required for creating tables and databases (tmm1)
|
256
|
+
|
257
|
+
* Remove methods deprecated in 1.5.0 (jeremyevans)
|
258
|
+
|
259
|
+
* Add Module#metaattr_accessor for creating attr_accessors for the metaclass (jeremyevans)
|
260
|
+
|
261
|
+
* Add SQL string concatenation support to blockless filters, via Array#sql_string_join (jeremyevans)
|
262
|
+
|
263
|
+
* Add Pagination#last_page? and Pagination#first_page? (apeiros)
|
264
|
+
|
265
|
+
* Add limited column reflection support, tested on PostgreSQL, MySQL, and SQLite (jeremyevans)
|
266
|
+
|
267
|
+
* Allow the use of :schema__table___table_alias syntax for tables, similar to the column support (jeremyevans)
|
268
|
+
|
269
|
+
* Merge metaid gem into core_ext.rb and clean it up, so sequel now has no external dependencies (jeremyevans)
|
270
|
+
|
271
|
+
* Add Dataset#as, so using a dataset as a column with an alias is not deprecated (jeremyevans)
|
272
|
+
|
273
|
+
* Add Dataset#invert, which returns a dataset with inverted HAVING and WHERE clauses (jeremyevans)
|
274
|
+
|
275
|
+
* Add blockless filter syntax support (jeremyevans)
|
276
|
+
|
277
|
+
* Passing an array to Dataset#order and Dataset#select no longer works, you need to pass multiple arguments (jeremyevans)
|
278
|
+
|
279
|
+
* You should use '?' instead of '(?)' when using interpolated strings with array arguments (jeremyevans)
|
280
|
+
|
281
|
+
* Dataset.literal now surrounds the literalization of arrays with parentheses (jeremyevans)
|
282
|
+
|
283
|
+
* Add echo option (back?) to sequel command line tool, via -E or --echo (jeremyevans)
|
284
|
+
|
285
|
+
* Allow databases to have multiple loggers (jeremyevans)
|
286
|
+
|
287
|
+
* The sequel command line tool now also accepts a path to a database config YAML file in addition to a URI (mtodd)
|
288
|
+
|
289
|
+
* Major update of the postgresql adapter (jdavis, jeremyevans) (#225)
|
290
|
+
|
291
|
+
* Make returning inside of a database transaction commit the transaction (ahoward, jeremyevans)
|
292
|
+
|
293
|
+
* Dataset#to_table_reference is now protected, and it has a different API (jeremyevans)
|
294
|
+
|
295
|
+
* Dataset#join_table and related functions now take an explicit optional table_alias argument, you can no longer include the table alias in the table argument (jeremyevans)
|
296
|
+
|
297
|
+
* Aliased and/or qualified columns with embedded spaces can now be specified as symbols (jeremyevans)
|
298
|
+
|
299
|
+
* When identifier quoting is enabled, the SQL standard double quote is used by default (jeremyevans)
|
300
|
+
|
301
|
+
* When identifier quoting is enabled, quote tables as well as columns (jeremyevans)
|
302
|
+
|
303
|
+
* Make identifier quoting optional, enabled by default (jeremyevans)
|
304
|
+
|
305
|
+
* Allow Sequel::Database.connect and related methods to take a block that disconnects the database when the block finishes (jeremyevans)
|
306
|
+
|
307
|
+
* Add Dataset#unfiltered, for removing filters from dataset (jeremyevans)
|
308
|
+
|
309
|
+
* Add add_foreign_key and add_primary_key methods to the AlterTableGenerator (jeremyevans)
|
310
|
+
|
311
|
+
* Allow migration files to have more than 3 digits (jeremyevans)
|
312
|
+
|
313
|
+
* Add methods directly to Dataset instead of including modules (jeremyevans)
|
314
|
+
|
315
|
+
* Make some Dataset instance methods private: invert_order, insert_default_values_sql (jeremyevans)
|
316
|
+
|
317
|
+
* Don't add methods that depend on ParseTree unless you can load ParseTree (jeremyevans)
|
318
|
+
|
319
|
+
* Don't wipeout the cached columns every time a dataset is cloned, but only on changes to :select, :sql, :from, or :join (jeremyevans)
|
320
|
+
|
321
|
+
* Fix Oracle Adapter (yasushi.abe)
|
322
|
+
|
323
|
+
* Fixed sqlite uri so that sqlite:// works just like file:// (2 slashes for a relative path, 3 for an absolute) (dlee)
|
324
|
+
|
325
|
+
* Raise a Sequel::Error if an invalid limit or offset is used (jeremyevans)
|
326
|
+
|
327
|
+
* Refactor and beef up Dataset#first and Dataset#last, with some change in functionality (jeremyevans)
|
328
|
+
|
329
|
+
* Add String#to_datetime, for consistency (jeremyevans)
|
330
|
+
|
331
|
+
* Fix Range#interval so that it returns 1 less for an exclusive range
|
332
|
+
|
333
|
+
* Change SQLite adapter so it doesn't swallow exceptions other than SQLite3::Exception (such as Interrupt) (jeremyevans)
|
334
|
+
|
335
|
+
* Change PostgreSQL and MySQL adapters to raise Sequel::Error instead of database specific errors if a database error occurs (jeremyevans)
|
336
|
+
|
337
|
+
* Using a memory database with SQLite now defaults to a single connection, so all queries it uses run against the same database (jeremyevans)
|
338
|
+
|
339
|
+
* Fix attempting to query MySQL using the same connection being used to concurrently execute another query (jeremyevans)
|
340
|
+
|
341
|
+
* Add options to the connection pool to configure reusing connections and converting exceptions (jeremyevans)
|
342
|
+
|
343
|
+
* Use the database driver provided string quoting methods for MySQL and SQLite (jeremyevans) (#223)
|
344
|
+
|
345
|
+
* Add ColumnAll#==, for checking the equality of two ColumnAlls (jeremyevans)
|
346
|
+
|
347
|
+
* Allow an array of arrays instead of a hash when specifying conditions (jeremyevans)
|
348
|
+
|
349
|
+
* Add Sequel::DBI::Database#lowercase, for lowercasing column names (jamesearl)
|
350
|
+
|
351
|
+
* Remove Dataset#extend_with_destroy, which may break code that uses Dataset#set_model directly and expects the destroy method to be added (jeremyevans)
|
352
|
+
|
353
|
+
* Fix some issues when running on Ruby 1.9 (Zverok, jeremyevans)
|
354
|
+
|
355
|
+
* Make the DBI adapter work (partially) with PostgreSQL (Seb)
|
356
|
+
|
111
357
|
=== 1.5.1 (2008-04-30)
|
112
358
|
|
113
359
|
* Fix Dataset#eager_graph when not all objects have associated objects (jeremyevans)
|
114
360
|
|
361
|
+
* Have Dataset#graph give a nil value instead of a hash with all nil values if no matching rows exist in the graphed table (jeremyevans)
|
362
|
+
|
115
363
|
=== 1.5.0 (2008-04-29)
|
116
364
|
|
117
365
|
* Make the validation errors API compatible with Merb (Inviz)
|
@@ -151,7 +399,7 @@
|
|
151
399
|
* No longer depend on the assistance gem, merge the Inflector and Validations code (jeremyevans)
|
152
400
|
|
153
401
|
* Add Model#set_with_params, which is Model#update_with_params without the save (jeremyevans)
|
154
|
-
|
402
|
+
|
155
403
|
* Fix Model#destroy so that it returns self, not the result of after_destroy (jeremyevans)
|
156
404
|
|
157
405
|
* Define Model column accessors in set_dataset, so they should always be avaiable, deprecate Model#method_missing (jeremyevans)
|
@@ -168,7 +416,79 @@
|
|
168
416
|
|
169
417
|
* Remove pretty_table.rb from sequel, since it is in sequel_core (jeremyevans)
|
170
418
|
|
171
|
-
|
419
|
+
* Set a timeout in the Sqlite adapter, default to 5 seconds (hrvoje.marjanovic) (#218)
|
420
|
+
|
421
|
+
* Document that calling Sequel::ODBC::Database#execute manually requires you to manually drop the returned object (jeremyevans) (#217)
|
422
|
+
|
423
|
+
* Paginating an already paginated/limited dataset now raises an error (jeremyevans)
|
424
|
+
|
425
|
+
* Add support for PostgreSQL partial indexes (dlee)
|
426
|
+
|
427
|
+
* Added support for arbitrary index types (including spatial indexes) (dlee)
|
428
|
+
|
429
|
+
* Quote column names in SQL generated for SQLite (tmm1)
|
430
|
+
|
431
|
+
* Deprecate Object#rollback! (jeremyevans)
|
432
|
+
|
433
|
+
* Make some Dataset methods private (qualified_column_name, column_list, table_ref, source_list) (jeremyevans)
|
434
|
+
|
435
|
+
* Deprecate Dataset methods #set_options, #set_row_proc, #remove_row_proc, and #clone_merge (jeremyevans)
|
436
|
+
|
437
|
+
* Add Symbol#*, a replacement for Symbol#all (jeremyevans)
|
438
|
+
|
439
|
+
* Deprecate including ColumnMethods in Object, include it in Symbol, String, and Sequel::SQL::Expression (jeremyevans)
|
440
|
+
|
441
|
+
* Deprecate Symbol#method_missing, and #AS, #DESC, #ASC, #ALL, and #all from ColumnMethods (jeremyevans)
|
442
|
+
|
443
|
+
* Fix table joining in MySQL (jeremyevans)
|
444
|
+
|
445
|
+
* Deprecate Sequel.method_missing and Object#Sequel, add real Sequel.adapter methods (jeremyevans)
|
446
|
+
|
447
|
+
* Move dataset methods applicable only to paginated datasets into Sequel::Dataset::Pagination (jeremyevans)
|
448
|
+
|
449
|
+
* Make Sequel::Dataset::Sequelizer methods private (jeremyevans)
|
450
|
+
|
451
|
+
* Deprecate Dataset#method_missing, add real mutation methods (e.g. filter!) (jeremyevans)
|
452
|
+
|
453
|
+
* Fix connecting to an MSSQL server via ODBC using domain user credentials (jeremyevans) (#216)
|
454
|
+
|
455
|
+
* No longer depend on the assistance gem, merge in the ConnectionPool and .blank methods (jeremyevans)
|
456
|
+
|
457
|
+
* No longer depend on ParseTree, RubyInline, or ruby2ruby, but you still need them if you want to use the block filters (jeremyevans)
|
458
|
+
|
459
|
+
* Fix JDBC adapter by issuing index things start at 1 (pdamer)
|
460
|
+
|
461
|
+
* Fix connecting to a database via the ADO adapter (now requires options instead of URI) (timuckun, jeremyevans) (#204)
|
462
|
+
|
463
|
+
* Support storing microseconds in postgres timestamp fields (schnarch...@rootimage.msu.edu) (#215)
|
464
|
+
|
465
|
+
* Allow joining of multiple datasets, by making the table alias different for each dataset joined (jeremyevans)
|
466
|
+
|
467
|
+
* SECURITY: Fix backslash escaping of strings (dlee)
|
468
|
+
|
469
|
+
* Add ability to create a graph of objects from a query, with the result split into corresponding tables (jeremyevans) (#113)
|
470
|
+
|
471
|
+
* Add attr_accessor for dataset row_proc (jeremyevans)
|
472
|
+
|
473
|
+
* Don't redefine Dataset#each when adding a transform or row_proc (jeremyevans)
|
474
|
+
|
475
|
+
* Remove array_keys.rb from sequel_core, it was partially broken (since the arrays came from hashes), and redefined Dataset#each (jeremyevans)
|
476
|
+
|
477
|
+
* Fix MySQL default values insert (matt.binary) (#196)
|
478
|
+
|
479
|
+
* Fix ODBC adapter improperly escaping date and timestamp values (leo.borisenko) (#165)
|
480
|
+
|
481
|
+
* Fix renaming columns on MySQL with type :varchar (jeremyevans) (#206)
|
482
|
+
|
483
|
+
* Add Sequel::SQL::Function#==, for comparing SQL Functions (jeremyevans) (#209)
|
484
|
+
|
485
|
+
* Update Informix adapter to work with Ruby/Informix 0.7.0 (gerardo.santana@gmail.com)
|
486
|
+
|
487
|
+
* Remove sequel_core's knowledge of Sequel::Model (jeremyevans)
|
488
|
+
|
489
|
+
* Use "\n" instead of $/ (since $/ can be redefined in ways we do not want) (jeremyevans)
|
490
|
+
|
491
|
+
=== 1.4.0 (2008-04-08)
|
172
492
|
|
173
493
|
* Don't mark a column as changed unless the new value is different from the current value (tamas.denes, jeremyevans) (#203).
|
174
494
|
|
@@ -184,6 +504,1233 @@
|
|
184
504
|
|
185
505
|
* Fix associations with block arguments and :cache=>true (jeremyevans).
|
186
506
|
|
507
|
+
* Merge 3 mysql patches from the bugtracker (mvyver) (#200, #201, #202).
|
508
|
+
|
509
|
+
* Merge 2 postgresql patches from the bugtracker (a...@mellowtone.co.jp) (#211, 212).
|
510
|
+
|
511
|
+
* Allow overriding of default posgres spec database via ENV['SEQUEL_PG_SPEC_DB'] (jeremyevans).
|
512
|
+
|
513
|
+
* Allow using the Sequel::Model as the first argument in a dataset join selection (jeremyevans) (#170).
|
514
|
+
|
515
|
+
* Add simple callback mechanism to make model eager loading implementation easier (jeremyevans).
|
516
|
+
|
517
|
+
* Added Sequel::Error::InvalidOperation class for invalid operations (#198).
|
518
|
+
|
519
|
+
* Implemented MySQL::Database#server_version (#199).
|
520
|
+
|
521
|
+
* Added spec configuration for MySQL socket file.
|
522
|
+
|
523
|
+
* Fixed transform with array tuples in postgres adapter.
|
524
|
+
|
525
|
+
* Changed spec configuration to Database objects instead of URIs in order to support custom options for spec databases.
|
526
|
+
|
527
|
+
* Renamed schema files.
|
528
|
+
|
529
|
+
* Fixed Dataset#from to work correctly with SQL functions (#193).
|
530
|
+
|
531
|
+
===Previous to 1.4.0, Sequel model and Sequel core versioning differed, see the bottom of this file for the changelog to Sequel model prior to 1.4.0.
|
532
|
+
|
533
|
+
=== 1.3 (2008-03-08)
|
534
|
+
|
535
|
+
* Added configuration file for running specs (#186).
|
536
|
+
|
537
|
+
* Changed Database#drop_index to accept fixed arity (#173).
|
538
|
+
|
539
|
+
* Changed column definition sql to put UNSIGNED constraint before unique in order to satisfy MySQL (#171).
|
540
|
+
|
541
|
+
* Enhanced MySQL adapter to support load data local infile_, added compress option for mysql connection by default (#172).
|
542
|
+
|
543
|
+
* Fixed bug when inserting hashes in array tuples mode.
|
544
|
+
|
545
|
+
* Changed SQLite adapter to catch RuntimeError raised when executing a statement and raise an Error::InvalidStatement with the offending SQL and error message (#188).
|
546
|
+
|
547
|
+
* Added Error::InvalidStatement class.
|
548
|
+
|
549
|
+
* Fixed Dataset#reverse to not raise for unordered dataset (#189).
|
550
|
+
|
551
|
+
* Added Dataset#unordered method and changed #order to remove order if nil is specified (#190).
|
552
|
+
|
553
|
+
* Fixed reversing order of ASC expression (#164).
|
554
|
+
|
555
|
+
* Added support for :null => true option when defining table columns (#192).
|
556
|
+
|
557
|
+
* Fixed Symbol#method_missing to accept variable arity (#185).
|
558
|
+
|
559
|
+
=== 1.2.1 (2008-02-29)
|
560
|
+
|
561
|
+
* Added add_constraint and drop_constraint functionality to Database#alter_table (#182).
|
562
|
+
|
563
|
+
* Enhanced Dataset#multi_insert to accept datasets (#179).
|
564
|
+
|
565
|
+
* Added MySQL::Database#use method for switching database (#180).
|
566
|
+
|
567
|
+
* Enhanced Database.uri_to_options to accept uri strings (#178).
|
568
|
+
|
569
|
+
* Added Dataset#columns! method that always makes a roundtrip to the DB (#177).
|
570
|
+
|
571
|
+
* Added new Dataset#each_page method that iterates over all pages in the result set (#175).
|
572
|
+
|
573
|
+
* Added Dataset#reverse alias to Dataset#reverse_order (#174).
|
574
|
+
|
575
|
+
* Fixed Dataset#transform_load and #transform_save to create a trasnformed copy of the supplied hash instead of transforming it in place (#184).
|
576
|
+
|
577
|
+
* Implemented MySQL::Dataset#replace (#163).
|
578
|
+
|
579
|
+
=== 1.2 (2008-02-15)
|
580
|
+
|
581
|
+
* Added support for :varchar[100] like type declarations in #create_table.
|
582
|
+
|
583
|
+
* Fixed #rename_column in mysql adapter to support types like varchar(255) (#159).
|
584
|
+
|
585
|
+
* Added support for order and limit in DELETE statement in MySQL adapter (#160).
|
586
|
+
|
587
|
+
* Added checks to Dataset#multi_insert to prevent work if no values are given (#162).
|
588
|
+
|
589
|
+
* Override ruby2ruby implementation of Proc#to_sexp which leaks memory (#161).
|
590
|
+
|
591
|
+
* Added log option, help for sequel script (#157).
|
592
|
+
|
593
|
+
=== 1.1 (2008-02-15)
|
594
|
+
|
595
|
+
* Fixed Dataset#join_table to support joining of datasets (#156).
|
596
|
+
|
597
|
+
* Changed Dataset#empty? to use EXISTS condition instead of counting records, for much better performance (#158).
|
598
|
+
|
599
|
+
* Implemented insertion of multiple records in a single statement for postgres adapter. This feature is available only in postgres 8.2 and newer.
|
600
|
+
|
601
|
+
* Implemented Postgres::Database#server_version.
|
602
|
+
|
603
|
+
* Implemented Database#get, short for dataset.get(...).
|
604
|
+
|
605
|
+
* Refactored Dataset#multi_insert, added #import alias, added support for calling #multi_insert using array of columns and array of value arrays (thanks David Lee).
|
606
|
+
|
607
|
+
* Implemented Dataset#get, a replacement for select(column).first[column].
|
608
|
+
|
609
|
+
* Implemented Dataset#grep method, poor man's text search.
|
610
|
+
|
611
|
+
=== 1.0.10 (2008-02-13)
|
612
|
+
|
613
|
+
* Fixed Datset#group_and_count to work inside a query block (#152).
|
614
|
+
|
615
|
+
* Changed datasets with transforms to automatically transform hash filters (#155).
|
616
|
+
|
617
|
+
* Changed Marshal stock transform to use Base64 encoding with backward-compatibility to support existing marshaled values (#154).
|
618
|
+
|
619
|
+
* Added support for inserting multiple records in a single statement using #multi_insert in MySQL adapter (#153).
|
620
|
+
|
621
|
+
* Added support for :slice option (same as :commit_every) in Dataset#multi_insert.
|
622
|
+
|
623
|
+
* Changed Dataset#all to accept opts and iteration block.
|
624
|
+
|
625
|
+
=== 1.0.9 (2008-02-10)
|
626
|
+
|
627
|
+
* Implemented Dataset#inspect and Database#inspect (#151).
|
628
|
+
|
629
|
+
* Added full-text searching for odbc_mssql adapter (thanks Joseph Love).
|
630
|
+
|
631
|
+
* Added AlterTableGenerator#add_full_text_index method.
|
632
|
+
|
633
|
+
* Implemented full_text indexing and searching for PostgreSQL adapter (thanks David Lee).
|
634
|
+
|
635
|
+
* Implemented full_text indexing and searching for MySQL adapter (thanks David Lee).
|
636
|
+
|
637
|
+
* Fixed Dataset#insert_sql to work with array subscript references (thanks Jim Morris).
|
638
|
+
|
639
|
+
=== 1.0.8 (2008-02-08)
|
640
|
+
|
641
|
+
* Added support for multiple choices in string matching expressions (#147).
|
642
|
+
|
643
|
+
* Renamed Dataset#clone_merge to Dataset#clone, works with or without options for merging (#148).
|
644
|
+
|
645
|
+
* Fixed MySQL::Database#<< method to always free the result in order to allow multiple calls in a row (#149). Same also for PostgreSQL adapter.
|
646
|
+
|
647
|
+
=== 1.0.7 (2008-02-05)
|
648
|
+
|
649
|
+
* Added support for conditional filters (using if else statements) inside block filters (thanks Kee).
|
650
|
+
|
651
|
+
=== 1.0.6 (2008-02-05)
|
652
|
+
|
653
|
+
* Removed code pollution introduced in revs 814, 817 (really bad patch, IMO).
|
654
|
+
|
655
|
+
* Fixed joining datasets using aliased tables (#140).
|
656
|
+
|
657
|
+
* Added support additional field types in postgresql adapter (#146).
|
658
|
+
|
659
|
+
* Added support for date field types in postgresql adapter (#145).
|
660
|
+
|
661
|
+
* Fixed Dataset#count to work correctly for grouped datasets (#144).
|
662
|
+
|
663
|
+
* Added Dataset#select_more, Dataset#order_more methods (#129).
|
664
|
+
|
665
|
+
=== 1.0.5 (2008-01-25)
|
666
|
+
|
667
|
+
* Added support for instantiating models by using the load constructor method.
|
668
|
+
|
669
|
+
=== 1.0.4.1 (2008-01-24)
|
670
|
+
|
671
|
+
* Fixed bin/sequel to require sequel_model if available.
|
672
|
+
|
673
|
+
=== 1.0.4 (2008-01-24)
|
674
|
+
|
675
|
+
* Added Dataset#select_all method.
|
676
|
+
|
677
|
+
* Changed ODBC::Database to support connection using driver and database name, also added support for untitled columns in ODBC::Dataset (thanks Leonid Borisenko).
|
678
|
+
|
679
|
+
* Fixed MySQL adapter to correctly format foreign key definitions (#123).
|
680
|
+
|
681
|
+
* Changed MySQL::Dataset to allow HAVING clause on ungrouped datasets, and put HAVING clause before ORDER BY clause (#133).
|
682
|
+
|
683
|
+
* Changed Dataset#group_and_count to accept multiple columns (#134).
|
684
|
+
|
685
|
+
* Fixed database spec to open YAML file in binary mode (#131).
|
686
|
+
|
687
|
+
* Cleaned up gem spec (#132).
|
688
|
+
|
689
|
+
* Added Dataset#table_exists? convenience method.
|
690
|
+
|
691
|
+
=== 1.0.3 (2008-01-17)
|
692
|
+
|
693
|
+
* Added support for UNSIGNED constraint, used in MySQL? (#127).
|
694
|
+
|
695
|
+
* Implemented constraint definitions inside Database#create_table.
|
696
|
+
|
697
|
+
* Fixed postgres adapter to define PGconn#async_exec as alias to #exec if not defined (for pure-ruby postgres driver).
|
698
|
+
|
699
|
+
* Added String#to_date. Updated mysql adapter to use String#to_date for mysql date types (thanks drfreeze).
|
700
|
+
|
701
|
+
=== 1.0.2 (2008-01-14)
|
702
|
+
|
703
|
+
* Removed ConnectionPool, NumericExtensions. Added dependency on assistance.
|
704
|
+
|
705
|
+
=== 1.0.1 (2008-01-12)
|
706
|
+
|
707
|
+
* Changed postgres adapter to quote column references using double quotes.
|
708
|
+
|
709
|
+
* Applied patch for oracle adapter: fix behavior of limit and offset, transactions, #table_exists?, #tables and additional specs (thanks Liming Lian #122).
|
710
|
+
|
711
|
+
* Allow for additional filters on a grouped dataset (#119 and #120)
|
712
|
+
|
713
|
+
* Changed mysql adapter to default to localhost if :host option is not specified (#114).
|
714
|
+
|
715
|
+
* Refactored Sequelizer to use Proc#to_sexp (method provided by r2r).
|
716
|
+
|
717
|
+
* Enhanced Database.connect to accept options with string keys, so it can now accept options loaded from YAML files. Database.connect also automatically converts :username option into :user for compatibility with existing YAML configuration files for AR and DataMapper.
|
718
|
+
|
719
|
+
=== 1.0.0.1 (2008-01-03)
|
720
|
+
|
721
|
+
* Changed MySQL adapter to support specifying socket option.
|
722
|
+
|
723
|
+
* Added support for limiting and paginating datasets with fixed SQL, gotten with DB#fetch (thanks Ruy Diaz).
|
724
|
+
|
725
|
+
* Added new Dataset#from_self method that returns a dataset selecting from the original dataset.
|
726
|
+
|
727
|
+
=== 1.0 (2008-01-02)
|
728
|
+
|
729
|
+
* Removed deprecated adapter stubs.
|
730
|
+
|
731
|
+
* Removed Sequel::Model() stub.
|
732
|
+
|
733
|
+
* Changed name to sequel_core.
|
734
|
+
|
735
|
+
* 100% code coverage.
|
736
|
+
|
737
|
+
* Fixed error behavior when sequel_model is not available.
|
738
|
+
|
739
|
+
* Fixed error behavior when parse_tree or ruby2ruby are not available.
|
740
|
+
|
741
|
+
=== 0.5.0.2 (2008-01-01)
|
742
|
+
|
743
|
+
* Fixed String#to_time to raise error correctly for invalid time stamps.
|
744
|
+
|
745
|
+
* Improved code coverage - now at 99.2%.
|
746
|
+
|
747
|
+
=== 0.5.0.1 (2007-12-31)
|
748
|
+
|
749
|
+
* Added a stub for Sequel::Model that auto-loads sequel_model.
|
750
|
+
|
751
|
+
* Changed Sequel.method_missing and Database.adapter_class to raise AdapterNotFound if an adapter could not be loaded.
|
752
|
+
|
753
|
+
* Fixed behavior of error trap in sequel command line tool.
|
754
|
+
|
755
|
+
=== 0.5 (2007-12-30)
|
756
|
+
|
757
|
+
* Removed model code into separate sub-project. Rearranged trunk into core, model and model_plugins.
|
758
|
+
|
759
|
+
=== 0.4.5 (2007-12-25)
|
760
|
+
|
761
|
+
* Added rdoc for new alter_table functionality (#109).
|
762
|
+
|
763
|
+
* Fixed update_sql with array sub-item keys (#110).
|
764
|
+
|
765
|
+
* Refactored model specs.
|
766
|
+
|
767
|
+
* Added Model#update as alias to #set.
|
768
|
+
|
769
|
+
* Refactored validations code. Renamed Model.validations? into Model.has_validations?.
|
770
|
+
|
771
|
+
* Added initial Model validations (Thanks Lance Carlson)
|
772
|
+
|
773
|
+
* Added Database#set_column_default method (thanks Jim Morris.)
|
774
|
+
|
775
|
+
* Removed warning on uninitialized @transform value (thanks Jim Morris).
|
776
|
+
|
777
|
+
=== 0.4.4.2 (2007-12-20)
|
778
|
+
|
779
|
+
* Fixed parsing errors in Ruby 1.9.
|
780
|
+
|
781
|
+
* Fixed sync problem in connection_pool_spec.
|
782
|
+
|
783
|
+
* Changed String#to_time to raise Error::InvalidValue if Time.parse fails.
|
784
|
+
|
785
|
+
* Refactored sequel error classes.
|
786
|
+
|
787
|
+
=== 0.4.4.1 (2007-12-19)
|
788
|
+
|
789
|
+
* Fixed schema generation code to use field quoting and support adapter-specific literalization of default values (#108).
|
790
|
+
|
791
|
+
=== 0.4.4 (2007-12-17)
|
792
|
+
|
793
|
+
* Implemented Database#rename_table (#104).
|
794
|
+
|
795
|
+
* Fixed drop_index in mysql adapter (#103).
|
796
|
+
|
797
|
+
* Added ALTER TABLE specs for postgres, sqlite and mysql adapters. Added custom alter_table behavior for sqlite and mysql adapters (#101, #102).
|
798
|
+
|
799
|
+
* Added direct Database API for altering tables.
|
800
|
+
|
801
|
+
* Added Database#alter_table method with support for adding, dropping, renaming, modifying columns and adding and droppping indexes.
|
802
|
+
|
803
|
+
* Added #unique schema method for defining unique indexes (thanks Dado).
|
804
|
+
|
805
|
+
* Implemented unfolding of #each calls inside sequelizer blocks (thanks Jim Morris).
|
806
|
+
|
807
|
+
=== 0.4.3 (2007-12-15)
|
808
|
+
|
809
|
+
* Fixed Dataset#update to accept strings (#98).
|
810
|
+
|
811
|
+
* Fixed Model.[] to raise for boolean argument (#97).
|
812
|
+
|
813
|
+
* Added Database#add_index method (thanks coda.hale).
|
814
|
+
|
815
|
+
* Added error reporting for filtering on comparison not in a block (thanks Jim Morris).
|
816
|
+
|
817
|
+
* Added support for inline index definition (thanks Dado).
|
818
|
+
|
819
|
+
* Added Database#create_table! method for forcibly creating a table (thanks Dado).
|
820
|
+
|
821
|
+
* Added support for using Dataset#update with block.
|
822
|
+
|
823
|
+
* Changed subscript access to use | operator.
|
824
|
+
|
825
|
+
* Fixed subscript access in sequelizer.
|
826
|
+
|
827
|
+
* Added support for subscript access using Symbol#/ operator.
|
828
|
+
|
829
|
+
=== 0.4.2.2 (2007-12-10)
|
830
|
+
|
831
|
+
* Improved code coverage.
|
832
|
+
|
833
|
+
* Fixed Dataset#count to work properly with datasets with fixed SQL (when using #fetch).
|
834
|
+
|
835
|
+
* Added Model.create_with_params method that filters the given parameters accordring to the model's columns (thanks Aman Gupta).
|
836
|
+
|
837
|
+
=== 0.4.2.1 (2007-12-09)
|
838
|
+
|
839
|
+
* Refactored and fixed Dataset#reverse_order to work with field quoting (thanks Christian).
|
840
|
+
|
841
|
+
* Fixed problem with field quoting in insert statements.
|
842
|
+
|
843
|
+
* Changed sequelizer code to silently fail on any error when requiring parsetree and ruby2ruby.
|
844
|
+
|
845
|
+
* Added Database#create_view, #create_or_replace_view and #drop_view methods. Also implemented Dataset#create_view and #create_or_replace_view convenience methods.
|
846
|
+
|
847
|
+
* Keep DRY by re-using Model#[]= from method_missing.
|
848
|
+
|
849
|
+
* Added Model.fetch alias for DB.fetch.set_model(Model)
|
850
|
+
|
851
|
+
=== 0.4.2 (2007-12-07)
|
852
|
+
|
853
|
+
* Implemented Model#save_changes.
|
854
|
+
|
855
|
+
* Extended Model#save to accept specific columns to update.
|
856
|
+
|
857
|
+
* Implemented experimental JDBC adapter.
|
858
|
+
|
859
|
+
* Added adapter skeleton as starting point for new adapters.
|
860
|
+
|
861
|
+
* Cleaned-up adapters and moved automatic requiring of 'sequel' to adapter stubs.
|
862
|
+
|
863
|
+
=== 0.4.1.3 (2007-12-05)
|
864
|
+
|
865
|
+
* Better plugin conventions.
|
866
|
+
|
867
|
+
* Added experimental OpenBase adapter.
|
868
|
+
|
869
|
+
* 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).
|
870
|
+
|
871
|
+
=== 0.4.1.2 (2007-12-04)
|
872
|
+
|
873
|
+
* Added release rake task (using RubyForge).
|
874
|
+
|
875
|
+
* Changed Model.is to accept variable arity.
|
876
|
+
|
877
|
+
* Implemented plugin loading for model classes.
|
878
|
+
|
879
|
+
* Fixed odbc-mssql and odbc adapters (thanks Dusty.)
|
880
|
+
|
881
|
+
* Implemented odbc-mssql adapter (thanks Dusty.)
|
882
|
+
|
883
|
+
=== 0.4.1.1 (2007-11-27)
|
884
|
+
|
885
|
+
* Fixed #first and #last functionality in Informix::Dataset (thanks Gerardo Santana).
|
886
|
+
|
887
|
+
=== 0.4.1 (2007-11-25)
|
888
|
+
|
889
|
+
* 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).
|
890
|
+
|
891
|
+
=== 0.4.0 (2007-11-24)
|
892
|
+
|
893
|
+
* Reorganized lib directory structure.
|
894
|
+
|
895
|
+
* Added support for dbi-xxx URI schemes (#86).
|
896
|
+
|
897
|
+
* Fixed problem in Database#uri where setting the password would raise an error (#87).
|
898
|
+
|
899
|
+
* Improved Dataset#insert_sql to correctly handle string keys (#92).
|
900
|
+
|
901
|
+
* Improved error-handling for worker threads. Errors are saved to an array and are accessible through #errors (#91).
|
902
|
+
|
903
|
+
* Dataset#uniq/distinct can now accept a column list for DISTINCT ON clauses.
|
904
|
+
|
905
|
+
* Fixed Model.all.
|
906
|
+
|
907
|
+
* Fixed literalization of strings with escape sequences in postgres adapter (#90).
|
908
|
+
|
909
|
+
* Added support for literalizing BigDecimal values (#89).
|
910
|
+
|
911
|
+
* Fixed column qualification for joined datasets (thanks Christian).
|
912
|
+
|
913
|
+
* Implemented experimental informix adapter.
|
914
|
+
|
915
|
+
=== 0.3.4.1 (2007-11-10)
|
916
|
+
|
917
|
+
* Changed Dataset#select_sql to support queries without a FROM clause.
|
918
|
+
|
919
|
+
=== 0.3.4 (2007-11-10)
|
920
|
+
|
921
|
+
* Fixed MySQL adapter to allow calling stored procedures (thanks Sebastian).
|
922
|
+
|
923
|
+
* Changed Dataset#each to always return self.
|
924
|
+
|
925
|
+
* Fixed SQL functions without arguments in block filters.
|
926
|
+
|
927
|
+
* Implemented super-cool Symbol#cast_as method.
|
928
|
+
|
929
|
+
* Fixed error message in command-line tool if failed to load adapter (#85).
|
930
|
+
|
931
|
+
* Refactored code relating to column references for better extendibility (#88).
|
932
|
+
|
933
|
+
* Tiny fix to Model#run_hooks.
|
934
|
+
|
935
|
+
=== 0.3.3 (2007-11-04)
|
936
|
+
|
937
|
+
* Revised code to generate SQL statements without trailing semicolons.
|
938
|
+
|
939
|
+
* Added Sequel::Worker implementation of a simple worker thread for asynchronous execution.
|
940
|
+
|
941
|
+
* Added spec for Oracle adapter.
|
942
|
+
|
943
|
+
* Fixed Oracle adapter to format INSERT statements without semicolons (thanks Liming Lian).
|
944
|
+
|
945
|
+
* Renamed alias to Array#keys as Array#columns instead of Array#fields.
|
946
|
+
|
947
|
+
* Renamed FieldCompositionMethods as ColumnCompositionMethods.
|
948
|
+
|
949
|
+
* Implemented Sequel::NumericExtensions to provide stuff like 30.days.ago.
|
950
|
+
|
951
|
+
=== 0.3.2 (2007-11-01)
|
952
|
+
|
953
|
+
* Added #to_column_name as alias to #to_field_name, #column_title as alias to #field_title.
|
954
|
+
|
955
|
+
* Added Dataset#interval method for getting interval between minimum/maximum values for a column.
|
956
|
+
|
957
|
+
* Fixed Oracle::Database#execute (#84).
|
958
|
+
|
959
|
+
* Added group_and_count as general implementation for count_by_xxx.
|
960
|
+
|
961
|
+
* Added count_by magic method.
|
962
|
+
|
963
|
+
* Added Dataset#range method for getting the minimum/maximum values for a column.
|
964
|
+
|
965
|
+
* Fixed timestamp translation in SQLite adapter (#83).
|
966
|
+
|
967
|
+
* Experimental DB2 adapter.
|
968
|
+
|
969
|
+
* Added Dataset#set as alias to Dataset#update.
|
970
|
+
|
971
|
+
* Removed long deprecated expressions.rb code.
|
972
|
+
|
973
|
+
* Better documentation.
|
974
|
+
|
975
|
+
* Implemented Dataset magic methods: order_by_xxx, group_by_xxx, filter_by_xxx, all_by_xxx, first_by_xxx, last_by_xxx.
|
976
|
+
|
977
|
+
* Changed Model.create and Model.new to accept a block.
|
978
|
+
|
979
|
+
=== 0.3.1 (2007-10-30)
|
980
|
+
|
981
|
+
* Typo fixes (#79).
|
982
|
+
|
983
|
+
* Added require 'yaml' to dataset.rb (#78).
|
984
|
+
|
985
|
+
* Changed postgres adapter to use the ruby-postgres library's type conversion if available (#76).
|
986
|
+
|
987
|
+
* Fixed string literalization in mysql adapter for strings with comment backslashes in them (#75).
|
988
|
+
|
989
|
+
* Fixed ParseTree dependency to work with version 2.0.0 and later (#74).
|
990
|
+
|
991
|
+
* foreign_key definitions now accept :key option for specifying the remote key (#73).
|
992
|
+
|
993
|
+
* Fixed Model#method_missing to not raise error for columns not in the table but for which a value exists (#77).
|
994
|
+
|
995
|
+
* New documentation for Model.
|
996
|
+
|
997
|
+
* Implemented Oracle adapter based on ruby-oci8 library.
|
998
|
+
|
999
|
+
* Implemented Model#pk_hash. Is it really necessary?
|
1000
|
+
|
1001
|
+
* Deprecated Model#pkey. Implemented better Model#pk method.
|
1002
|
+
|
1003
|
+
* Specs and docs for Model.one_to_one, Model.one_to_many macros.
|
1004
|
+
|
1005
|
+
=== 0.3.0.1 (2007-10-20)
|
1006
|
+
|
1007
|
+
* Changed Database#fetch to return a modified dataset.
|
1008
|
+
|
1009
|
+
=== 0.3 (2007-10-20)
|
1010
|
+
|
1011
|
+
* Added stock transforms to Dataset#transform. Refactored Model.serialize.
|
1012
|
+
|
1013
|
+
* Added Database#logger= method for setting the database logger object.
|
1014
|
+
|
1015
|
+
* Fixed Model.[] to act as shortcut to Model.find when a hash is given (#71).
|
1016
|
+
|
1017
|
+
* Added support for old and new decimal types in MySQL adapter, and updated MYSQL_TYPES with MySQL 5.0 constants (#72).
|
1018
|
+
|
1019
|
+
* Implemented Database#disconnect method for all adapters.
|
1020
|
+
|
1021
|
+
* Fixed small bug in ArrayKeys module.
|
1022
|
+
|
1023
|
+
* Implemented model caching by primary key.
|
1024
|
+
|
1025
|
+
* Separated Model.find and Model.[] functionality. Model.find takes a filter. Model.[] is strictly for finding by primary keys.
|
1026
|
+
|
1027
|
+
* Enhanced Dataset#first to accept a filter block. Model#find can also now accept a filter block.
|
1028
|
+
|
1029
|
+
* Changed Database#[] to act as shortcut to #fetch if a string is given.
|
1030
|
+
|
1031
|
+
* Renamed Database#each to #fetch. If no block is given, the method returns an enumerator.
|
1032
|
+
|
1033
|
+
* Changed Dataset#join methods to correctly literalize values in join conditions (#70).
|
1034
|
+
|
1035
|
+
* Fixed #filter with ranges to correctly literalize field names (#69).
|
1036
|
+
|
1037
|
+
* Implemented Database#each method for quickly retrieving records with arbitrary SQL (thanks Aman Gupta).
|
1038
|
+
|
1039
|
+
* Fixed bug in postgres adapter where a LiteralString would be literalized as a regular String.
|
1040
|
+
|
1041
|
+
* Fixed SQLite insert with subquery (#68).
|
1042
|
+
|
1043
|
+
* Reverted back to hashes as default mode. Added Sequel.use_array_tuples and Sequel.use_hash_tuples methods.
|
1044
|
+
|
1045
|
+
* Fixed problem with arrays with keys when using #delete.
|
1046
|
+
|
1047
|
+
* Implemented ArrayKeys as substitute for ArrayFields.
|
1048
|
+
|
1049
|
+
* Added Dataset#each_hash method.
|
1050
|
+
|
1051
|
+
* Rewrote SQLite::Database#transaction to use sqlite3-ruby library implementation of transactions.
|
1052
|
+
|
1053
|
+
* Fixed Model.destroy_all to work correctly in cases where no before_destroy hook is defined and an after_destroy hook is defined.
|
1054
|
+
|
1055
|
+
* Restored Model.has_hooks? implementation.
|
1056
|
+
|
1057
|
+
* Changed Database#<< to strip comments and whitespace only when an array is given.
|
1058
|
+
|
1059
|
+
* Changed Schema::Generator#primary_key to accept calls with the type argument omitted.
|
1060
|
+
|
1061
|
+
* Hooks can now be prepended or appended by choice.
|
1062
|
+
|
1063
|
+
* Changed Model.subset to define filter method on the underlying dataset instead of the model class.
|
1064
|
+
|
1065
|
+
* Fixed Dataset#transform to work with array fields.
|
1066
|
+
|
1067
|
+
* Added Dataset#to_csv method.
|
1068
|
+
|
1069
|
+
* PrettyTable can now extract column names from arrayfields.
|
1070
|
+
|
1071
|
+
* Converted ado, dbi, odbc adapters to use arrayfields instead of hashes.
|
1072
|
+
|
1073
|
+
* Fixed composite key support.
|
1074
|
+
|
1075
|
+
* Fixed Dataset#insert_sql, update_sql to support array fields.
|
1076
|
+
|
1077
|
+
* Converted sqlite, mysql, postgres adapters to use arrayfields instead of hashes.
|
1078
|
+
|
1079
|
+
* Extended Dataset#from to auto alias sub-queries.
|
1080
|
+
|
1081
|
+
* Extended Dataset#from to accept hash for aliasing tables.
|
1082
|
+
|
1083
|
+
* Added before_update, after_update hooks.
|
1084
|
+
|
1085
|
+
=== 0.2.1.1 (2007-10-07)
|
1086
|
+
|
1087
|
+
* Added Date literalization to sqlite adapter (#60).
|
1088
|
+
|
1089
|
+
* Changed Model.serialize to allow calling it after the class is defined (#59).
|
1090
|
+
|
1091
|
+
* Fixed after_create hooks to allow calling save inside the hook (#58).
|
1092
|
+
|
1093
|
+
* Fixed MySQL quoting of sql functions (#57).
|
1094
|
+
|
1095
|
+
* Implemented rollback! global method for cancelling transactions in progress.
|
1096
|
+
|
1097
|
+
* Fixed =~ operator in Sequelizer.
|
1098
|
+
|
1099
|
+
* Fixed ODBC::Dataset#fetch_rows (thanks Dusty).
|
1100
|
+
|
1101
|
+
* Renamed Model.recreate_table to create_table!. recreate_table is deprecated and will issue a warning (#56).
|
1102
|
+
|
1103
|
+
=== 0.2.1 (2007-09-24)
|
1104
|
+
|
1105
|
+
* Added default implementation of Model.primary_key_hash.
|
1106
|
+
|
1107
|
+
* Fixed Sequel::Model() to set dataset for inherited classes.
|
1108
|
+
|
1109
|
+
* Rewrote Model.serialize to use Dataset#transform.
|
1110
|
+
|
1111
|
+
* Implemented Dataset#transform.
|
1112
|
+
|
1113
|
+
* Added gem spec for Windows (without ParseTree dependency).
|
1114
|
+
|
1115
|
+
* Added support for dynamic strings in Sequelizer (#49).
|
1116
|
+
|
1117
|
+
* Query branch merged into trunk.
|
1118
|
+
|
1119
|
+
* Implemented self-changing methods.
|
1120
|
+
|
1121
|
+
* Add support for ternary operator to Sequelizer.
|
1122
|
+
|
1123
|
+
* Fixed sequelizer to evaluate expressions if they don't involve symbols or literal strings.
|
1124
|
+
|
1125
|
+
* Added protection against using #each, #delete, #insert, #update inside query blocks.
|
1126
|
+
|
1127
|
+
* Improved Model#method_missing to deal with invalid attributes.
|
1128
|
+
|
1129
|
+
* Implemented Dataset#query.
|
1130
|
+
|
1131
|
+
* Added Dataset#group_by as alias for Dataset#group.
|
1132
|
+
|
1133
|
+
* Added Dataset#order_by as alias for Dataset#order.
|
1134
|
+
|
1135
|
+
* More model refactoring. Added support for composite keys.
|
1136
|
+
|
1137
|
+
* Added Dataset#empty? method (#46).
|
1138
|
+
|
1139
|
+
* Fixed Symbol#to_field_name to support names with numbers and upper-case characters (#45).
|
1140
|
+
|
1141
|
+
* Added install_no_doc rake task.
|
1142
|
+
|
1143
|
+
* Partial refactoring of model code.
|
1144
|
+
|
1145
|
+
* Refactored dataset-model association and added Dataset#set_row_filter method.
|
1146
|
+
|
1147
|
+
* Added support for case-sensitive regexps to mysql adapter.
|
1148
|
+
|
1149
|
+
* Changed mysql adapter to support encoding option as well.
|
1150
|
+
|
1151
|
+
* Added charset/encoding option to postgres adapter.
|
1152
|
+
|
1153
|
+
* Implemented Model.serialize (thanks Aman Gupta.)
|
1154
|
+
|
1155
|
+
* Changed Model.create to INSERT DEFAULT VALUES instead of (id) VALUES (null) (brings back #41.)
|
1156
|
+
|
1157
|
+
* Fixed Model.new to work without arguments.
|
1158
|
+
|
1159
|
+
* Added Model.no_primary_key method to allow models without primary keys.
|
1160
|
+
|
1161
|
+
* Added Model#this method (#42 thanks Duane Johnson).
|
1162
|
+
|
1163
|
+
* Fixed Dataset#insert_sql to use DEFAULT VALUES clause if argument is an empty hash.
|
1164
|
+
|
1165
|
+
* Fixed Model.create to work correctly when no argument is passed (#41).
|
1166
|
+
|
1167
|
+
=== 0.2.0.2 (2007-09-07)
|
1168
|
+
|
1169
|
+
* Dataset#insert can now accept subqueries.
|
1170
|
+
|
1171
|
+
* Changed Migrator.apply to return the version.
|
1172
|
+
|
1173
|
+
* Changed Sequel::Model() to cache intermediate classes so descendant classes can be reopened (#39).
|
1174
|
+
|
1175
|
+
* Added :charset option to MySQL adapter (#40).
|
1176
|
+
|
1177
|
+
* Fixed Dataset#exclude to add parens around NOT expression (#38).
|
1178
|
+
|
1179
|
+
* Fixed use of sub-queries with all comparison operators in block filters (#38).
|
1180
|
+
|
1181
|
+
* Fixed arithmetic expressions in block filters to not be literalized.
|
1182
|
+
|
1183
|
+
* Changed Symbol#method_missing to return LiteralString.
|
1184
|
+
|
1185
|
+
* Changed PrettyTable to right-align numbers.
|
1186
|
+
|
1187
|
+
* Fixed Model.create_table (thanks Duane Johnson.)
|
1188
|
+
|
1189
|
+
=== 0.2.0.1 (2007-09-04)
|
1190
|
+
|
1191
|
+
* Improved support for invoking methods with inline procs inside block filters.
|
1192
|
+
|
1193
|
+
=== 0.2.0 (2007-09-02)
|
1194
|
+
|
1195
|
+
* Fixed Model.drop_table (thanks Duane Johnson.)
|
1196
|
+
|
1197
|
+
* Dataset#each can now return rows for arbitrary SQL by specifying :sql option.
|
1198
|
+
|
1199
|
+
* Added spec for postgres adapter.
|
1200
|
+
|
1201
|
+
* Fixed Model.method_missing to work with new SQL generation.
|
1202
|
+
|
1203
|
+
* Fixed #compare_expr to support regexps.
|
1204
|
+
|
1205
|
+
* Fixed postgres, mysql adapters to support regexps.
|
1206
|
+
|
1207
|
+
* More specs for block filters. Updated README.
|
1208
|
+
|
1209
|
+
* Added support for globals and $X macros in block filters.
|
1210
|
+
|
1211
|
+
* Fixed Sequelizer to not fail if ParseTree or Ruby2Ruby gems are missing.
|
1212
|
+
|
1213
|
+
* Renamed String#expr into String#lit (#expr should be deprecated in future versions).
|
1214
|
+
|
1215
|
+
* Renamed Sequel::ExpressionString into LiteralString.
|
1216
|
+
|
1217
|
+
* Fixed Symbol#[] to return an ExpressionString, so as not to be literalized.
|
1218
|
+
|
1219
|
+
* Renamed Dataset::Expressions to Dataset::Sequelizer.
|
1220
|
+
|
1221
|
+
* Renamed Expressions#format_re_expression to match_expr.
|
1222
|
+
|
1223
|
+
* Renamed Expressions#format_eq_expression to compare_expr.
|
1224
|
+
|
1225
|
+
* Added support for Regexp in MySQL adapter.
|
1226
|
+
|
1227
|
+
* Refactored Regexp expressions into a separate #format_re_expression method.
|
1228
|
+
|
1229
|
+
* Added support for arithmetic in proc filters.
|
1230
|
+
|
1231
|
+
* Added support for nested proc expressions, more specs.
|
1232
|
+
|
1233
|
+
* Added support for SQL function using symbols, e.g. :sum[:x].
|
1234
|
+
|
1235
|
+
* Fixed deadlock bug in ConnectionPool.
|
1236
|
+
|
1237
|
+
* Removed deprecated old expressions.rb.
|
1238
|
+
|
1239
|
+
* Rewrote Proc filter feature using ParseTree.
|
1240
|
+
|
1241
|
+
* Added support for additional functions on columns using Symbol#method_missing.
|
1242
|
+
|
1243
|
+
* Added support for supplying filter block to DB#[] method, to allow stuff like DB[:nodes] {:path =~ /^icex1/}.
|
1244
|
+
|
1245
|
+
=== 0.1.9.12 (2007-08-26)
|
1246
|
+
|
1247
|
+
* Added spec for PrettyTable.
|
1248
|
+
|
1249
|
+
* Added specs for Schema::Generator and Model (#36 thanks technoweenie).
|
1250
|
+
|
1251
|
+
* Fixed Sequel::Model.set_schema (#36 thanks technoweenie.)
|
1252
|
+
|
1253
|
+
* Added support for no options on Schema::Generator#foreign_key (#36 thanks technoweenie.)
|
1254
|
+
|
1255
|
+
* Implemented (restored?) Schema::Generator#primary_key_name (#36 thanks technoweenie.)
|
1256
|
+
|
1257
|
+
* Better spec code coverage.
|
1258
|
+
|
1259
|
+
=== 0.1.9.11 (2007-08-24)
|
1260
|
+
|
1261
|
+
* Changed Dataset#set_model to allow supplying additional arguments to the model's initialize method (#35). Thanks Sunny Hirai.
|
1262
|
+
|
1263
|
+
=== 0.1.9.10 (2007-08-22)
|
1264
|
+
|
1265
|
+
* Changed schema generation code to generate separate statements for CREATE TABLE and each CREATE INDEX (#34).
|
1266
|
+
|
1267
|
+
* Refactored Dataset::SQL#field_name for better support of different field quoting standards by specific adapters.
|
1268
|
+
|
1269
|
+
* Added #current_page_record_count for paginated datasets.
|
1270
|
+
|
1271
|
+
* Removed Database#literal and included Dataset::SQL instead.
|
1272
|
+
|
1273
|
+
* 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'.
|
1274
|
+
|
1275
|
+
* Moved SingleThreadedPool to lib/sequel/connection_pool.rb.
|
1276
|
+
|
1277
|
+
* Changed SQLite::Dataset to return affected rows for #delete and #update (#33).
|
1278
|
+
|
1279
|
+
* 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.
|
1280
|
+
|
1281
|
+
=== 0.1.9.9 (2007-08-18)
|
1282
|
+
|
1283
|
+
* New ADO adapter by cdcarter (#31).
|
1284
|
+
|
1285
|
+
* Added automatic column aliasing to #avg, #sum, #min and #max (#30).
|
1286
|
+
|
1287
|
+
* Fixed broken Sequel::DBI::Dataset#fetch_rows (#29 thanks cdcarter.)
|
1288
|
+
|
1289
|
+
=== 0.1.9.8 (2007-08-15)
|
1290
|
+
|
1291
|
+
* Fixed DBI adapter.
|
1292
|
+
|
1293
|
+
=== 0.1.9.7 (2007-08-15)
|
1294
|
+
|
1295
|
+
* Added support for executing batch statements in sqlite adapter.
|
1296
|
+
|
1297
|
+
* Changed #current_page_record_range to return 0..0 for an invalid page.
|
1298
|
+
|
1299
|
+
* Fixed joining of aliased tables.
|
1300
|
+
|
1301
|
+
* Improved Symbol#to_field_name to prevent false positives.
|
1302
|
+
|
1303
|
+
* Implemented Dataset#multi_insert with :commit_every option.
|
1304
|
+
|
1305
|
+
* More docs for Dataset#set_model.
|
1306
|
+
|
1307
|
+
* Implemented automatic creation of convenience methods for each adapter (e.g. Sequel.sqlite etc.)
|
1308
|
+
|
1309
|
+
=== 0.1.9.6 (2007-08-13)
|
1310
|
+
|
1311
|
+
* Refactored schema definition code. Gets rid of famous primary_key problem as well as other issues (e.g. issue #22).
|
1312
|
+
|
1313
|
+
* Added #pagination_record_count, #page_range and #current_page_record_range for paginated datasets.
|
1314
|
+
|
1315
|
+
* Changed MySQL adapter to automatically reconnect (issue #26).
|
1316
|
+
|
1317
|
+
* Changed Sequel() to accept variable arity.
|
1318
|
+
|
1319
|
+
* Added :elements option to column definition, in order to support ENUM and SET types.
|
1320
|
+
|
1321
|
+
=== 0.1.9.5 (2007-08-12)
|
1322
|
+
|
1323
|
+
* Fixed migration docs.
|
1324
|
+
|
1325
|
+
* Removed dependency on PGconn in Schema class.
|
1326
|
+
|
1327
|
+
=== 0.1.9.4 (2007-08-11)
|
1328
|
+
|
1329
|
+
* Added Sequel.dbi convenience method for using DBI connection strings to open DBI databases.
|
1330
|
+
|
1331
|
+
=== 0.1.9.3 (2007-08-10)
|
1332
|
+
|
1333
|
+
* Added support for specifying field size in schema definitions (thanks Florian Aßmann.)
|
1334
|
+
|
1335
|
+
* Added migration code based on work by Florian Aßmann.
|
1336
|
+
|
1337
|
+
* Reintroduced metaid dependency. No need to keep a local copy of it.
|
1338
|
+
|
1339
|
+
=== 0.1.9.2 (2007-07-24)
|
1340
|
+
|
1341
|
+
* Removed metaid dependency. Re-factored requires in lib/sequel.rb.
|
1342
|
+
|
1343
|
+
=== 0.1.9.1 (2007-07-22)
|
1344
|
+
|
1345
|
+
* Improved robustness of MySQL::Dataset#field_name.
|
1346
|
+
|
1347
|
+
* Added Sequel.single_threaded= convenience method.
|
1348
|
+
|
1349
|
+
=== 0.1.9 (2007-07-21)
|
1350
|
+
|
1351
|
+
* Fixed #update_sql and #insert_sql to support field quoting by calling #field_name.
|
1352
|
+
|
1353
|
+
* Implemented automatic data type conversion in mysql adapter.
|
1354
|
+
|
1355
|
+
* Added support for boolean literals in mysql adapter.
|
1356
|
+
|
1357
|
+
* Added support for ORDER and LIMIT clauses in UPDATE statements in mysql adapter.
|
1358
|
+
|
1359
|
+
* Implemented correct field quoting (using back-ticks) in mysql adapter.
|
1360
|
+
|
1361
|
+
* Wrote basic MySQL spec.
|
1362
|
+
|
1363
|
+
* Fixd MySQL::Dataset to return correct data types with symbols as hash keys.
|
1364
|
+
|
1365
|
+
* Removed discunctional MySQL::Database#transaction.
|
1366
|
+
|
1367
|
+
* Added support for single threaded operation.
|
1368
|
+
|
1369
|
+
* Fixed bug in Dataset#format_eq_expression where Range objects would not be literalized correctly.
|
1370
|
+
|
1371
|
+
* Added parens around postgres LIKE expressions using regexps.
|
1372
|
+
|
1373
|
+
=== 0.1.8 (2007-07-10)
|
1374
|
+
|
1375
|
+
* Implemented Dataset#columns for retrieving the columns in the result set.
|
1376
|
+
|
1377
|
+
* Updated Model with changes to how model-associated datasets work.
|
1378
|
+
|
1379
|
+
* Beefed-up specs. Coverage is now at 95.0%.
|
1380
|
+
|
1381
|
+
* Added support for polymorphic datasets.
|
1382
|
+
|
1383
|
+
* The adapter dataset interface was simplified and standardized. Only four methods need be overriden: fetch_rows, update, insert and delete.
|
1384
|
+
|
1385
|
+
* The Dataset class was refactored. The bulk of the dataset code was moved into separate modules.
|
1386
|
+
|
1387
|
+
* Renamed Dataset#hash_column to Dataset#to_hash.
|
1388
|
+
|
1389
|
+
* Added some common pragmas to sqlite adapter.
|
1390
|
+
|
1391
|
+
* Added Postgres::Dataset#analyze for EXPLAIN ANALYZE queries.
|
1392
|
+
|
1393
|
+
* Fixed broken Postgres::Dataset#explain.
|
1394
|
+
|
1395
|
+
=== 0.1.7
|
1396
|
+
|
1397
|
+
* Removed db.synchronize wrapping calls in sqlite adapter.
|
1398
|
+
|
1399
|
+
* Implemented Model.join method to restrict returned columns to the model table (thanks Pedro Gutierrez).
|
1400
|
+
|
1401
|
+
* Implemented Dataset#paginate method.
|
1402
|
+
|
1403
|
+
* Fixed after_destroy hook.
|
1404
|
+
|
1405
|
+
* Improved Dataset#first and #last to accept a filter hash.
|
1406
|
+
|
1407
|
+
* Added Dataset#[]= method.
|
1408
|
+
|
1409
|
+
* Added Sequel() convenience method.
|
1410
|
+
|
1411
|
+
* Fixed Dataset#first to include a LIMIT clause for a single record.
|
1412
|
+
|
1413
|
+
* 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).
|
1414
|
+
|
1415
|
+
* Fixed Symbol#DESC to support qualified notation (thanks Pedro Gutierrez).
|
1416
|
+
|
1417
|
+
=== 0.1.6
|
1418
|
+
|
1419
|
+
* Fixed Model#method_missing to raise for an invalid attribute.
|
1420
|
+
|
1421
|
+
* Fixed PrettyTable to print model objects (thanks snok.)
|
1422
|
+
|
1423
|
+
* Fixed ODBC timestamp conversion to return DateTime rather than Time object (thanks snok.)
|
1424
|
+
|
1425
|
+
* Fixed Model.method_missing (thanks snok.)
|
1426
|
+
|
1427
|
+
* Model.method_missing now creates stubs for calling Model.dataset methods. Methods like Model.each etc are removed.
|
1428
|
+
|
1429
|
+
* Changed default join type to INNER JOIN (thanks snok.)
|
1430
|
+
|
1431
|
+
* Added support for literal expressions, e.g. DB[:items].filter(:col1 => 'col2 - 10'.expr).
|
1432
|
+
|
1433
|
+
* Added Dataset#and.
|
1434
|
+
|
1435
|
+
* SQLite adapter opens a memory DB if no database is specified, e.g. Sequel.open 'sqlite:/'.
|
1436
|
+
|
1437
|
+
* Added Dataset#or, pretty nifty.
|
1438
|
+
|
1439
|
+
=== 0.1.5
|
1440
|
+
|
1441
|
+
* Fixed Dataset#join to support multiple joins. Added #left_outer_join, #right_outer_join, #full_outer_join, #inner_join methods.
|
1442
|
+
|
1443
|
+
=== 0.1.4
|
1444
|
+
|
1445
|
+
* Added String#split_sql.
|
1446
|
+
|
1447
|
+
* 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.
|
1448
|
+
|
1449
|
+
* Improved Schema generator to support data types as method names:
|
1450
|
+
DB.create_table :test do
|
1451
|
+
integer :abc
|
1452
|
+
text :def
|
1453
|
+
...
|
1454
|
+
end
|
1455
|
+
|
1456
|
+
* Implemented ODBC adapter.
|
1457
|
+
|
1458
|
+
=== 0.1.3
|
1459
|
+
|
1460
|
+
* Implemented DBI adapter.
|
1461
|
+
|
1462
|
+
* Refactored database connection code. Now handled through Database#connect.
|
1463
|
+
|
1464
|
+
=== 0.1.2
|
1465
|
+
|
1466
|
+
* The first opened database is automatically assigned to to Model.db.
|
1467
|
+
|
1468
|
+
* Removed SequelConnectionError. Exception class errors are converted to RuntimeError.
|
1469
|
+
|
1470
|
+
* Added support for UNION, INTERSECT and EXCEPT set operations.
|
1471
|
+
|
1472
|
+
* Fixed Dataset#single_record to return nil if no record is found.
|
1473
|
+
|
1474
|
+
* Updated specs to conform to RSpec 1.0.
|
1475
|
+
|
1476
|
+
* Added Model#find_or_create method.
|
1477
|
+
|
1478
|
+
* Fixed MySQL::Dataset#query_single (thanks Dries Harnie.)
|
1479
|
+
|
1480
|
+
* Added Model.subset method. Fixed Model.filter and Model.exclude to accept blocks.
|
1481
|
+
|
1482
|
+
* Added Database#uri method.
|
1483
|
+
|
1484
|
+
* Refactored and removed deprecated code in postgres adapter.
|
1485
|
+
|
1486
|
+
===0.1.1
|
1487
|
+
|
1488
|
+
* More documentation for Dataset.
|
1489
|
+
|
1490
|
+
* Added Dataset#size as alias to Dataset#count.
|
1491
|
+
|
1492
|
+
* Changed Database#<< to call execute (instead of being an alias). Thus it will work for descendants as well.
|
1493
|
+
|
1494
|
+
* Fixed Sequel.open to accept variable arity.
|
1495
|
+
|
1496
|
+
* Refactored Model#refresh, Model.create. Removed Model#reload.
|
1497
|
+
|
1498
|
+
* Refactored Model hooks.
|
1499
|
+
|
1500
|
+
* Cleaned up Dataset API.
|
1501
|
+
|
1502
|
+
=== 0.1.0
|
1503
|
+
|
1504
|
+
* Changed Database#create_table to only accept a block. Nobody's gonna use the other way.
|
1505
|
+
|
1506
|
+
* Removed Dataset#[]= method. Too confusing and not really useful.
|
1507
|
+
|
1508
|
+
* Fixed ConnectionPool#hold to wrap exceptions only once.
|
1509
|
+
|
1510
|
+
* Dataset#where_list Renamed Dataset#expression_list.
|
1511
|
+
|
1512
|
+
* Added support for qualified fields in Proc expressions (e.g. filter {items.id == 1}.)
|
1513
|
+
|
1514
|
+
* Added like? and in? Proc expression operators.
|
1515
|
+
|
1516
|
+
* Added require 'date' in dataset.rb. Is this a 1.8.5 thing?
|
1517
|
+
|
1518
|
+
* Refactored Dataset to use literal strings instead of format strings (slight performance improvement and better readability.)
|
1519
|
+
|
1520
|
+
* Added support for literalizing Date objects.
|
1521
|
+
|
1522
|
+
* Refactored literalization of Time objects.
|
1523
|
+
|
1524
|
+
=== 0.0.20
|
1525
|
+
|
1526
|
+
* Refactored Dataset where clause construction to use expressions.
|
1527
|
+
|
1528
|
+
* Implemented Proc expressions (adapted from a great idea by Sam Smoot.)
|
1529
|
+
|
1530
|
+
* Fixed Model#map.
|
1531
|
+
|
1532
|
+
* Documentation for ConnectionPool.
|
1533
|
+
|
1534
|
+
* Specs for Database.
|
1535
|
+
|
1536
|
+
=== 0.0.19
|
1537
|
+
|
1538
|
+
* More specs for Dataset.
|
1539
|
+
|
1540
|
+
* Fixed Dataset#invert_order to work correctly with strings.
|
1541
|
+
|
1542
|
+
* Fixed Model#== to check equality of values.
|
1543
|
+
|
1544
|
+
* Added Model#exclude and Model#order.
|
1545
|
+
|
1546
|
+
* Fixed Dataset#order and Dataset#group to behave correctly when supplied with qualified field name symbols.
|
1547
|
+
|
1548
|
+
* Removed Database#literal. Shouldn't have been there.
|
1549
|
+
|
1550
|
+
* Added SQLite::Dataset#explain. Returns an array of opcode hashes.
|
1551
|
+
|
1552
|
+
* Specs for ConnectionPool.
|
1553
|
+
|
1554
|
+
=== 0.0.18
|
1555
|
+
|
1556
|
+
* Implemented SequelError and SequelConnectionError classes. ConnectionPool#hold now catches any connection errors and reraises them SequelConnectionError.
|
1557
|
+
|
1558
|
+
* Removed duplication in Database#[].
|
1559
|
+
|
1560
|
+
* :from and :select options are now always arrays (patch by Alex Bradbury.)
|
1561
|
+
|
1562
|
+
* Fixed Dataset#exclude to work correctly (patch and specs by Alex Bradbury.)
|
1563
|
+
|
1564
|
+
=== 0.0.17
|
1565
|
+
|
1566
|
+
* Fixed Postgres::Database#tables to return table names as symbols (caused problem when using Database#table_exists?).
|
1567
|
+
|
1568
|
+
* Fixed Dataset#from to have variable arity, like Dataset#select and Dataset#where (patch by Alex Bradbury.)
|
1569
|
+
|
1570
|
+
* Added support for GROUP BY and HAVING clauses (patches by Alex Bradbury.) Refactored Dataset#filter.
|
1571
|
+
|
1572
|
+
* More specs.
|
1573
|
+
|
1574
|
+
* Refactored Dataset#where for better composability.
|
1575
|
+
|
1576
|
+
* Added Dataset#[]= method.
|
1577
|
+
|
1578
|
+
* Added support for DISTINCT and OFFSET clauses (patches by Alex Bradbury.) Dataset#limit now accepts ranges. Added Dataset#uniq and distinct methods.
|
1579
|
+
|
1580
|
+
=== 0.0.16
|
1581
|
+
|
1582
|
+
* More documentation.
|
1583
|
+
|
1584
|
+
* Added support for subqueries in Dataset#literal.
|
1585
|
+
|
1586
|
+
* Added support for Model.all_by_XXX methods through Model.method_missing.
|
1587
|
+
|
1588
|
+
* Added basic SQL logging to Database.
|
1589
|
+
|
1590
|
+
* Added Enumerable#send_each convenience method.
|
1591
|
+
|
1592
|
+
* Changed Dataset#destroy to return the number of deleted records.
|
1593
|
+
|
1594
|
+
=== 0.0.15
|
1595
|
+
|
1596
|
+
* Improved Dataset#insert_sql to allow arrays as well as hashes.
|
1597
|
+
|
1598
|
+
* Database#drop_table now accepts a list of table names.
|
1599
|
+
|
1600
|
+
* Added Model#id to to return the id column.
|
1601
|
+
|
1602
|
+
=== 0.0.14
|
1603
|
+
|
1604
|
+
* Fixed Model's attribute accessors (hopefully for the last time).
|
1605
|
+
|
1606
|
+
* Changed Model.db and Model.db= to allow different databases for different model classes.
|
1607
|
+
|
1608
|
+
* Fixed bug in aggregate methods (max, min, etc) for datasets using record classes.
|
1609
|
+
|
1610
|
+
=== 0.0.13
|
1611
|
+
|
1612
|
+
* Fixed Model#method_missing to do both find, filter and attribute accessors. duh.
|
1613
|
+
|
1614
|
+
* Fixed bug in Dataset#literal when quoting arrays of strings (thanks Douglas Koszerek.)
|
1615
|
+
|
1616
|
+
=== 0.0.12
|
1617
|
+
|
1618
|
+
* Model#save now correctly performs an INSERT for new objects.
|
1619
|
+
|
1620
|
+
* Added Model#reload for reloading an object from the database.
|
1621
|
+
|
1622
|
+
* Added Dataset#naked method for getting a version of a dataset that fetches records as hashes.
|
1623
|
+
|
1624
|
+
* Implemented attribute accessors for column values ala ActiveRecord models.
|
1625
|
+
|
1626
|
+
* Fixed filtering using nil values (e.g. dataset.filter(:parent_id => nil)).
|
1627
|
+
|
1628
|
+
=== 0.0.11
|
1629
|
+
|
1630
|
+
* Renamed Model.schema to Model.set_schema and Model.get_schema to Model.schema.
|
1631
|
+
|
1632
|
+
* Improved Model class to allow descendants of model clases (thanks Pedro Gutierrez.)
|
1633
|
+
|
1634
|
+
* Removed require 'postgres' in schema.rb (thanks Douglas Koszerek.)
|
1635
|
+
|
1636
|
+
=== 0.0.10
|
1637
|
+
|
1638
|
+
* Added some examples.
|
1639
|
+
|
1640
|
+
* Added Dataset#print method for pretty-printing tables.
|
1641
|
+
|
1642
|
+
=== 0.0.9
|
1643
|
+
|
1644
|
+
* Fixed Postgres::Database#tables and #locks methods.
|
1645
|
+
|
1646
|
+
* Added PGconn#last_insert_id method that should support all 7.x and 8.x versions of Postgresql.
|
1647
|
+
|
1648
|
+
* Added Dataset#exists method for EXISTS where clauses.
|
1649
|
+
|
1650
|
+
* Changed behavior of Dataset#literal to regard symbols as field names.
|
1651
|
+
|
1652
|
+
* Refactored and DRY'd Dataset#literal and overrides therof. Added support for subqueries in where clause.
|
1653
|
+
|
1654
|
+
=== 0.0.8
|
1655
|
+
|
1656
|
+
* 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.
|
1657
|
+
|
1658
|
+
* Fixed literal representation of literals in SQLite adapter (thanks Christian Neukirchen!)
|
1659
|
+
|
1660
|
+
* Refactored insert code in Postgres adapter (in preparation for fetching the last insert id for pre-8.1 versions).
|
1661
|
+
|
1662
|
+
=== 0.0.7
|
1663
|
+
|
1664
|
+
* Fixed bug in Model.schema, duh!
|
1665
|
+
|
1666
|
+
=== 0.0.6
|
1667
|
+
|
1668
|
+
* Added Dataset#sql as alias to Dataset#select_sql.
|
1669
|
+
|
1670
|
+
* Dataset#where and Dataset#exclude can now be used for refining dataset conditions, enabling stuff like posts.where(:title => 'abcdef').exclude(:user_id => 3).
|
1671
|
+
|
1672
|
+
* Implemented Dataset#exclude method.
|
1673
|
+
|
1674
|
+
* 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.
|
1675
|
+
|
1676
|
+
* Changed Sequel::Database#table_exists? to rely on the tables method if it is available.
|
1677
|
+
|
1678
|
+
* Implemented SQLite::Database#tables.
|
1679
|
+
|
1680
|
+
=== 0.0.5
|
1681
|
+
|
1682
|
+
* Added Dataset#[] method. Refactored Model#find and Model#[].
|
1683
|
+
|
1684
|
+
* Renamed Pool#conn_maker to Pool#connection_proc.
|
1685
|
+
|
1686
|
+
* Added automatic require 'sequel' to all adapters for convenience.
|
1687
|
+
|
1688
|
+
=== 0.0.4
|
1689
|
+
|
1690
|
+
* Added preliminary MySQL support.
|
1691
|
+
|
1692
|
+
* Code cleanup.
|
1693
|
+
|
1694
|
+
=== 0.0.3
|
1695
|
+
|
1696
|
+
* Add Dataset#sum method.
|
1697
|
+
|
1698
|
+
* Added support for exclusive ranges (thanks Christian Neukirchen.)
|
1699
|
+
|
1700
|
+
* Added sequel console for quick'n'dirty access to databases.
|
1701
|
+
|
1702
|
+
* Fixed small bug in Dataset#qualified_field_name for better join support.
|
1703
|
+
|
1704
|
+
=== 0.0.2
|
1705
|
+
|
1706
|
+
* Added Sequel.open as alias to Sequel.connect.
|
1707
|
+
|
1708
|
+
* 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']).
|
1709
|
+
|
1710
|
+
* Added Model#[]= method for changing column values and Model#save
|
1711
|
+
method for saving them.
|
1712
|
+
|
1713
|
+
* Added Dataset#destroy for deleting each record individually as support for models. Renamed Model#delete to Model#destroy (and Model#destroy_all) ala ActiveRecord.
|
1714
|
+
|
1715
|
+
* Refactored Dataset#first and Dataset#last code. These methods can now accept the number of records to fetch.
|
1716
|
+
|
1717
|
+
=== 0.0.1
|
1718
|
+
|
1719
|
+
* More documentation for Dataset.
|
1720
|
+
|
1721
|
+
* Renamed Database#query to Database#dataset.
|
1722
|
+
|
1723
|
+
* Added Dataset#insert_multiple for inserting multiple records.
|
1724
|
+
|
1725
|
+
* Added Dataset#<< as shorthand for inserting records.
|
1726
|
+
|
1727
|
+
* Added Database#<< method for executing arbitrary SQL.
|
1728
|
+
|
1729
|
+
* Imported Sequel code.
|
1730
|
+
|
1731
|
+
|
1732
|
+
== Sequel::Model CHANGELOG 0.1 - 0.5.0.2
|
1733
|
+
|
187
1734
|
=== 0.5.0.2 (2008-03-12)
|
188
1735
|
|
189
1736
|
* More fixes for Model.associate to accept strings and symbols as class references.
|