# CHANGELOG

Path: | CHANGELOG
Last Update: | Fri Mar 19 14:51:43 -0600 2010

### 3.6.0 (2009-11-02)

- Make the MSSQL shared adapter correctly parse the column schema information for tables in the non-default database schema (rohit.namjoshi)
- Use save_changes instead of save when updating existing associated objects in the nested_attributes plugin (jeremyevans)
- Allow Model#save_changes to accept an option hash that is passed to save, so you can save changes without validating (jeremyevans)
- Make nested_attributes plugin add newly created objects to cached association array immediately (jeremyevans)
- Make add_ association method not add the associated object to the cached array if it‘s already there (jeremyevans)
- Add Model#modified! for explicitly marking an object as modified, so save_changes/update will run callbacks even if no columns have been modified (jeremyevans)
- Add support for a :fields option in the nested attributes plugin, and only allow updating of the fields specified (jeremyevans)
- Don‘t allow modifying keys related to the association when updating existing objects in the nested_attributes plugin (jeremyevans)
- Add associated_object_keys method to AssociationReflection objects, specifying the key(s) in the associated model table related to the association (jeremyevans)
- Support the memcached protocol in the caching plugin via the new :ignore_exceptions option (EppO, jeremyevans)
- Don‘t modify array with a string and placeholders passed to Dataset#filter or related methods (jeremyevans)
- Speed up Amalgalite adapter (copiousfreetime)
- Fix bound variables on PostgreSQL when using nil and potentially other values (jeremyevans)
- Allow easier overriding of default options used in the validation_helpers plugin (jeremyevans)
- Have Dataset#literal_other call sql_literal on the object if it responds to it (heda, michaeldiamond)
- Fix Dataset#explain in the amalgalite adapter (jeremyevans)
- Have Model.table_name respect table aliases (jeremyevans)
- Allow marshalling of saved model records after calling marshallable! (jeremyevans)
- one_to_many association methods now make sure that the removed object is currently associated to the receiver (jeremyevans)
- Model association add_ and remove_ methods now have more descriptive error messages (jeremyevans)
- Model association add_ and remove_ methods now make sure passed object is of the correct class (jeremyevans)
- Model association remove_ methods now accept a primary key value and disassociate the associated model object (natewiger, jeremyevans)
- Model association add_ methods now accept a hash and create a new associated model object (natewiger, jeremyevans)
- Dataset#window for PostgreSQL datasets now respects previous windows (jeremyevans)
- Dataset#simple_select_all? now ignores options that don‘t affect the SQL being issued (jeremyevans)
- Account for table aliases in eager_graph (mluu)
- Add support for MSSQL clustered index creation (mluu)
- Implement insert_select in the MSSQL adapter via OUTPUT. Can be disabled via disable_insert_output. (jfirebaugh, mluu)
- Correct error handling when beginning a transaction fails (jfirebaugh, mluu)
- Correct JDBC binding for Time objects in prepared statements (jfirebaugh, jeremyevans)
- Emulate JOIN USING clause poorly using JOIN ON if the database doesn‘t support JOIN USING (e.g. MSSQL, H2) (jfirebaugh, jeremyevans)
- Support column aliases in Dataset#group_and_count (jfirebaugh)
- Support preparing insert statements of the form insert(1,2,3) and insert(columns, values) (jfirebaugh)
- Fix add_index for tables in non-default schema (jfirebaugh)
- Allow named placeholders in placeholder literal strings (jeremyevans)
- Allow the force_encoding plugin to work when refreshing (jeremyevans)
- Add Dataset#bind for setting bound variable values before calling call (jeremyevans)
- Add additional join methods to Dataset: (cross|natural|(natural_)?(full|left|right))_join (jeremyevans)
- Fix use a dataset aggregate methods (e.g. sum) on limited/grouped/etc. datasets (jeremyevans)
- Clear changed_columns when saving new model objects with a database adapter that supports insert_select, such as postgres (jeremyevans)
- Fix Dataset#replace with default values on MySQL, and respect insert-related options (jeremyevans)
- Fix Dataset#lock on PostgreSQL (jeremyevans)
- Fix Dataset#explain on SQLite (jeremyevans)
- Add Dataset#use_cursor to the native postgres adapter, for processing large datasets (jeremyevans)
- Don‘t ignore Class.inherited in Sequel::Model.inherited (antage) (277)
- Optimize JDBC::MySQL::DatabaseMethods#last_insert_id to prevent additional queries (tmm1)
- Fix use of MSSQL with ruby 1.9 (cult hero)
- Don‘t try to load associated objects when the current object has NULL for one of the key fields (jeremyevans)
- No longer require GROUP BY to use HAVING, except on SQLite (jeremyevans)
- Add emulated support for the lack of multiple column IN/NOT IN support in MSSQL and SQLite (jeremyevans)
- Add emulated support for ilike on MSSQL and H2 (jeremyevans)
- Add a :distinct option for all associations, which uses the SQL DISTINCT clause (jeremyevans)
- Don‘t require :: prefix for constant lookups in instance_evaled virtual row blocks on ruby 1.9 (jeremyevans)

### 3.5.0 (2009-10-01)

- Correctly literalize timezones in timestamps when using Oracle (jeremyevans)
- Add class_table_inheritance plugin, supporting inheritance in the database using a table-per-model-class approach (jeremyevans)
- Allow easier overriding of model code to insert and update individual records (jeremyevans)
- Allow graphing to work on previously joined datasets, and eager graphing of models backed by joined datasets (jeremyevans)
- Fix MSSQL emulated offset support for datasets with row_procs (e.g. Model datasets) (jeremyevans)
- Support composite keys with set_primary_key when called with an array of multiple symbols (jeremyevans)
- Fix select_more and order_more to not affect receiver (tamas.denes, jeremyevans)
- Support composite keys in model associations, including many_through_many plugin support (jeremyevans)
- Add the force_encoding plugin for forcing encoding of strings for models (requires ruby 1.9) (jeremyevans)
- Support DataObjects 0.10 (previous DataObjects versions are now unsupported) (jeremyevans)
- Allow the user to specify the ADO connection string via the :conn_string option (jeremyevans)
- Add thread_local_timezones extension for allow per-thread overrides of the global timezone settings (jeremyevans)
- Add named_timezones extension for using named timezones such as "America/Los_Angeles" using TZInfo (jeremyevans)
- Pass through unsigned/elements/size and other options when altering columns on MySQL (tmm1)
- Replace Dataset#virtual_row_block_call with Sequel.virtual_row (jeremyevans)
- Allow Dataset delete, update, and insert to respect existing WITH clauses on MSSQL (dlee, jeremyevans)
- Add touch plugin, which adds Model#touch for updating an instance‘s timestamp, as well as touching associations when an instance is updated or destroyed (jeremyevans)
- Add sql_expr extension, which adds the sql_expr to all objects, giving them easy access to Sequel‘s DSL (jeremyevans)
- Add active_model plugin, which gives Sequel::Model an ActiveModel compliant API, passes the ActiveModel::Lint tests (jeremyevans)
- Fix MySQL commands out of sync error when using queries with multiple result sets without retrieving all result sets (jeremyevans)
- Allow splitting of multiple result sets into separate arrays when using multiple statements in a single query in the native MySQL adapter (jeremyevans)
- Don‘t include primary key indexes when parsing MSSQL indexes on JDBC (jeremyevans)
- Make Dataset#insert_select return nil on PostgreSQL if disable_insert_returning is used (jeremyevans)
- Speed up execution of prepared statements with bound variables on MySQL (ibc@aliax.net)
- Add association_dependencies plugin, for deleting, destroying, or nullifying associated objects when destroying a model object (jeremyevans)
- Add :validate association option, set to false to not validate when implicitly saving associated objects (jeremyevans)
- Add subclasses plugin, for recording all of a models subclasses and descendent classes (jeremyevans)
- Add looser_typecasting extension, for using .to_f and .to_i instead of Kernel.Float and Kernel.Integer when typecasting floats and integers (jeremyevans)
- Catch database errors when preparing statements or setting variable values when using the native MySQL adapter (jeremyevans)
- Add typecast_on_load plugin, for fixing bad database typecasting when loading model objects (jeremyevans)
- Detect more types of MySQL disconnection errors (jeremyevans)
- Add Sequel.convert_exception_class for wrapping exceptions (jeremyevans)
- Model#modified? now always considers new records as modified (jeremyevans)
- Typecast before checking current model attribute value, instead of after (jeremyevans)
- Don‘t attempt to use unparseable defaults as literals when dumping the schema for a MySQL database (jeremyevans)
- Handle MySQL enum defaults in the schema dumper (jeremyevans)
- Support Database#server_version on MSSQL (dlee, jeremyevans)
- Support updating and deleting joined datasets on MSSQL (jfirebaugh)
- Support the OUTPUT SQL clause on MSSQL delete, insert, and update statements (jfirebaugh)
- Refactor generation of delete, insert, select, and update statements (jfirebaugh, jeremyevans)
- Do a better job of parsing defaults on MSSQL (jfirebaugh)

### 3.4.0 (2009-09-02)

- Allow datasets without tables to work correctly on Oracle (mikegolod)
- Add invert, asc, and desc to OrderedExpression (dlee)
- Allow validates_unique to take a block used to scope the uniqueness constraint (drfreeze, jeremyevans)
- Automatically save a new many_to_many associated object when associating the object via add_* (jeremyevans)
- Add a nested_attributes plugin for modifying associated objects directly through a model object (jeremyevans)
- Add an instance_hooks plugin for adding hooks to specific model instances (jeremyevans)
- Add a boolean_readers plugin for creating attribute? methods for boolean columns (jeremyevans)
- Add Dataset#ungrouped which removes existing grouping (jeremyevans)
- Make Dataset#group with nil or no arguments to remove existing grouping (dlee)
- Fix using multiple emulated ALTER TABLE statements (e.g. drop_column) in a single alter_table block on SQLite (jeremyevans)
- Don‘t allow inserting on a grouped dataset or a dataset that selects from multiple tables (jeremyevans)
- Allow class Item < Sequel::Model(DB2) to work (jeremyevans)
- Add Dataset#truncate for truncating tables (jeremyevans)
- Add Database#run method for executing arbitrary SQL on a database (jeremyevans)
- Handle index parsing correctly for tables in a non-default schema on JDBC (jfirebaugh)
- Handle unique index parsing correctly when connecting to MSSQL via JDBC (jfirebaugh)
- Add support for converting Time/DateTime to local or UTC time upon storage, retrieval, or typecasting (jeremyevans)
- Accept a hash when typecasting values to date, time, and datetime types (jeremyevans)
- Make JDBC adapter prepared statements support booleans, blobs, and potentially any type of object (jfirebaugh)
- Refactor the inflection support and modify the default inflections (jeremyevans, dlee)
- Make the serialization and lazy_attribute plugins add accessor methods to modules included in the class (jeremyevans)
- Make Database#schema on JDBC include a :column_size entry specifying the maximum length/precision for the column (jfirebaugh)
- Make Database#schema on JDBC accept a :schema option (dlee)
- Fix Dataset#import when called with a dataset (jeremyevans)
- Give a much more descriptive error message if the mysql.rb driver is detected (jeremyevans)
- Make postgres adapter work with a modified postgres-pr that raises PGError (jeremyevans)
- Make ODBC adapter respect Sequel.datetime_class (jeremyevans)
- Add support for generic concepts of CURRENT_{DATE,TIME,TIMESTAMP} (jeremyevans)
- Add a timestamps plugin for automatically creating hooks for create and update timestamps (jeremyevans)
- Add support for serializing to json (derdewey)

### 3.3.0 (2009-08-03)

- Add an assocation_proxies plugin that uses proxies for associations (jeremyevans)
- Have the add/remove/remove_all methods take additional arguments and pass them to the internal methods (clivecrous)
- Move convert_tinyint_to_bool method from Sequel to Sequel::MySQL (jeremyevans)
- Model associations now default to associating to classes in the same scope (jeremyevans, nougad) (274)
- Add Dataset#unlimited, similar to unfiltered and unordered (jeremyevans)
- Make Dataset#from_self take an options hash and respect an :alias option, giving the alias to use (Phrogz)
- Make the JDBC adapter accept a :convert_types option to turn off Java type conversion and double performance (jeremyevans)
- Slight increase in ConnectionPool performance (jeremyevans)
- SQL::WindowFunction can now be aliased/casted etc. just like SQL::Function (jeremyevans)
- Model#save no longer attempts to update primary key columns (jeremyevans)
- Sequel will now unescape values provided in connection strings (e.g. ado:///db?host=server%5cinstance) (jeremyevans)
- Significant improvements to the ODBC and ADO adapters in general (jeremyevans)
- The ADO adapter no longer attempts to use database transactions, since they never worked (jeremyevans)
- Much better support for Microsoft SQL Server using the ADO, ODBC, and JDBC adapters (jeremyevans)
- Support rename_column, set_column_null, set_column_type, and add_foreign_key on H2 (jeremyevans)
- Support adding a column with a primary key or unique constraint to an existing table on SQLite (jeremyevans)
- Support altering a column‘s type, null status, or default on SQLite (jeremyevans)
- Fix renaming a NOT NULL column without a default on MySQL (nougad, jeremyevans) (273)
- Don‘t swallow DatabaseConnectionErrors when creating model subclasses (tommy.midttveit)

### 3.2.0 (2009-07-02)

- In the STI plugin, don‘t overwrite the STI field if it is already set (jeremyevans)
- Add support for Common Table Expressions, which use the SQL WITH clause (jeremyevans)
- Add SQL::WindowFunction, expand virtual row blocks to support them and other constructions (jeremyevans)
- Add Model#autoincrementing_primary_key, for when the autoincrementing key isn‘t the same as the primary key (jeremyevans)
- Add Dataset#ungraphed, to remove the splitting of results into subhashes or associated records (jeremyevans)
- Support :opclass option for PostgreSQL indexes (tmi, jeremyevans)
- Make parsing of server‘s version more reliable for PostgreSQL (jeremyevans)
- Add Dataset#qualify, which is qualify_to with a first_source default (jeremyevans)
- Add :ruby_default to parsed schema information, which contains a ruby object representing the database default (jeremyevans)
- Fix changing a column‘s name, type, or null status on MySQL when column has a string default (jeremyevans)
- Remove Dataset#to_table_reference protected method, no longer used (jeremyevans)
- Fix thread-safety issue in stored procedure code (jeremyevans)
- Remove SavepointTransactions module, integrate into Database code (jeremyevans)
- Add supports_distinct_on? method (jeremyevans)
- Remove SQLStandardDateFormat, replace with requires_sql_standard_datetimes? method (jeremyevans)
- Remove UnsupportedIsTrue module, replace with supports_is_true? method (jeremyevans)
- Remove UnsupportedIntersectExcept(All)? modules, replace with methods (jeremyevans)
- Make Database#indexes work on PostgreSQL versions prior to 8.3 (tested on 7.4) (jeremyevans)
- Fix bin/sequel using a YAML file on 1.9 (jeremyevans)
- Allow connection pool options to be specified in connection string (jeremyevans)
- Handle :user and :password options in the JDBC adapter (jeremyevans)
- Fix warnings when using the ODBC adapter (jeremyevans)
- Add opening_databases.rdoc file for describing how to connect to a database (mwlang, jeremyevans)
- Significantly increase JDBC select performance (jeremyevans)
- Slightly increase SQLite select performance using the native adapter (jeremyevans)
- Majorly increase MySQL select performance using the native adapter (jeremyevans)
- Pass through unsigned/elements/size and other options when altering columns on MySQL (tmm1)
- Allow on_duplicate_key_update to affect Dataset#insert on MySQL (tmm1)
- Support using a given table and column to store schema versions, using new Migrator.run method (bougyman, jeremyevans)
- Fix foreign key table constraints on MySQL (jeremyevans)
- Remove Dataset#table_exists?, use Database#table_exists? instead (jeremyevans)
- Fix graphing of datasets with dataset sources (jeremyevans) (271)
- Raise a Sequel::Error if Sequel.connect is called with something other than a Hash or String (jeremyevans) (272)
- Add -N option to bin/sequel to not test the database connection (jeremyevans)
- Make Model.grep call Dataset#grep instead of Enumerable#grep (jeremyevans)
- Support the use of Regexp as first argument to StringExpression.like (jeremyevans)
- Fix Database#indexes on PostgreSQL when the schema used is a symbol (jeremyevans)

### 3.1.0 (2009-06-04)

- Require the classes match to consider an association a reciprocal (jeremyevans) (270)
- Make Migrator work correctly with file names like 001_873465873465873465_some_name.rb (jeremyevans) (267)
- Add Dataset#qualify_to and qualify_to_first_source, for qualifying unqualified identifiers in the dataset (jeremyevans)
- All the use of sql_subscript on most SQL::* objects, and support non-integer subscript values (jeremyevans)
- Add reflection.rdoc file which explains and gives examples of many of Sequel‘s reflection methods (jeremyevans)
- Add many_through_many plugin, allowing you to construct an association to multiple objects through multiple join tables (jeremyevans)
- Add the :cartesian_product_number option to associations, for specifying if they can cause a cartesian product (jeremyevans)
- Make :eager_graph association option work correctly when lazily loading many_to_many associations (jeremyevans)
- Make eager_unique_table_alias consider joined tables as well as tables in the FROM clause (jeremyevans)
- Make add_graph_aliases work correctly even if set_graph_aliases hasn‘t been used (jeremyevans)
- Fix using :conditions that are a placeholder string in an association (e.g. :conditions=>[‘a = ?’, 42]) (jeremyevans)
- On MySQL, make Dataset#insert_ignore affect insert as well as multi_insert and import (jeremyevans, tmm1)
- Add -t option to bin/sequel to output the full backtrace if an exception is raised (jeremyevans)
- Make schema_dumper extension ignore errors with indexes unless it is dumping in the database-specific type format (jeremyevans)
- Don‘t dump partial indexes in the MySQL adapter (jeremyevans)
- Add :ignore_index_errors option to Database#create_table and :ignore_errors option to Database#add_index (jeremyevans)
- Make graphing a complex dataset work correctly (jeremyevans)
- Fix MySQL command out of sync errors, disconnect from database if they occur (jeremyevans)
- In the schema_dumper extension, do a much better job of parsing defaults from the database (jeremyevans)
- On PostgreSQL, assume the public schema if one is not given and there is no default in Database#tables (jeremyevans)
- Ignore a :default value if creating a String :text=>true or File column on MySQL, since it doesn‘t support defaults on text/blob columns (jeremyevans)
- On PostgreSQL, do not raise an error when attempting to reset the primary key sequence for a table without a primary key (jeremyevans)
- Allow plugins to have a configure method that is called on every attempt to load them (jeremyevans)
- Attempting to load an already loaded plugin no longer calls the plugin‘s apply method (jeremyevans)
- Make plugin‘s plugin_opts methods return an array of arguments if multiple arguments were given, instead of just the first argument (jeremyevans)
- Keep track of loaded plugins at Model.plugins, allows plugins to depend on other plugins (jeremyevans)
- Make Dataset#insert on PostgreSQL work with static SQL (jeremyevans)
- Add lazy_attributes plugin, for creating attributes that can be lazily loaded from the database (jeremyevans)
- Add tactical_eager_loading plugin, similar to DataMapper‘s strategic eager loading (jeremyevans)
- Don‘t raise an error when loading a plugin with DatasetMethods where none of the methods are public (jeremyevans)
- Add identity_map plugin, for creating temporary thread-local identity maps with some caching (jeremyevans)
- Support savepoints when using MySQL and SQLite (jeremyevans)
- Add -C option to bin/sequel that copies one database to another (jeremyevans)
- In the schema_dumper extension, don‘t include defaults that contain literal strings unless the DBs are the same (jeremyevans)
- Only include valid non-partial indexes of simple column references in the PostgreSQL adapter (jeremyevans)
- Add -h option to bin/sequel for outputting the usage, alias for -? (jeremyevans)
- Add -d and -D options to bin/sequel for dumping schema migrations (jeremyevans)
- Support eager graphing for model tables that lack primary keys (jeremyevans)
- Add Model.create_table? to the schema plugin, similar to Database#create_table? (jeremyevans)
- Add Database#create_table?, which creates the table if it doesn‘t already exist (jeremyevans)
- Handle ordered and limited datasets correctly when using UNION, INTERSECT, or EXCEPT (jeremyevans)
- Fix unlikely threading bug with class level validations (jeremyevans)
- Make the schema_dumper extension dump tables in alphabetical order in migrations (jeremyevans)
- Add Sequel.extension method for loading extensions, so you don‘t have to use require (jeremyevans)
- Allow bin/sequel to respect multiple -L options instead of ignoring all but the last one (jeremyevans)
- Add :command_timeout and :provider options to ADO adapter (hgimenez)
- Fix exception messages when Sequel.string_to_* fail (jeremyevans)
- Fix String :type=>:text generic type in the Firebird adapter (wishdev)
- Add Sequel.amalgalite adapter method (jeremyevans)

### 3.0.0 (2009-05-04)

- Remove dead threads from connection pool if the pool is full and a connection is requested (jeremyevans)
- Add autoincrementing primary key support in the Oracle adapter, using a sequence and trigger (jeremyevans, Mike Golod)
- Make Model#save use the same server it uses for saving as for retrieving the saved record (jeremyevans)
- Add Database#database_type method, for identifying which type of database the object is connecting to (jeremyevans)
- Add ability to reset primary key sequences in the PostgreSQL adapter (jeremyevans)
- Fix parsing of non-simple sequence names (that contain uppercase, spaces, etc.) in the PostgreSQL adapter (jeremyevans)
- Support dumping indexes in the schema_dumper extension (jeremyevans)
- Add index parsing to PostgreSQL, MySQL, SQLite, and JDBC adapters (jeremyevans)
- Correctly quote SQL Array references, and handle qualified identifiers with them (e.g. :table__column.sql_subscript(1)) (jeremyevans)
- Allow dropping an index with a name different than the default name (jeremyevans)
- Allow Dataset#from to remove existing FROM tables when called without an argument, instead of raising an error later (jeremyevans)
- Fix string quoting on Oracle so it doesn‘t double backslashes (jeremyevans)
- Alias the count function call in Dataset#count, fixes use on MSSQL (akitaonrails, jeremyevans)
- Allow QualifiedIdentifiers to be qualified, to allow :column.qualify(:table).qualify(:schema) (jeremyevans)
- Allow :db_type=>’mssql’ option to be respected when using the DBI adapter (akitaonrails)
- Add schema_dumper extension, for dumping schema of tables (jeremyevans)
- Allow generic database types specified as ruby types to take options (jeremyevans)
- Change Dataset#exclude to invert given hash argument, not negate it (jeremyevans)
- Make Dataset#filter and related methods treat multiple arguments more intuitively (jeremyevans)
- Fix full text searching with multiple search terms on MySQL (jeremyevans)
- Fix altering a column name, type, default, or NULL/NOT NULL status on MySQL (jeremyevans)
- Fix index type syntax on MySQL (jeremyevans)
- Add temporary table support, via :temp option to Database#create_table (EppO, jeremyevans)
- Add Amalgalite adapter (jeremyevans)
- Remove Sequel::Metaprogramming#metaattr_accessor and metaattr_reader (jeremyevans)
- Remove Dataset#irregular_function_sql (jeremyevans)
- Add Dataset#full_text_sql to the MySQL adapter (dusty)
- Fix schema type parsing of decimal types on MySQL (jeremyevans)
- Make Dataset#quote_identifier work with SQL::Identifiers (jeremyevans)
- Remove methods and features deprecated in 2.12.0 (jeremyevans)

### 2.12.0 (2009-04-03)

- Deprecate Java::JavaSQL::Timestamp#usec (jeremyevans)
- Fix Model.[] optimization introduced in 2.11.0 for databases that don‘t use LIMIT (jacaetevha)
- Don‘t use the model association plugin if SEQUEL_NO_ASSOCIATIONS constant or environment variable is defined (jeremyevans)
- Don‘t require core_sql if SEQUEL_NO_CORE_EXTENSIONS constant or environment variable is defined (jeremyevans)
- Add validation_helpers model plugin, which adds instance level validation support similar to previously standard validations, with a different API (jeremyevans)
- Split multi_insert into 2 methods with separate APIs, multi_insert for hashes, import for arrays of columns and values (jeremyevans)
- Deprecate Dataset#transform and Model.serialize, and model serialization plugin (jeremyevans)
- Add multi_insert_update to the MySQL adapter, used for setting specific update behavior when an error occurs when using multi_insert (dusty)
- Add multi_insert_ignore to the MySQL adapter, used for skipping errors on row inserts when using multi_insert (dusty)
- Add Sequel::MySQL.convert_invalid_date_time accessor for dealing with dates like "0000-00-00" and times like "25:00:00" (jeremyevans, epugh)
- Eliminate internal dependence on core_sql extensions (jeremyevans)
- Deprecate Migration and Migrator, require ‘sequel/extensions/migration’ if you want them (jeremyevans)
- Denamespace Sequel::Error decendants (e.g. use Sequel::Rollback instead of Sequel::Error::Rollback) (jeremyevans)
- Deprecate Error::InvalidTransform, Error::NoExistingFilter, and Error::InvalidStatement (jeremyevans)
- Deprecate Dataset#[] when called without an argument, and Dataset#map when called with an argument and a block (jeremyevans)
- Fix aliasing columns in the JDBC adapter (per.melin) (263)
- Make Database#rename_table remove the cached schema entry for the table (jeremyevans)
- Make Database schema sql methods private (jeremyevans)
- Deprecate Database multi_threaded? and logger (jeremyevans)
- Make Dataset#where always affect the WHERE clause (jeremyevans)
- Deprecate Object#blank? and related extensions, require ‘sequel/extensions/blank’ to get them back (jeremyevans)
- Move lib/sequel_core into lib/sequel and lib/sequel_model into lib/sequel/model (jeremyevans)
- Remove Sequel::Schema::SQL module, move methods into Sequel::Database (jeremyevans)
- Support creating and dropping schema qualified views (jeremyevans)
- Fix saving a newly inserted record in an after_create or after_save hook (jeremyevans)
- Deprecate Dataset#print and PrettyTable, require ‘sequel/extensions/pretty_table’ if you want them (jeremyevans)
- Deprecate Database#query and Dataset#query, require ‘sequel/extensions/query’ if you want them (jeremyevans)
- Deprecate Dataset#paginate and each_page, require ‘sequel/extensions/pagination’ if you want them (jeremyevans)
- Fix ~{:bool_col=>true} and related inversions of boolean values (jeremyevans)
- Add disable_insert_returning method to PostgreSQL datasets, so they fallback to just using INSERT (jeremyevans)
- Don‘t use savepoints by default on PostgreSQL, use the :savepoint option to Database#transaction to use a savepoint (jeremyevans)
- Deprecate Database#transaction accepting a server symbol argument, use an options hash with the :server option (jeremyevans)
- Add Model.use_transactions for setting whether models should use transactions when destroying/saving records (jeremyevans, mjwillson)
- Deprecate Model::Validation::Errors, use Model::Errors (jeremyevans)
- Deprecate string inflection methods, require ‘sequel/extensions/inflector’ if you use them (jeremyevans)
- Deprecate Model validation class methods, override Model#validate instead or Model.plugin validation_class_methods (jeremyevans)
- Deprecate Model schema methods, use Model.plugin :schema (jeremyevans)
- Deprecate Model hook class methods, use instance methods instead or Model.plugin :hook_class_methods (jeremyevans)
- Deprecate Model.set_sti_key, use Model.plugin :single_table_inheritance (jeremyevans)
- Deprecate Model.set_cache, use Model.plugin :caching (jeremyevans)
- Move most model instance methods into Model::InstanceMethods, for easier overriding of instance methods for all models (jeremyevans)
- Move most model class methods into Model::ClassMethods, for easier overriding of class methods for all models (jeremyevans)
- Deprecate String#to_date, to_datetime, to_time, and to_sequel_time, use require ‘sequel/extensions/string_date_time’ if you want them (jeremyevans)
- Deprecate Array#extract_options! and Object#is_one_of? (jeremyevans)
- Deprecate Object#meta_def, meta_eval, and metaclass (jeremyevans)
- Deprecate Module#class_def, class_attr_overridable, class_attr_reader, metaalias, metaattr_reader, and metaatt_accessor (jeremyevans)
- Speed up the calling of most column accessor methods, and reduce memory overhead of creating them (jeremyevans)
- Deprecate Model#set_restricted using Model#[] if no setter method exists, a symbol is used, and the columns are not set (jeremyevans)
- Deprecate Model#set_with_params and update_with_params (jeremyevans)
- Deprecate Model#save!, use Model.save(:validate=>false) (jeremyevans)
- Deprecate Model#dataset (jeremyevans)
- Deprecate Model.is and Model.is_a, use Model.plugin for plugins (jeremyevans)
- Deprecate Model.str_columns, Model#str_columns, set_values, update_values (jeremyevans)
- Deprecate Model.delete_all, .destroy_all, .size, and .uniq (jeremyevans)
- Copy all current dataset options when calling Model.db= (jeremyevans)
- Deprecate Model.belongs_to, Model.has_many, and Model.has_and_belongs_to_many (jeremyevans)
- Remove SQL::SpecificExpression, have subclasses inherit from SQL::Expression instead (jeremyevans)
- Deprecate SQL::CastMethods#cast_as (jeremyevans)
- Deprecate calling Database#schema without a table argument (jeremyevans)
- Remove cached version of @db_schema in model instances to reduce memory and marshalling overhead (tmm1)
- Deprecate Dataset#quote_column_ref and Dataset#symbol_to_column_ref (jeremyevans)
- Deprecate Dataset#size and Dataset#uniq (jeremyevans)
- Deprecate passing options to Dataset#each, all, single_record, single_value, sql, select_sql, update, update_sql, delete, delete_sql, and exists (jeremyevans)
- Deprecate Dataset#[Integer] (jeremyevans)
- Deprecate Dataset#create_view and Dataset#create_or_replace_view (jeremyevans)
- Model datasets now have a model accessor that returns the related model (jeremyevans)
- Model datasets no longer have :models and :polymorphic_key options (jeremyevans)
- Deprecate Dataset.dataset_classes, Dataset#model_classes, Dataset#polymorphic_key, and Dataset#set_model (jeremyevans)
- Allow Database#get and Database#select to take a block (jeremyevans)
- Deprecate Database#>> (jeremyevans)
- Deprecate String#to_blob and Sequel::SQL::Blob#to_blob (jeremyevans)
- Deprecate use of Symbol#| for SQL array subscripts, add Symbol#sql_subscript (jeremyevans)
- Deprecate Symbol#to_column_ref (jeremyevans)
- Deprecate String#expr (jeremyevans)
- Deprecate Array#to_sql, String#to_sql, and String#split_sql (jeremyevans)
- Deprecate passing an array to Database#<< (jeremyevans)
- Deprecate Range#interval (jeremyevans)
- Deprecate Enumerable#send_each (jeremyevans)
- Deprecate Hash#key on ruby 1.8, change some SQLite adapter constants (jeremyevans)
- Deprecate Sequel.open, Sequel.use_parse_tree=?, and the upcase_identifier methods (jeremyevans)
- Deprecate virtual row blocks without block arguments, unless Sequel.virtual_row_instance_eval is enabled (jeremyevans)
- Support schema parsing in the Oracle adapter (jacaetevha)
- Allow virtual row blocks to be instance_evaled, add Sequel.virtual_row_instance_eval= (jeremyevans)

### 2.11.0 (2009-03-02)

- Optimize Model.[] by using static sql when possible, for a 30-40% speed increase (jeremyevans)
- Add Dataset#with_sql, which returns a clone of the datatset with static SQL (jeremyevans)
- Refactor Dataset#literal so it doesn‘t need to be overridden in subadapters, for a 20-25% performance increase (jeremyevans)
- Remove SQL::IrregularFunction, no longer used internally (jeremyevans)
- Allow String#lit to take arguments and return a SQL::PlaceholderLiteralString (jeremyevans)
- Add Model#set_associated_object, used by the many_to_one setter method, for easier overriding (jeremyevans)
- Allow use of database independent types when casting (jeremyevans)
- Give association datasets knowledge of the model object that created them and the related association reflection (jeremyevans)
- Make Dataset#select, select_more, order, order_more, and get take a block that yields a SQL::VirtualRow, similar to filter (jeremyevans)
- Fix stored procedures in MySQL adapter when multiple arguments are used (clivecrous)
- Add :conditions association option, for easier filtering of associated objects (jeremyevans)
- Add :clone association option, for making clones of existing associations (jeremyevans)
- Handle typecasting invalid date strings (and possible other types) correctly (jeremyevans)
- Add :compress=>false option to MySQL adapter to turn off compression of client-server connection (tmm1)
- Set SQL_AUTO_IS_NULL=0 on MySQL connections, disable with :auto_is_null=>false (tmm1)
- Add :timeout option to MySQL adapter, default to 30 days (tmm1)
- Set MySQL encoding using Mysql#options so it works across reconnects (tmm1)
- Fully support blobs on SQLite (jeremyevans)
- Add String#to_sequel_blob, alias String#to_blob to that (jeremyevans)
- Fix default index names when a non-String or Symbol column is used (jeremyevans)
- Fix some ruby -w warnings (jeremyevans) (259)
- Fix issues with default column values, table names, and quoting in the rename_column and drop_column support in shared SQLite adapter (jeremyevans)
- Add rename_column support to SQLite shared adapter (jmhodges)
- Add validates_inclusion_of validation (jdunphy)

### 2.10.0 (2009-02-03)

- Don‘t use a default schema any longer in the shared PostgreSQL adapter (jeremyevans)
- Make Dataset#quote_identifier return LiteralStrings as-is (jeremyevans)
- Support symbol keys and unnested hashes in the sequel command line tool‘s yaml config support (jeremyevans)
- Add schema parsing support to the JDBC adapter (jeremyevans)
- Add per-database type translation support for schema changes, translating ruby classes to database specific types (jeremyevans)
- Add Sequel::DatabaseConnectionError, for indicating that Sequel wasn‘t able to connect to the database (jeremyevans)
- Add validates_not_string validation, useful in conjunction with raise_on_typecast_failure = false (jeremyevans)
- Don‘t modify Model#new? and Model#changed_columns when saving a record until after the after hooks have been run (tamas, jeremyevans)
- Database#quote_identifiers= now affects future schema modification statements, even if it is not used before one of the schema modification statements (jeremyevans)
- Fix literalization of blobs when using the PostreSQL JDBC subadapter (jeremyevans)
- Fix literalization of date and time types when using the MySQL JDBC subadapter (jeremyevans)
- Convert some Java specific types to ruby types on output in the JDBC adapter (jeremyevans)
- Add Database#tables method to JDBC adapter (jeremyevans)
- Add H2 JDBC subadapter (logan_barnett, david_koontz, james_britt, jeremyevans)
- Add identifer_output_method, used for converting identifiers coming out of the database, replacing the lowercase support on some databases (jeremyevans)
- Add identifier_input_method, used for converting identifiers going into the database, replacing upcase_identifiers (jeremyevans)
- Add :allow_missing validation option, useful if the database provides a good default (jeremyevans)
- Fix literalization of SQL::Blobs in DataObjects and JDBC adapter‘s postgresql subadapters when ruby 1.9 is used (jeremyevans)
- When using standard strings in the postgres adapter with the postgres-pr driver, use custom string escaping to prevent errors (jeremyevans)
- Before hooks now run in reverse order of being added, so later ones are run first (tamas)
- Add Firebird adapter, requires Firebird ruby driver located at github.com/wishdev/fb (wishdev)
- Don‘t clobber the following Symbol instance methods when using ruby 1.9: [], <, <=, >, >= (jeremyevans)
- Quote the table name and the index for PostgreSQL index creation (jeremyevans)
- Add DataObjects adapter, supporting PostgreSQL, MySQL, and SQLite (jeremyevans)
- Add ability for Database#create_table to take options, support specifying MySQL engine, charset, and collate per table (pusewicz, jeremyevans)
- Add Model.add_hook_type class method, for adding your own hook types, mostly for use by plugin authors (pkondzior, jeremyevans)
- Add Sequel.version for getting the internal version of Sequel (pusewicz, jeremyevans)

### 2.9.0 (2009-01-12)

- Add -L option to sequel command line tool to load all .rb files in the given directory (pkondzior, jeremyevans)
- Fix Dataset#destroy for model datasets that can‘t handle nested queries (jeremyevans)
- Improve the error messages in parts of Sequel::Model (jeremyevans, pusewicz)
- Much better support for Dataset#{union,except,intersect}, allowing chaining and respecting order (jeremyevans)
- Default to logging only WARNING level messages when connecting to PostgreSQL (jeremyevans)
- Fix add_foreign_key for MySQL (jeremyevans, aphyr)
- Correctly literalize BigDecimal NaN and (+-)Infinity values (jeremyevans) (256)
- Make Sequel raise an Error if you attempt to subclass Sequel::Model before setting up a database connection (jeremyevans)
- Add Sequel::BeforeHookFailed exception to be raised when a record fails because a before hook fails (bougyman)
- Add Sequel::ValidationFailed exception to be raised when a record fails because a validation fails (bougyman)
- Make Database#schema raise an error if given a table that doesn‘t exist (jeremyevans) (255)
- Make Model#inspect call Model#inspect_values private method for easier overloading (bougyman)
- Add methods to create and drop functions, triggers, and procedural languages on PostgreSQL (jeremyevans)
- Fix Dataset#count when using UNION, EXCEPT, or INTERSECT (jeremyevans)
- Make SQLite keep table‘s primary key information when dropping columns (jmhodges)
- Support dropping indicies on SQLite (jmhodges)

### 2.8.0 (2008-12-05)

- Support drop column operations inside a transaction on sqlite (jeremyevans)
- Support literal strings with placeholders and subselects in prepared statements (jeremyevans)
- Have the connection pool remove disconnected connections when the adapter supports it (jeremyevans)
- Make Dataset#exists return a LiteralString (jeremyevans)
- Support multiple SQL statements in one query in the MySQL adapter (jeremyevans)
- Add stored procedure support for the MySQL and JDBC adapters (jeremyevans, krsgoss) (252)
- Support options when altering a column‘s type (for changing enums, varchar size, etc.) (jeremyevans)
- Support AliasedExpressions in tables when using implicitly qualified arguments in joins (jeremyevans)
- Support Dataset#except on Oracle (jeremyevans)
- Raise errors when EXCEPT/INTERSECT is used when not supported (jeremyevans)
- Fix ordering of UNION, INTERSECT, and EXCEPT statements (jeremyevans) (253)
- Support aliasing subselects in the Oracle adapter (jeremyevans)
- Add a subadapter for the Progress RDBMS to the ODBC adapter (:db_type=>’progress’) (groveriffic) (251)
- Make MySQL and Oracle adapters raise an Error if asked to do a SELECT DISTINCT ON (jeremyevans)
- Set standard_conforming_strings = ON by default when using PostgreSQL, turn off with Sequel::Postgres.force_standard_strings = false (jeremyevans) (247)
- Fix Database#rename_table when using PostgreSQL (jeremyevans) (248)
- Whether to upcase or quote identifiers can now be set separately, via Sequel.upcase_identifiers= or the :upcase_identifiers database option (jeremyevans)
- Support transactions in the ODBC adapter (dlee)
- Support multi_insert_sql and unicode string literals in MSSQL shared adapter (dlee)
- Make PostgreSQL use the default schema if parsing the schema for all tables at once, even if :schema=>nil option is used (jeremyevans)
- Make MySQL adapter not raise an error when giving an SQL::Identifier object to the schema modification methods such as create_table (jeremyevans)
- The keys of the hash returned by Database#schema without a table name are now quoted strings instead of symbols (jeremyevans)
- Make Database#schema to handle implicit schemas on all databases and multiple identifier object types (jeremyevans)
- Remove Sequel.odbc_mssql method (jeremyevans) (249)
- More optimization of Model#initialize (jeremyevans)
- Treat interval as it‘s own type, not an integer type (jeremyevans)
- Allow use of implicitly qualified symbol as argument to Symbol#qualify (:a.qualify(:b__c)=>b.c.a), fixes model associations in different schemas (jeremyevans) (246)

### 2.7.1 (2008-11-04)

- Fix PostgreSQL Date optimization so that it doesn‘t reject dates like 11/03/2008 (jeremyevans)

### 2.7.0 (2008-11-03)

- Transform AssociationReflection from a single class to a class hierarchy (jeremyevans)
- Optimize Date object creation in PostgreSQL adapter (jeremyevans)
- Allow easier creation of custom association types, though support for them may still be suboptimal (jeremyevans)
- Add :eager_grapher option to associations, which the user can use to override the default eager_graph code (jeremyevans)
- Associations are now inherited when a model class is subclassed (jeremyevans)
- Instance methods added by associations are now added to an anonymous module the class includes, allowing you to override them and use super (jeremyevans)
- Add add_graph_aliases (select_more for graphs), and allow use of arbitrary expressions when graphing (jeremyevans)
- Fix a corner case where the wrong table name is used in eager_graph (jeremyevans)
- Make Dataset#join_table take an option hash instead of a table_alias argument, add support for :implicit_qualifier option (jeremyevans)
- Add :left_primary_key and :right_primary_key options to many_to_many associations (jeremyevans)
- Add :primary_key option to one_to_many and many_to_one associations (jeremyevans)
- Make after_load association callbacks take effect when eager loading via eager (jeremyevans)
- Add a :uniq association option to many_to_many associations (jeremyevans)
- Support using any expression as the argument to Symbol#like (jeremyevans)
- Much better support for multiple schemas in PostgreSQL (jeremyevans) (243)
- The first argument to Model#initalize can no longer be nil, it must be a hash if it is given (jeremyevans)
- Remove Sequel::Model.lazy_load_schema= setting (jeremyevans)
- Lazily load model instance options such as raise_on_save_failure, for better performance (jeremyevans)
- Make Model::Validiation::Errors more Rails-compatible (jeremyevans)
- Refactor model hooks for performance (jeremyevans)
- Major performance enhancement when fetching rows using PostgreSQL (jeremyevans)
- Don‘t typecast serialized columns in models (jeremyevans)
- Add Array#sql_array to handle ruby arrays of all two pairs as SQL arrays (jeremyevans) (245)
- Add ComplexExpression#== and eql?, for checking equality (rubymage) (244)
- Allow full text search on PostgreSQL to include rows where a search column is NULL (jeremyevans)
- PostgreSQL full text search queries with multiple columns are joined with space to prevent joining border words to one (michalbugno)
- Don‘t modify a dataset‘s cached column information if calling each with an option that modifies the columns (jeremyevans)
- The PostgreSQL adapter will now generally default to using a unix socket in /tmp if no host is specified, instead of a tcp socket to localhost (jeremyevans)
- Make Dataset#sql call Dataset#select_sql instead of being an alias, to allow for easier subclassing (jeremyevans)
- Split Oracle adapter into shared and unshared parts, so Oracle is better supported when using JDBC (jeremyevans)
- Fix automatic loading of Oracle driver when using JDBC adapter (bburton333) (242)

### 2.6.0 (2008-10-11)

- Make the sqlite adapter respect the Sequel.datetime_class setting, for timestamp and datetime types (jeremyevans)
- Enhance the CASE statement support to include an optional expression (jarredholman)
- Default to using the simple language if no language is specified for a full text index on PostgreSQL (michalbugno)
- Add Model.raise_on_typecast_failure=, which makes it possible to not raise errors on invalid typecasts (michalbugno)
- Add schema.rdoc file, which provides an brief description of the various parts of Sequel related to schema modification (jeremyevans)
- Fix constraint generation when not using a proc or interpolated string (jeremyevans)
- Make eager_graph respect associations’ :order options (use :order_eager_graph=>false to disable) (jeremyevans)
- Cache negative lookup when eagerly loading many_to_one associations where no objects have an associated object (jeremyevans)
- Allow string keys to be used when using Dataset#multi_insert (jeremyevans)
- Fix join_table when doing the first join for a dataset where the first source is a dataset when using unqualified columns (jeremyevans)
- Fix a few corner cases in eager_graph (jeremyevans)
- Support transactions on MSSQL (jeremyevans)
- Use string literals in AS clauses on SQLite (jeremyevans) (241)
- AlterTableGenerator#set_column_allow_null was added to SET/DROP NOT NULL for columns (divoxx)
- Database#tables now works for MySQL databases using the JDBC adapter (jeremyevans)
- Database#drop_view can now take multiple arguments to drop multiple views at once (jeremyevans)
- Schema modification methods (e.g. drop_table, create_table!) now remove the cached schema entry (jeremyevans)
- Models can now determine their primary keys by looking at the schema (jeremyevans)
- No longer include :numeric_precision and :max_chars entries in the schema column hashes, use the :db_type entry instead (jeremyevans)
- Make schema parsing on PostgreSQL handle implicit schemas (e.g. schema(:schema__table)), so it works with models for tables outside the public schema (jeremyevans)
- Significantly speed up schema parsing on MySQL (jeremyevans)
- Include primary key information when parsing the schema (jeremyevans)
- Fix schema generation of composite foreign keys on MySQL (clivecrous, jeremyevans)

### 2.5.0 (2008-09-03)

- Add Dataset set_defaults and set_overrides, used for scoping the values used in insert/update statements (jeremyevans)
- Allow Models to use the RETURNING clause when inserting records on PostgreSQL (jeremyevans)
- Raise Sequel::DatabaseError instead of generic Sequel::Error for database errors, don‘t swallow tracebacks (jeremyevans)
- Use INSERT … RETURNING … with PostgreSQL 8.2 and higher (jeremyevans)
- Make insert_sql, delete_sql, and update_sql respect the :sql option (jeremyevans)
- Default to converting 2 digit years, use Sequel.convert_two_digit_years = false to get back the old behavior (jeremyevans)
- Make the PostgreSQL adapter with the pg driver use async_exec, so it doesn‘t block the entire interpreter (jeremyevans)
- Make the schema generators support composite primary and foreign keys and unique constraints (jarredholman)
- Work with the 2008.08.17 version of the pg gem (erikh)
- Disallow abuse of SQL function syntax for types (use :type=>:varchar, :size=>255 instead of :type=>:varchar[255]) (jeremyevans)
- Quote index names when creating or dropping indexes (jeremyevans, SanityInAnarchy)
- Don‘t have column accessor methods override plugin instance methods (jeremyevans)
- Allow validation of multiple attributes at once, with built in support for uniqueness checking of multiple columns (jeremyevans)
- In PostgreSQL adapter, fix inserting a row with a primary key value inside a transaction (jeremyevans)
- Allow before_save and before_update to affect the columns saved by save_changes (jeremyevans)
- Make Dataset#single_value work when graphing, which fixes count and paginate on graphed datasets (jeremyevans)

### 2.4.0 (2008-08-06)

- Handle Java::JavaSql::Date type in the JDBC adapter (jeremyevans)
- Add support for read-only slave/writable master databases and database sharding (jeremyevans)
- Remove InvalidExpression, InvalidFilter, InvalidJoinType, and WorkerStop exceptions (jeremyevans)
- Add prepared statement/bound variable support (jeremyevans)
- Fix anonymous column names in the ADO adapter (nusco)
- Remove odbc_mssql adapter, use :db_type=>’mssql’ option instead (jeremyevans)
- Split MSSQL specific syntax into separate file, usable by ADO and ODBC adapters (nusco, jeremyevans)

### 2.3.0 (2008-07-25)

- Enable almost full support for MySQL using JDBC (jeremyevans)
- Fix ODBC adapter‘s conversion of ::ODBC::Time values (Michael Xavier)
- Enable full support for SQLite-JDBC using the JDBC adapter (jeremyevans)
- Minor changes to allow for full Ruby 1.9 compatibility (jeremyevans)
- Make Database#disconnect work for the ADO adapter (spicyj)
- Don‘t raise an exception in the ADO adapter if the dataset contains no records (nusco)
- Enable almost full support of PostgreSQL-JDBC using the JDBC adapter (jeremyevans)
- Remove Sequel::Worker (jeremyevans)
- Make PostgreSQL adapter not raise an error when inserting records into a table without a primary key (jeremyevans)
- Make Database.uri_to_options a private class method (jeremyevans)
- Make JDBC load drivers automatically for PostgreSQL, MySQL, SQLite, Oracle, and MSSQL (jeremyevans)
- Make Oracle adapter work with a nonstandard Oracle database port (pavel.lukin)
- Typecast ’’ to nil by default for non-string non-blob columns, add typecast_empty_string_to_nil= model class and instance methods (jeremyevans)
- Use a simpler select in Dataset#empty?, fixes use with MySQL (jeremyevans)
- Add integration test suite, testing sequel against a real database, with nothing mocked (jeremyevans)
- Make validates_length_of default tag depend on presence of options passed to it (jeremyevans)
- Combine the directory structure for sequel_model and sequel_core, now there is going to be only one gem named sequel (jeremyevans)

### 2.2.0 (2008-07-05)

- Add :extend association option, extending the dataset with module(s) (jeremyevans)
- Add :after_load association callback option, called after associated objects have been loaded from the database (jeremyevans)
- Make validation methods support a :tag option, to work correctly with source reloading (jeremyevans)
- Add :before_add, :after_add, :before_remove, :after_remove association callback options (jeremyevans)
- Break many_to_one association setter method in two parts, for easier overriding (jeremyevans)
- Model.validates_presence_of now considers false as present instead of absent (jeremyevans)
- Add Model.raise_on_save_failure, raising errors on save failure instead of return false (now nil), default to true (jeremyevans)
- Add :eager_loader association option, to specify code to be run when eager loading (jeremyevans)
- Make :many_to_one associations support :dataset, :order, :limit association options, as well as block arguments (jeremyevans)
- Add :dataset association option, which overrides the default base dataset to use (jeremyevans)
- Add :eager_graph association option, works just like :eager except it uses eager_graph (jeremyevans)
- Add :graph_join_table_join_type association option (jeremyevans)
- Add :graph_only_conditions and :graph_join_table_only_conditions association options (jeremyevans)
- Add :graph_block and :graph_join_table_block association options (jeremyevans)
- Set the model‘s dataset‘s columns in addition to the model‘s columns when loading the schema for a model (jeremyevans)
- Make caching work correctly with subclasses (jeremyevans)
- Add the Model.to_hash dataset method (jeremyevans)
- Filter blocks now yield a SQL::VirtualRow argument, which is useful if another library defines operator methods on Symbol (jeremyevans)
- Add Symbol#identifier method, to make x__a be treated as "x__a" instead of "x"."a" (jeremyevans)
- Dataset#update no longer takes a block, please use a hash argument with the expression syntax instead (jeremyevans)
- ParseTree support has been removed from Sequel (jeremyevans)
- Database#drop_column is now supported in the SQLite adapter (abhay)
- Tinyint columns can now be considered integers instead of booleans by setting Sequel.convert_tinyint_to_bool = false (samsouder)
- Allow the use of URL parameters in connection strings (jeremyevans)
- Ignore any previously selected columns when using Dataset#graph for the first time (jeremyevans)
- Dataset#graph now accepts a block which is passed to join_table (jeremyevans)
- Make Dataset#columns ignore any filtering, ordering, and distinct clauses (jeremyevans)
- Use the safer connection-specific string escaping methods for PostgreSQL (jeremyevans)
- Database#transaction now yields a connection when using the Postgres adapter, just like it does for other adapters (jeremyevans)
- Dataset#count now works for a limited dataset (divoxx)
- Database#add_index is now supported in the SQLite adapter (abhay)
- Sequel‘s MySQL adapter should no longer conflict with ActiveRecord‘s use of MySQL (careo)
- Treat Hash as expression instead of column alias when used in DISTINCT, ORDER BY, and GROUP BY clauses (jeremyevans)
- PostgreSQL bytea fields are now fully supported (dlee)
- For PostgreSQL, don‘t raise an error when assigning a value to a SERIAL PRIMARY KEY field when inserting records (jeremyevans)

### 2.1.0 (2008-06-17)

- Break association add_/remove_/remove_all_ methods into two parts, for easier overriding (jeremyevans)
- Add Model.strict_param_setting, on by default, which raises errors if a missing/restricted method is called via new/set/update/etc. (jeremyevans)
- Raise errors when using association methods on objects without valid primary keys (jeremyevans)
- The model‘s primary key is a restricted column by default, Add model.unrestrict_primary_key to get the old behavior (jeremyevans)
- Add Model.set_(allowed|restricted)_columns, which affect which columns create/new/set/update/etc. modify (jeremyevans)
- Calls to Model.def_dataset_method with a block are cached and reapplied to the new dataset if set_dataset is called, even in a subclass (jeremyevans)
- The :reciprocal option to associations should now be the symbol name of the reciprocal association, not an instance variable symbol (jeremyevans)
- Add Model#associations, which is a hash holding a cache of associated objects, with each association being a separate key (jeremyevans)
- Make all associations support a :graph_select option, specifying a column or array of columns to select when using eager_graph (jeremyevans)
- Bring back Model#set and Model#update, now the same as Model#set_with_params and Model#update_with_params (jeremyevans)
- Allow model datasets to call to_hash without any arguments, which allows easy creation of identity maps (jeremyevans)
- Add Model.set_sti_key, for easily setting up single table inheritance (jeremyevans)
- Make all associations support a :read_only option, which doesn‘t add methods that modify the database (jeremyevans)
- Make *_to_many associations support a :limit option, for specifying a limit to the resulting records (and possibly an offset) (jeremyevans)
- Make association block argument and :eager option affect the _dataset method (jeremyevans)
- Add a :one_to_one option to one_to_many associations, which creates a getter and setter similar to many_to_one (a.k.a. has_one) (jeremyevans)
- add_ and remove_ one_to_many association methods now raise an error if the passed object cannot be saved, instead of saving without validation (jeremyevans)
- Add support for :if option on validations, using a symbol (specifying an instance method) or a proc (dtsato)
- Support bitwise operators for NumericExpressions: &, |, ^, ~, <<, >> (jeremyevans)
- No longer raise an error for Dataset#filter(true) or Dataset#filter(false) (jeremyevans)
- Allow Dataset filter, or, exclude and other methods that call them to use both the block and regular arguments (jeremyevans)
- ParseTree support is now officially deprecated, use Sequel.use_parse_tree = false to use the expression (blockless) filters inside blocks (jeremyevans)
- Remove :pool_reuse_connections ConnectionPool/Database option, MySQL users need to be careful with nested queries (jeremyevans)
- Allow Dataset#graph :select option to take an array of columns to select (jeremyevans)
- Allow Dataset#to_hash to be called with only one argument, allowing for easy creation of lookup tables for a single key (jeremyevans)
- Allow join_table to accept a block providing the aliases and previous joins, that allows you to specify arbitrary conditions properly qualified (jeremyevans)
- Support NATURAL, CROSS, and USING joins in join_table (jeremyevans)
- Make sure HAVING comes before ORDER BY, per the SQL standard and at least MySQL, PostgreSQL, and SQLite (juco)
- 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)
- Add Symbol#qualify, for adding a table/schema qualifier to a column/table name (jeremyevans)
- Remove Module#metaprivate, since it duplicates the standard Module#private_class_method (jeremyevans)
- Support the SQL CASE expression via Array#case and Hash#case (jeremyevans)
- Support the SQL EXTRACT function: :date.extract(:year) (jeremyevans)
- Convert numeric fields to BigDecimal in PostgreSQL adapter (jeremyevans)
- Add :decimal fields to the schema parser (jeremyevans)
- 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)
- No longer assume the expr argument to join_table references the primary key column (jeremyevans)
- Rename the Sequel.time_class setting to Sequel.datetime_class (jeremyevans)
- Add savepoint/nesting support to postgresql transactions (elven)
- Use the specified table alias when joining a dataset, instead of the automatically generated alias (brushbox)

### 2.0.1 (2008-06-04)

- Make the choice of Time or DateTime optional for typecasting :datetime types, default to Time (jeremyevans)
- Reload database schema for table when calling Model.create_table (jeremyevans)
- Have PostgreSQL money type use BigDecimal instead of Float (jeremyevans)
- Have the PostgreSQL and MySQL adapters use the Sequel.time_class setting for datetime/timestamp types (jeremyevans)
- Add Sequel.time_class and String#to_sequel_time, used for converting time values from the database to either Time (default) or DateTime (jeremyevans)
- Make identifier quoting uppercase by default, to work better with the SQL standard, override in PostgreSQL (jeremyevans) (232)
- Add StringExpression#+, for simple SQL string concatenation (:x.sql_string + :y) (jeremyevans)
- Make StringMethods.like to a case sensensitive search on MySQL (use ilike for the old behavior) (jeremyevans)
- Add StringMethods.ilike, for case insensitive pattern matching (jeremyevans)
- Refactor ComplexExpression into three subclasses and a few modules, so operators that don‘t make sense are not defined for the class (jeremyevans)

### 2.0.0 (2008-06-01)

- Comprehensive update of all documentation (jeremyevans)
- Remove methods deprecated in 1.5.0 (jeremyevans)
- Add typecasting on attribute assignment to Sequel::Model objects, optional but enabled by default (jeremyevans)
- Returning false in one of the before_ hooks now causes the appropriate method(s) to immediately return false (jeremyevans)
- Add remove_all_* association method for *_to_many associations, which removes the association with all currently associated objects (jeremyevans)
- Add Model.lazy_load_schema=, when set to true, it loads the schema on first instantiation (jeremyevans)
- Add before_validation and after_validation hooks, called whenever the model is validated (jeremyevans)
- Add Model.default_foreign_key, a private class method that allows changing the default foreign key that Sequel will use in associations (jeremyevans)
- Cache negative lookup when eagerly loading many_to_one associations (jeremyevans)
- Make all associations support the :select option, not just many_to_many (jeremyevans)
- Allow the use of blocks when eager loading, and add the :eager_block and :allow_eager association options for configuration (jeremyevans)
- Add the :graph_join_type, :graph_conditions, and :graph_join_table_conditions association options, used when eager graphing (jeremyevans)
- Add AssociationReflection class (subclass of Hash), to make calling a couple of private Model methods unnecessary (jeremyevans)
- Change hook methods so that if a tag/method is specified it overwrites an existing hook block with the same tag/method (jeremyevans)
- Refactor String inflection support, you must use String.inflections instead of Inflector.inflections now (jeremyevans)
- Allow connection to ODBC-MSSQL via a URL (petersumskas) (230)
- Comprehensive update of all documentation, except for the block filters and adapters (jeremyevans)
- Handle Date and DateTime value literalization correctly in adapters (jeremyevans)
- Literalize DateTime values the same as Time values (jeremyevans)
- MySQL tinyints are now returned as boolean values instead of integers (jeremyevans)
- Set additional MySQL charset options required for creating tables and databases (tmm1)
- Remove methods deprecated in 1.5.0 (jeremyevans)
- Add Module#metaattr_accessor for creating attr_accessors for the metaclass (jeremyevans)
- Add SQL string concatenation support to blockless filters, via Array#sql_string_join (jeremyevans)
- Add Pagination#last_page? and Pagination#first_page? (apeiros)
- Add limited column reflection support, tested on PostgreSQL, MySQL, and SQLite (jeremyevans)
- Allow the use of :schema__table___table_alias syntax for tables, similar to the column support (jeremyevans)
- Merge metaid gem into core_ext.rb and clean it up, so sequel now has no external dependencies (jeremyevans)
- Add Dataset#as, so using a dataset as a column with an alias is not deprecated (jeremyevans)
- Add Dataset#invert, which returns a dataset with inverted HAVING and WHERE clauses (jeremyevans)
- Add blockless filter syntax support (jeremyevans)
- Passing an array to Dataset#order and Dataset#select no longer works, you need to pass multiple arguments (jeremyevans)
- You should use ’?’ instead of ’(?)’ when using interpolated strings with array arguments (jeremyevans)
- Dataset.literal now surrounds the literalization of arrays with parentheses (jeremyevans)
- Add echo option (back?) to sequel command line tool, via -E or —echo (jeremyevans)
- Allow databases to have multiple loggers (jeremyevans)
- The sequel command line tool now also accepts a path to a database config YAML file in addition to a URI (mtodd)
- Major update of the postgresql adapter (jdavis, jeremyevans) (225)
- Make returning inside of a database transaction commit the transaction (ahoward, jeremyevans)
- Dataset#to_table_reference is now protected, and it has a different API (jeremyevans)
- 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)
- Aliased and/or qualified columns with embedded spaces can now be specified as symbols (jeremyevans)
- When identifier quoting is enabled, the SQL standard double quote is used by default (jeremyevans)
- When identifier quoting is enabled, quote tables as well as columns (jeremyevans)
- Make identifier quoting optional, enabled by default (jeremyevans)
- Allow Sequel::Database.connect and related methods to take a block that disconnects the database when the block finishes (jeremyevans)
- Add Dataset#unfiltered, for removing filters from dataset (jeremyevans)
- Add add_foreign_key and add_primary_key methods to the AlterTableGenerator (jeremyevans)
- Allow migration files to have more than 3 digits (jeremyevans)
- Add methods directly to Dataset instead of including modules (jeremyevans)
- Make some Dataset instance methods private: invert_order, insert_default_values_sql (jeremyevans)
- Don‘t add methods that depend on ParseTree unless you can load ParseTree (jeremyevans)
- Don‘t wipeout the cached columns every time a dataset is cloned, but only on changes to :select, :sql, :from, or :join (jeremyevans)
- Fix Oracle Adapter (yasushi.abe)
- Fixed sqlite uri so that sqlite:// works just like file:// (2 slashes for a relative path, 3 for an absolute) (dlee)
- Raise a Sequel::Error if an invalid limit or offset is used (jeremyevans)
- Refactor and beef up Dataset#first and Dataset#last, with some change in functionality (jeremyevans)
- Add String#to_datetime, for consistency (jeremyevans)
- Fix Range#interval so that it returns 1 less for an exclusive range
- Change SQLite adapter so it doesn‘t swallow exceptions other than SQLite3::Exception (such as Interrupt) (jeremyevans)
- Change PostgreSQL and MySQL adapters to raise Sequel::Error instead of database specific errors if a database error occurs (jeremyevans)
- Using a memory database with SQLite now defaults to a single connection, so all queries it uses run against the same database (jeremyevans)
- Fix attempting to query MySQL using the same connection being used to concurrently execute another query (jeremyevans)
- Add options to the connection pool to configure reusing connections and converting exceptions (jeremyevans)
- Use the database driver provided string quoting methods for MySQL and SQLite (jeremyevans) (223)
- Add ColumnAll#==, for checking the equality of two ColumnAlls (jeremyevans)
- Allow an array of arrays instead of a hash when specifying conditions (jeremyevans)
- Add Sequel::DBI::Database#lowercase, for lowercasing column names (jamesearl)
- Remove Dataset#extend_with_destroy, which may break code that uses Dataset#set_model directly and expects the destroy method to be added (jeremyevans)
- Fix some issues when running on Ruby 1.9 (Zverok, jeremyevans)
- Make the DBI adapter work (partially) with PostgreSQL (Seb)

### 1.5.1 (2008-04-30)

- Fix Dataset#eager_graph when not all objects have associated objects (jeremyevans)
- 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)

### 1.5.0 (2008-04-29)

- Make the validation errors API compatible with Merb (Inviz)
- Add validates_uniqueness_of, for protecting against duplicate entries in the database (neaf, jeremyevans)
- Alias Model#dataset= to Model#set_dataset (tmm1)
- Make some Model class methods private: def_hook_method, hooks, add_hook, plugin_module, plugin_gem (jeremyevans)
- Add the eager! and eager_graph! mutation methods to model datasets (jeremyevans)
- Remove Model.database_opened (jeremyevans)
- Remove Model.super_dataset (jeremyevans)
- Deprecate .create_with_params, .create_with, set, update, update_with, and new_record from Sequel::Model (jeremyevans)
- Add Model.def_dataset_method, for defining methods on the model that reference methods on the dataset (jeremyevans)
- Deprecate Model.method_missing, add dataset methods to Model via metaprogramming (jeremyevans)
- Remove Model.join, so it is the same as Dataset#join (jeremyevans)
- Use reciprocal associations for all types of associations in the getter/setter/add_/remove_ methods (jeremyevans)
- Fix many_to_one associations to cache negative lookups (jeremyevans)
- Change Model#=== to always be false if the primary key is nil (jeremyevans)
- Add Model#hash, which should be unique for a given class and primary key (or values if primary key is nil) (jeremyevans)
- Add Model#eql? as a alias to Model#== (jeremyevans)
- Make Model#reload clear any cached associations (jeremyevans)
- No longer depend on the assistance gem, merge the Inflector and Validations code (jeremyevans)
- Add Model#set_with_params, which is Model#update_with_params without the save (jeremyevans)
- Fix Model#destroy so that it returns self, not the result of after_destroy (jeremyevans)
- Define Model column accessors in set_dataset, so they should always be avaiable, deprecate Model#method_missing (jeremyevans)
- Add eager loading of associations via new sequel_core object graphing feature (jeremyevans)
- Fix many_to_many associations with classes inside modules without an explicit join table (jeremyevans)
- Allow creation of new records that don‘t have primary keys when the cache is on (jeremyevans) (213)
- Make Model#initialize, Model#set, and Model#update_with_params invulnerable to memory exhaustion (jeremyevans) (210)
- Add Model.str_columns, which gives a list of columns as frozen strings (jeremyevans)
- Remove pretty_table.rb from sequel, since it is in sequel_core (jeremyevans)
- Set a timeout in the Sqlite adapter, default to 5 seconds (hrvoje.marjanovic) (218)
- Document that calling Sequel::ODBC::Database#execute manually requires you to manually drop the returned object (jeremyevans) (217)
- Paginating an already paginated/limited dataset now raises an error (jeremyevans)
- Add support for PostgreSQL partial indexes (dlee)
- Added support for arbitrary index types (including spatial indexes) (dlee)
- Quote column names in SQL generated for SQLite (tmm1)
- Deprecate Object#rollback! (jeremyevans)
- Make some Dataset methods private (qualified_column_name, column_list, table_ref, source_list) (jeremyevans)
- Deprecate Dataset methods set_options, set_row_proc, remove_row_proc, and clone_merge (jeremyevans)
- Add Symbol#*, a replacement for Symbol#all (jeremyevans)
- Deprecate including ColumnMethods in Object, include it in Symbol, String, and Sequel::SQL::Expression (jeremyevans)
- Deprecate Symbol#method_missing, and AS, DESC, ASC, ALL, and all from ColumnMethods (jeremyevans)
- Fix table joining in MySQL (jeremyevans)
- Deprecate Sequel.method_missing and Object#Sequel, add real Sequel.adapter methods (jeremyevans)
- Move dataset methods applicable only to paginated datasets into Sequel::Dataset::Pagination (jeremyevans)
- Make Sequel::Dataset::Sequelizer methods private (jeremyevans)
- Deprecate Dataset#method_missing, add real mutation methods (e.g. filter!) (jeremyevans)
- Fix connecting to an MSSQL server via ODBC using domain user credentials (jeremyevans) (216)
- No longer depend on the assistance gem, merge in the ConnectionPool and .blank methods (jeremyevans)
- No longer depend on ParseTree, RubyInline, or ruby2ruby, but you still need them if you want to use the block filters (jeremyevans)
- Fix JDBC adapter by issuing index things start at 1 (pdamer)
- Fix connecting to a database via the ADO adapter (now requires options instead of URI) (timuckun, jeremyevans) (204)
- Support storing microseconds in postgres timestamp fields (schnarch…@rootimage.msu.edu) (215)
- Allow joining of multiple datasets, by making the table alias different for each dataset joined (jeremyevans)
- SECURITY: Fix backslash escaping of strings (dlee)
- Add ability to create a graph of objects from a query, with the result split into corresponding tables (jeremyevans) (113)
- Add attr_accessor for dataset row_proc (jeremyevans)
- Don‘t redefine Dataset#each when adding a transform or row_proc (jeremyevans)
- Remove array_keys.rb from sequel_core, it was partially broken (since the arrays came from hashes), and redefined Dataset#each (jeremyevans)
- Fix MySQL default values insert (matt.binary) (196)
- Fix ODBC adapter improperly escaping date and timestamp values (leo.borisenko) (165)
- Fix renaming columns on MySQL with type :varchar (jeremyevans) (206)
- Add Sequel::SQL::Function#==, for comparing SQL Functions (jeremyevans) (209)
- Update Informix adapter to work with Ruby/Informix 0.7.0 (gerardo.santana@gmail.com)
- Remove sequel_core‘s knowledge of Sequel::Model (jeremyevans)
- Use "\n" instead of $/ (since $/ can be redefined in ways we do not want) (jeremyevans)

### 1.4.0 (2008-04-08)

- Don‘t mark a column as changed unless the new value is different from the current value (tamas.denes, jeremyevans) (203).
- Switch gem name from "sequel_model" to just "sequel", which required large version bump (jeremyevans).
- Add :select option to many_to_many associations, default to selecting only the associated model table and not the join table (jeremyevans) (208).
- Add :reciprocal one_to_many association option, for setting corresponding many_to_one instance variable (jeremyevans).
- Add eager loading implementation (jeremyevans).
- Change *_to_many associations so that the all associations are considered :cache=>true (jeremyevans).
- Fix associations with block arguments and :cache=>true (jeremyevans).
- Merge 3 mysql patches from the bugtracker (mvyver) (200, 201, 202).
- Merge 2 postgresql patches from the bugtracker (a…@mellowtone.co.jp) (211, 212).
- Allow overriding of default posgres spec database via ENV[‘SEQUEL_PG_SPEC_DB’] (jeremyevans).
- Allow using the Sequel::Model as the first argument in a dataset join selection (jeremyevans) (170).
- Add simple callback mechanism to make model eager loading implementation easier (jeremyevans).
- Added Sequel::Error::InvalidOperation class for invalid operations (198).
- Implemented MySQL::Database#server_version (199).
- Added spec configuration for MySQL socket file.
- Fixed transform with array tuples in postgres adapter.
- Changed spec configuration to Database objects instead of URIs in order to support custom options for spec databases.
- Renamed schema files.
- Fixed Dataset#from to work correctly with SQL functions (193).

### 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.

### 1.3 (2008-03-08)

- Added configuration file for running specs (186).
- Changed Database#drop_index to accept fixed arity (173).
- Changed column definition sql to put UNSIGNED constraint before unique in order to satisfy MySQL (171).
- Enhanced MySQL adapter to support load data local infile_, added compress option for mysql connection by default (172).
- Fixed bug when inserting hashes in array tuples mode.
- Changed SQLite adapter to catch RuntimeError raised when executing a statement and raise an Error::InvalidStatement with the offending SQL and error message (188).
- Added Error::InvalidStatement class.
- Fixed Dataset#reverse to not raise for unordered dataset (189).
- Added Dataset#unordered method and changed order to remove order if nil is specified (190).
- Fixed reversing order of ASC expression (164).
- Added support for :null => true option when defining table columns (192).
- Fixed Symbol#method_missing to accept variable arity (185).

### 1.2.1 (2008-02-29)

- Added add_constraint and drop_constraint functionality to Database#alter_table (182).
- Enhanced Dataset#multi_insert to accept datasets (179).
- Added MySQL::Database#use method for switching database (180).
- Enhanced Database.uri_to_options to accept uri strings (178).
- Added Dataset#columns! method that always makes a roundtrip to the DB (177).
- Added new Dataset#each_page method that iterates over all pages in the result set (175).
- Added Dataset#reverse alias to Dataset#reverse_order (174).
- Fixed Dataset#transform_load and transform_save to create a trasnformed copy of the supplied hash instead of transforming it in place (184).
- Implemented MySQL::Dataset#replace (163).

### 1.2 (2008-02-15)

- Added support for :varchar[100] like type declarations in create_table.
- Fixed rename_column in mysql adapter to support types like varchar(255) (159).
- Added support for order and limit in DELETE statement in MySQL adapter (160).
- Added checks to Dataset#multi_insert to prevent work if no values are given (162).
- Override ruby2ruby implementation of Proc#to_sexp which leaks memory (161).
- Added log option, help for sequel script (157).

### 1.1 (2008-02-15)

- Fixed Dataset#join_table to support joining of datasets (156).
- Changed Dataset#empty? to use EXISTS condition instead of counting records, for much better performance (158).
- Implemented insertion of multiple records in a single statement for postgres adapter. This feature is available only in postgres 8.2 and newer.
- Implemented Postgres::Database#server_version.
- Implemented Database#get, short for dataset.get(...).
- 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).
- Implemented Dataset#get, a replacement for select(column).first[column].
- Implemented Dataset#grep method, poor man‘s text search.

### 1.0.10 (2008-02-13)

- Fixed Datset#group_and_count to work inside a query block (152).
- Changed datasets with transforms to automatically transform hash filters (155).
- Changed Marshal stock transform to use Base64 encoding with backward-compatibility to support existing marshaled values (154).
- Added support for inserting multiple records in a single statement using multi_insert in MySQL adapter (153).
- Added support for :slice option (same as :commit_every) in Dataset#multi_insert.
- Changed Dataset#all to accept opts and iteration block.

### 1.0.9 (2008-02-10)

- Implemented Dataset#inspect and Database#inspect (151).
- Added full-text searching for odbc_mssql adapter (thanks Joseph Love).
- Added AlterTableGenerator#add_full_text_index method.
- Implemented full_text indexing and searching for PostgreSQL adapter (thanks David Lee).
- Implemented full_text indexing and searching for MySQL adapter (thanks David Lee).
- Fixed Dataset#insert_sql to work with array subscript references (thanks Jim Morris).

### 1.0.8 (2008-02-08)

- Added support for multiple choices in string matching expressions (147).
- Renamed Dataset#clone_merge to Dataset#clone, works with or without options for merging (148).
- Fixed MySQL::Database#<< method to always free the result in order to allow multiple calls in a row (149). Same also for PostgreSQL adapter.

### 1.0.7 (2008-02-05)

- Added support for conditional filters (using if else statements) inside block filters (thanks Kee).

### 1.0.6 (2008-02-05)

- Removed code pollution introduced in revs 814, 817 (really bad patch, IMO).
- Fixed joining datasets using aliased tables (140).
- Added support additional field types in postgresql adapter (146).
- Added support for date field types in postgresql adapter (145).
- Fixed Dataset#count to work correctly for grouped datasets (144).
- Added Dataset#select_more, Dataset#order_more methods (129).

### 1.0.5 (2008-01-25)

- Added support for instantiating models by using the load constructor method.

### 1.0.4.1 (2008-01-24)

- Fixed bin/sequel to require sequel_model if available.

### 1.0.4 (2008-01-24)

- Added Dataset#select_all method.
- Changed ODBC::Database to support connection using driver and database name, also added support for untitled columns in ODBC::Dataset (thanks Leonid Borisenko).
- Fixed MySQL adapter to correctly format foreign key definitions (123).
- Changed MySQL::Dataset to allow HAVING clause on ungrouped datasets, and put HAVING clause before ORDER BY clause (133).
- Changed Dataset#group_and_count to accept multiple columns (134).
- Fixed database spec to open YAML file in binary mode (131).
- Cleaned up gem spec (132).
- Added Dataset#table_exists? convenience method.

### 1.0.3 (2008-01-17)

- Added support for UNSIGNED constraint, used in MySQL? (127).
- Implemented constraint definitions inside Database#create_table.
- Fixed postgres adapter to define PGconn#async_exec as alias to exec if not defined (for pure-ruby postgres driver).
- Added String#to_date. Updated mysql adapter to use String#to_date for mysql date types (thanks drfreeze).

### 1.0.2 (2008-01-14)

- Removed ConnectionPool, NumericExtensions. Added dependency on assistance.

### 1.0.1 (2008-01-12)

- Changed postgres adapter to quote column references using double quotes.
- Applied patch for oracle adapter: fix behavior of limit and offset, transactions, table_exists?, tables and additional specs (thanks Liming Lian 122).
- Allow for additional filters on a grouped dataset (119 and 120)
- Changed mysql adapter to default to localhost if :host option is not specified (114).
- Refactored Sequelizer to use Proc#to_sexp (method provided by r2r).
- 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.

### 1.0.0.1 (2008-01-03)

- Changed MySQL adapter to support specifying socket option.
- Added support for limiting and paginating datasets with fixed SQL, gotten with DB#fetch (thanks Ruy Diaz).
- Added new Dataset#from_self method that returns a dataset selecting from the original dataset.

### 1.0 (2008-01-02)

- Removed deprecated adapter stubs.
- Removed Sequel::Model() stub.
- Changed name to sequel_core.
- 100% code coverage.
- Fixed error behavior when sequel_model is not available.
- Fixed error behavior when parse_tree or ruby2ruby are not available.

### 0.5.0.2 (2008-01-01)

- Fixed String#to_time to raise error correctly for invalid time stamps.
- Improved code coverage - now at 99.2%.

### 0.5.0.1 (2007-12-31)

- Added a stub for Sequel::Model that auto-loads sequel_model.
- Changed Sequel.method_missing and Database.adapter_class to raise AdapterNotFound if an adapter could not be loaded.
- Fixed behavior of error trap in sequel command line tool.

### 0.5 (2007-12-30)

- Removed model code into separate sub-project. Rearranged trunk into core, model and model_plugins.

### 0.4.5 (2007-12-25)

- Added rdoc for new alter_table functionality (109).
- Fixed update_sql with array sub-item keys (110).
- Refactored model specs.
- Added Model#update as alias to set.
- Refactored validations code. Renamed Model.validations? into Model.has_validations?.
- Added initial Model validations (Thanks Lance Carlson)
- Added Database#set_column_default method (thanks Jim Morris.)
- Removed warning on uninitialized @transform value (thanks Jim Morris).

### 0.4.4.2 (2007-12-20)

- Fixed parsing errors in Ruby 1.9.
- Fixed sync problem in connection_pool_spec.
- Changed String#to_time to raise Error::InvalidValue if Time.parse fails.
- Refactored sequel error classes.

### 0.4.4.1 (2007-12-19)

- Fixed schema generation code to use field quoting and support adapter-specific literalization of default values (108).

### 0.4.4 (2007-12-17)

- Implemented Database#rename_table (104).
- Fixed drop_index in mysql adapter (103).
- Added ALTER TABLE specs for postgres, sqlite and mysql adapters. Added custom alter_table behavior for sqlite and mysql adapters (101, 102).
- Added direct Database API for altering tables.
- Added Database#alter_table method with support for adding, dropping, renaming, modifying columns and adding and droppping indexes.
- Added unique schema method for defining unique indexes (thanks Dado).
- Implemented unfolding of each calls inside sequelizer blocks (thanks Jim Morris).

### 0.4.3 (2007-12-15)

- Fixed Dataset#update to accept strings (98).
- Fixed Model.[] to raise for boolean argument (97).
- Added Database#add_index method (thanks coda.hale).
- Added error reporting for filtering on comparison not in a block (thanks Jim Morris).
- Added support for inline index definition (thanks Dado).
- Added Database#create_table! method for forcibly creating a table (thanks Dado).
- Added support for using Dataset#update with block.
- Changed subscript access to use | operator.
- Fixed subscript access in sequelizer.
- Added support for subscript access using Symbol#/ operator.

### 0.4.2.2 (2007-12-10)

- Improved code coverage.
- Fixed Dataset#count to work properly with datasets with fixed SQL (when using fetch).
- Added Model.create_with_params method that filters the given parameters accordring to the model‘s columns (thanks Aman Gupta).

### 0.4.2.1 (2007-12-09)

- Refactored and fixed Dataset#reverse_order to work with field quoting (thanks Christian).
- Fixed problem with field quoting in insert statements.
- Changed sequelizer code to silently fail on any error when requiring parsetree and ruby2ruby.
- Added Database#create_view, create_or_replace_view and drop_view methods. Also implemented Dataset#create_view and create_or_replace_view convenience methods.
- Keep DRY by re-using Model#[]= from method_missing.
- Added Model.fetch alias for DB.fetch.set_model(Model)

### 0.4.2 (2007-12-07)

- Implemented Model#save_changes.
- Extended Model#save to accept specific columns to update.
- Implemented experimental JDBC adapter.
- Added adapter skeleton as starting point for new adapters.
- Cleaned-up adapters and moved automatic requiring of ‘sequel’ to adapter stubs.

### 0.4.1.3 (2007-12-05)

- Better plugin conventions.
- Added experimental OpenBase adapter.
- 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).

### 0.4.1.2 (2007-12-04)

- Added release rake task (using RubyForge).
- Changed Model.is to accept variable arity.
- Implemented plugin loading for model classes.
- Fixed odbc-mssql and odbc adapters (thanks Dusty.)
- Implemented odbc-mssql adapter (thanks Dusty.)

### 0.4.1.1 (2007-11-27)

- Fixed first and last functionality in Informix::Dataset (thanks Gerardo Santana).

### 0.4.1 (2007-11-25)

- 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).

### 0.4.0 (2007-11-24)

- Reorganized lib directory structure.
- Added support for dbi-xxx URI schemes (86).
- Fixed problem in Database#uri where setting the password would raise an error (87).
- Improved Dataset#insert_sql to correctly handle string keys (92).
- Improved error-handling for worker threads. Errors are saved to an array and are accessible through errors (91).
- Dataset#uniq/distinct can now accept a column list for DISTINCT ON clauses.
- Fixed Model.all.
- Fixed literalization of strings with escape sequences in postgres adapter (90).
- Added support for literalizing BigDecimal values (89).
- Fixed column qualification for joined datasets (thanks Christian).
- Implemented experimental informix adapter.

### 0.3.4.1 (2007-11-10)

- Changed Dataset#select_sql to support queries without a FROM clause.

### 0.3.4 (2007-11-10)

- Fixed MySQL adapter to allow calling stored procedures (thanks Sebastian).
- Changed Dataset#each to always return self.
- Fixed SQL functions without arguments in block filters.
- Implemented super-cool Symbol#cast_as method.
- Fixed error message in command-line tool if failed to load adapter (85).
- Refactored code relating to column references for better extendibility (88).
- Tiny fix to Model#run_hooks.

### 0.3.3 (2007-11-04)

- Revised code to generate SQL statements without trailing semicolons.
- Added Sequel::Worker implementation of a simple worker thread for asynchronous execution.
- Added spec for Oracle adapter.
- Fixed Oracle adapter to format INSERT statements without semicolons (thanks Liming Lian).
- Renamed alias to Array#keys as Array#columns instead of Array#fields.
- Renamed FieldCompositionMethods as ColumnCompositionMethods.
- Implemented Sequel::NumericExtensions to provide stuff like 30.days.ago.

### 0.3.2 (2007-11-01)

- Added to_column_name as alias to to_field_name, column_title as alias to field_title.
- Added Dataset#interval method for getting interval between minimum/maximum values for a column.
- Fixed Oracle::Database#execute (84).
- Added group_and_count as general implementation for count_by_xxx.
- Added count_by magic method.
- Added Dataset#range method for getting the minimum/maximum values for a column.
- Fixed timestamp translation in SQLite adapter (83).
- Experimental DB2 adapter.
- Added Dataset#set as alias to Dataset#update.
- Removed long deprecated expressions.rb code.
- Better documentation.
- Implemented Dataset magic methods: order_by_xxx, group_by_xxx, filter_by_xxx, all_by_xxx, first_by_xxx, last_by_xxx.
- Changed Model.create and Model.new to accept a block.

### 0.3.1 (2007-10-30)

- Typo fixes (79).
- Added require ‘yaml’ to dataset.rb (78).
- Changed postgres adapter to use the ruby-postgres library‘s type conversion if available (76).
- Fixed string literalization in mysql adapter for strings with comment backslashes in them (75).
- Fixed ParseTree dependency to work with version 2.0.0 and later (74).
- foreign_key definitions now accept :key option for specifying the remote key (73).
- Fixed Model#method_missing to not raise error for columns not in the table but for which a value exists (77).
- New documentation for Model.
- Implemented Oracle adapter based on ruby-oci8 library.
- Implemented Model#pk_hash. Is it really necessary?
- Deprecated Model#pkey. Implemented better Model#pk method.
- Specs and docs for Model.one_to_one, Model.one_to_many macros.

### 0.3.0.1 (2007-10-20)

- Changed Database#fetch to return a modified dataset.

### 0.3 (2007-10-20)

- Added stock transforms to Dataset#transform. Refactored Model.serialize.
- Added Database#logger= method for setting the database logger object.
- Fixed Model.[] to act as shortcut to Model.find when a hash is given (71).
- Added support for old and new decimal types in MySQL adapter, and updated MYSQL_TYPES with MySQL 5.0 constants (72).
- Implemented Database#disconnect method for all adapters.
- Fixed small bug in ArrayKeys module.
- Implemented model caching by primary key.
- Separated Model.find and Model.[] functionality. Model.find takes a filter. Model.[] is strictly for finding by primary keys.
- Enhanced Dataset#first to accept a filter block. Model#find can also now accept a filter block.
- Changed Database#[] to act as shortcut to fetch if a string is given.
- Renamed Database#each to fetch. If no block is given, the method returns an enumerator.
- Changed Dataset#join methods to correctly literalize values in join conditions (70).
- Fixed filter with ranges to correctly literalize field names (69).
- Implemented Database#each method for quickly retrieving records with arbitrary SQL (thanks Aman Gupta).
- Fixed bug in postgres adapter where a LiteralString would be literalized as a regular String.
- Fixed SQLite insert with subquery (68).
- Reverted back to hashes as default mode. Added Sequel.use_array_tuples and Sequel.use_hash_tuples methods.
- Fixed problem with arrays with keys when using delete.
- Implemented ArrayKeys as substitute for ArrayFields.
- Added Dataset#each_hash method.
- Rewrote SQLite::Database#transaction to use sqlite3-ruby library implementation of transactions.
- Fixed Model.destroy_all to work correctly in cases where no before_destroy hook is defined and an after_destroy hook is defined.
- Restored Model.has_hooks? implementation.
- Changed Database#<< to strip comments and whitespace only when an array is given.
- Changed Schema::Generator#primary_key to accept calls with the type argument omitted.
- Hooks can now be prepended or appended by choice.
- Changed Model.subset to define filter method on the underlying dataset instead of the model class.
- Fixed Dataset#transform to work with array fields.
- Added Dataset#to_csv method.
- PrettyTable can now extract column names from arrayfields.
- Converted ado, dbi, odbc adapters to use arrayfields instead of hashes.
- Fixed composite key support.
- Fixed Dataset#insert_sql, update_sql to support array fields.
- Converted sqlite, mysql, postgres adapters to use arrayfields instead of hashes.
- Extended Dataset#from to auto alias sub-queries.
- Extended Dataset#from to accept hash for aliasing tables.
- Added before_update, after_update hooks.

### 0.2.1.1 (2007-10-07)

- Added Date literalization to sqlite adapter (60).
- Changed Model.serialize to allow calling it after the class is defined (59).
- Fixed after_create hooks to allow calling save inside the hook (58).
- Fixed MySQL quoting of sql functions (57).
- Implemented rollback! global method for cancelling transactions in progress.
- Fixed =~ operator in Sequelizer.
- Fixed ODBC::Dataset#fetch_rows (thanks Dusty).
- Renamed Model.recreate_table to create_table!. recreate_table is deprecated and will issue a warning (56).

### 0.2.1 (2007-09-24)

- Added default implementation of Model.primary_key_hash.
- Fixed Sequel::Model() to set dataset for inherited classes.
- Rewrote Model.serialize to use Dataset#transform.
- Implemented Dataset#transform.
- Added gem spec for Windows (without ParseTree dependency).
- Added support for dynamic strings in Sequelizer (49).
- Query branch merged into trunk.
- Implemented self-changing methods.
- Add support for ternary operator to Sequelizer.
- Fixed sequelizer to evaluate expressions if they don‘t involve symbols or literal strings.
- Added protection against using each, delete, insert, update inside query blocks.
- Improved Model#method_missing to deal with invalid attributes.
- Implemented Dataset#query.
- Added Dataset#group_by as alias for Dataset#group.
- Added Dataset#order_by as alias for Dataset#order.
- More model refactoring. Added support for composite keys.
- Added Dataset#empty? method (46).
- Fixed Symbol#to_field_name to support names with numbers and upper-case characters (45).
- Added install_no_doc rake task.
- Partial refactoring of model code.
- Refactored dataset-model association and added Dataset#set_row_filter method.
- Added support for case-sensitive regexps to mysql adapter.
- Changed mysql adapter to support encoding option as well.
- Added charset/encoding option to postgres adapter.
- Implemented Model.serialize (thanks Aman Gupta.)
- Changed Model.create to INSERT DEFAULT VALUES instead of (id) VALUES (null) (brings back 41.)
- Fixed Model.new to work without arguments.
- Added Model.no_primary_key method to allow models without primary keys.
- Added Model#this method (42 thanks Duane Johnson).
- Fixed Dataset#insert_sql to use DEFAULT VALUES clause if argument is an empty hash.
- Fixed Model.create to work correctly when no argument is passed (41).

### 0.2.0.2 (2007-09-07)

- Dataset#insert can now accept subqueries.
- Changed Migrator.apply to return the version.
- Changed Sequel::Model() to cache intermediate classes so descendant classes can be reopened (39).
- Added :charset option to MySQL adapter (40).
- Fixed Dataset#exclude to add parens around NOT expression (38).
- Fixed use of sub-queries with all comparison operators in block filters (38).
- Fixed arithmetic expressions in block filters to not be literalized.
- Changed Symbol#method_missing to return LiteralString.
- Changed PrettyTable to right-align numbers.
- Fixed Model.create_table (thanks Duane Johnson.)

### 0.2.0.1 (2007-09-04)

- Improved support for invoking methods with inline procs inside block filters.

### 0.2.0 (2007-09-02)

- Fixed Model.drop_table (thanks Duane Johnson.)
- Dataset#each can now return rows for arbitrary SQL by specifying :sql option.
- Added spec for postgres adapter.
- Fixed Model.method_missing to work with new SQL generation.
- Fixed compare_expr to support regexps.
- Fixed postgres, mysql adapters to support regexps.
- More specs for block filters. Updated README.
- Added support for globals and $X macros in block filters.
- Fixed Sequelizer to not fail if ParseTree or Ruby2Ruby gems are missing.
- Renamed String#expr into String#lit (expr should be deprecated in future versions).
- Renamed Sequel::ExpressionString into LiteralString.
- Fixed Symbol#[] to return an ExpressionString, so as not to be literalized.
- Renamed Dataset::Expressions to Dataset::Sequelizer.
- Renamed Expressions#format_re_expression to match_expr.
- Renamed Expressions#format_eq_expression to compare_expr.
- Added support for Regexp in MySQL adapter.
- Refactored Regexp expressions into a separate format_re_expression method.
- Added support for arithmetic in proc filters.
- Added support for nested proc expressions, more specs.
- Added support for SQL function using symbols, e.g. :sum[:x].
- Fixed deadlock bug in ConnectionPool.
- Removed deprecated old expressions.rb.
- Rewrote Proc filter feature using ParseTree.
- Added support for additional functions on columns using Symbol#method_missing.
- Added support for supplying filter block to DB#[] method, to allow stuff like DB[:nodes] {:path =~ /^icex1/}.

### 0.1.9.12 (2007-08-26)

- Added spec for PrettyTable.
- Added specs for Schema::Generator and Model (36 thanks technoweenie).
- Fixed Sequel::Model.set_schema (36 thanks technoweenie.)
- Added support for no options on Schema::Generator#foreign_key (36 thanks technoweenie.)
- Implemented (restored?) Schema::Generator#primary_key_name (36 thanks technoweenie.)
- Better spec code coverage.

### 0.1.9.11 (2007-08-24)

- Changed Dataset#set_model to allow supplying additional arguments to the model‘s initialize method (35). Thanks Sunny Hirai.

### 0.1.9.10 (2007-08-22)

- Changed schema generation code to generate separate statements for CREATE TABLE and each CREATE INDEX (34).
- Refactored Dataset::SQL#field_name for better support of different field quoting standards by specific adapters.
- Added current_page_record_count for paginated datasets.
- Removed Database#literal and included Dataset::SQL instead.
- 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’.
- Moved SingleThreadedPool to lib/sequel/connection_pool.rb.
- Changed SQLite::Dataset to return affected rows for delete and update (33).
- 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.

### 0.1.9.9 (2007-08-18)

- New ADO adapter by cdcarter (31).
- Added automatic column aliasing to avg, sum, min and max (30).
- Fixed broken Sequel::DBI::Dataset#fetch_rows (29 thanks cdcarter.)

### 0.1.9.8 (2007-08-15)

- Fixed DBI adapter.

### 0.1.9.7 (2007-08-15)

- Added support for executing batch statements in sqlite adapter.
- Changed current_page_record_range to return 0..0 for an invalid page.
- Fixed joining of aliased tables.
- Improved Symbol#to_field_name to prevent false positives.
- Implemented Dataset#multi_insert with :commit_every option.
- More docs for Dataset#set_model.
- Implemented automatic creation of convenience methods for each adapter (e.g. Sequel.sqlite etc.)

### 0.1.9.6 (2007-08-13)

- Refactored schema definition code. Gets rid of famous primary_key problem as well as other issues (e.g. issue 22).
- Added pagination_record_count, page_range and current_page_record_range for paginated datasets.
- Changed MySQL adapter to automatically reconnect (issue 26).
- Changed Sequel() to accept variable arity.
- Added :elements option to column definition, in order to support ENUM and SET types.

### 0.1.9.5 (2007-08-12)

- Fixed migration docs.
- Removed dependency on PGconn in Schema class.

### 0.1.9.4 (2007-08-11)

- Added Sequel.dbi convenience method for using DBI connection strings to open DBI databases.

### 0.1.9.3 (2007-08-10)

- Added support for specifying field size in schema definitions (thanks Florian Aßmann.)
- Added migration code based on work by Florian Aßmann.
- Reintroduced metaid dependency. No need to keep a local copy of it.

### 0.1.9.2 (2007-07-24)

- Removed metaid dependency. Re-factored requires in lib/sequel.rb.

### 0.1.9.1 (2007-07-22)

- Improved robustness of MySQL::Dataset#field_name.
- Added Sequel.single_threaded= convenience method.

### 0.1.9 (2007-07-21)

- Fixed update_sql and insert_sql to support field quoting by calling field_name.
- Implemented automatic data type conversion in mysql adapter.
- Added support for boolean literals in mysql adapter.
- Added support for ORDER and LIMIT clauses in UPDATE statements in mysql adapter.
- Implemented correct field quoting (using back-ticks) in mysql adapter.
- Wrote basic MySQL spec.
- Fixd MySQL::Dataset to return correct data types with symbols as hash keys.
- Removed discunctional MySQL::Database#transaction.
- Added support for single threaded operation.
- Fixed bug in Dataset#format_eq_expression where Range objects would not be literalized correctly.
- Added parens around postgres LIKE expressions using regexps.

### 0.1.8 (2007-07-10)

- Implemented Dataset#columns for retrieving the columns in the result set.
- Updated Model with changes to how model-associated datasets work.
- Beefed-up specs. Coverage is now at 95.0%.
- Added support for polymorphic datasets.
- The adapter dataset interface was simplified and standardized. Only four methods need be overriden: fetch_rows, update, insert and delete.
- The Dataset class was refactored. The bulk of the dataset code was moved into separate modules.
- Renamed Dataset#hash_column to Dataset#to_hash.
- Added some common pragmas to sqlite adapter.
- Added Postgres::Dataset#analyze for EXPLAIN ANALYZE queries.
- Fixed broken Postgres::Dataset#explain.

### 0.1.7

- Removed db.synchronize wrapping calls in sqlite adapter.
- Implemented Model.join method to restrict returned columns to the model table (thanks Pedro Gutierrez).
- Implemented Dataset#paginate method.
- Fixed after_destroy hook.
- Improved Dataset#first and last to accept a filter hash.
- Added Dataset#[]= method.
- Added Sequel() convenience method.
- Fixed Dataset#first to include a LIMIT clause for a single record.
- 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).
- Fixed Symbol#DESC to support qualified notation (thanks Pedro Gutierrez).

### 0.1.6

- Fixed Model#method_missing to raise for an invalid attribute.
- Fixed PrettyTable to print model objects (thanks snok.)
- Fixed ODBC timestamp conversion to return DateTime rather than Time object (thanks snok.)
- Fixed Model.method_missing (thanks snok.)
- Model.method_missing now creates stubs for calling Model.dataset methods. Methods like Model.each etc are removed.
- Changed default join type to INNER JOIN (thanks snok.)
- Added support for literal expressions, e.g. DB[:items].filter(:col1 => ‘col2 - 10’.expr).
- Added Dataset#and.
- SQLite adapter opens a memory DB if no database is specified, e.g. Sequel.open ‘sqlite:/’.
- Added Dataset#or, pretty nifty.

### 0.1.5

- Fixed Dataset#join to support multiple joins. Added left_outer_join, right_outer_join, full_outer_join, inner_join methods.

### 0.1.4

- Added String#split_sql.
- 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.
- Improved Schema generator to support data types as method names: DB.create_table :test do

        integer :abc
        text :def
        ...

  end

- Implemented ODBC adapter.

### 0.1.3

- Implemented DBI adapter.
- Refactored database connection code. Now handled through Database#connect.

### 0.1.2

- The first opened database is automatically assigned to to Model.db.
- Removed SequelConnectionError. Exception class errors are converted to RuntimeError.
- Added support for UNION, INTERSECT and EXCEPT set operations.
- Fixed Dataset#single_record to return nil if no record is found.
- Updated specs to conform to RSpec 1.0.
- Added Model#find_or_create method.
- Fixed MySQL::Dataset#query_single (thanks Dries Harnie.)
- Added Model.subset method. Fixed Model.filter and Model.exclude to accept blocks.
- Added Database#uri method.
- Refactored and removed deprecated code in postgres adapter.

### 0.1.1

- More documentation for Dataset.
- Added Dataset#size as alias to Dataset#count.
- Changed Database#<< to call execute (instead of being an alias). Thus it will work for descendants as well.
- Fixed Sequel.open to accept variable arity.
- Refactored Model#refresh, Model.create. Removed Model#reload.
- Refactored Model hooks.
- Cleaned up Dataset API.

### 0.1.0

- Changed Database#create_table to only accept a block. Nobody‘s gonna use the other way.
- Removed Dataset#[]= method. Too confusing and not really useful.
- Fixed ConnectionPool#hold to wrap exceptions only once.
- Dataset#where_list Renamed Dataset#expression_list.
- Added support for qualified fields in Proc expressions (e.g. filter {items.id == 1}.)
- Added like? and in? Proc expression operators.
- Added require ‘date’ in dataset.rb. Is this a 1.8.5 thing?
- Refactored Dataset to use literal strings instead of format strings (slight performance improvement and better readability.)
- Added support for literalizing Date objects.
- Refactored literalization of Time objects.

### 0.0.20

- Refactored Dataset where clause construction to use expressions.
- Implemented Proc expressions (adapted from a great idea by Sam Smoot.)
- Fixed Model#map.
- Documentation for ConnectionPool.
- Specs for Database.

### 0.0.19

- More specs for Dataset.
- Fixed Dataset#invert_order to work correctly with strings.
- Fixed Model#== to check equality of values.
- Added Model#exclude and Model#order.
- Fixed Dataset#order and Dataset#group to behave correctly when supplied with qualified field name symbols.
- Removed Database#literal. Shouldn‘t have been there.
- Added SQLite::Dataset#explain. Returns an array of opcode hashes.
- Specs for ConnectionPool.

### 0.0.18

- Implemented SequelError and SequelConnectionError classes. ConnectionPool#hold now catches any connection errors and reraises them SequelConnectionError.
- Removed duplication in Database#[].
- :from and :select options are now always arrays (patch by Alex Bradbury.)
- Fixed Dataset#exclude to work correctly (patch and specs by Alex Bradbury.)

### 0.0.17

- Fixed Postgres::Database#tables to return table names as symbols (caused problem when using Database#table_exists?).
- Fixed Dataset#from to have variable arity, like Dataset#select and Dataset#where (patch by Alex Bradbury.)
- Added support for GROUP BY and HAVING clauses (patches by Alex Bradbury.) Refactored Dataset#filter.
- More specs.
- Refactored Dataset#where for better composability.
- Added Dataset#[]= method.
- Added support for DISTINCT and OFFSET clauses (patches by Alex Bradbury.) Dataset#limit now accepts ranges. Added Dataset#uniq and distinct methods.

### 0.0.16

- More documentation.
- Added support for subqueries in Dataset#literal.
- Added support for Model.all_by_XXX methods through Model.method_missing.
- Added basic SQL logging to Database.
- Added Enumerable#send_each convenience method.
- Changed Dataset#destroy to return the number of deleted records.

### 0.0.15

- Improved Dataset#insert_sql to allow arrays as well as hashes.
- Database#drop_table now accepts a list of table names.
- Added Model#id to to return the id column.

### 0.0.14

- Fixed Model‘s attribute accessors (hopefully for the last time).
- Changed Model.db and Model.db= to allow different databases for different model classes.
- Fixed bug in aggregate methods (max, min, etc) for datasets using record classes.

### 0.0.13

- Fixed Model#method_missing to do both find, filter and attribute accessors. duh.
- Fixed bug in Dataset#literal when quoting arrays of strings (thanks Douglas Koszerek.)

### 0.0.12

- Model#save now correctly performs an INSERT for new objects.
- Added Model#reload for reloading an object from the database.
- Added Dataset#naked method for getting a version of a dataset that fetches records as hashes.
- Implemented attribute accessors for column values ala ActiveRecord models.
- Fixed filtering using nil values (e.g. dataset.filter(:parent_id => nil)).

### 0.0.11

- Renamed Model.schema to Model.set_schema and Model.get_schema to Model.schema.
- Improved Model class to allow descendants of model clases (thanks Pedro Gutierrez.)
- Removed require ‘postgres’ in schema.rb (thanks Douglas Koszerek.)

### 0.0.10

- Added some examples.
- Added Dataset#print method for pretty-printing tables.

### 0.0.9

- Fixed Postgres::Database#tables and locks methods.
- Added PGconn#last_insert_id method that should support all 7.x and 8.x versions of Postgresql.
- Added Dataset#exists method for EXISTS where clauses.
- Changed behavior of Dataset#literal to regard symbols as field names.
- Refactored and DRY‘d Dataset#literal and overrides therof. Added support for subqueries in where clause.

### 0.0.8

- 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.
- Fixed literal representation of literals in SQLite adapter (thanks Christian Neukirchen!)
- Refactored insert code in Postgres adapter (in preparation for fetching the last insert id for pre-8.1 versions).

### 0.0.7

- Fixed bug in Model.schema, duh!

### 0.0.6

- Added Dataset#sql as alias to Dataset#select_sql.
- Dataset#where and Dataset#exclude can now be used for refining dataset conditions, enabling stuff like posts.where(:title => ‘abcdef’).exclude(:user_id => 3).
- Implemented Dataset#exclude method.
- 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.
- Changed Sequel::Database#table_exists? to rely on the tables method if it is available.
- Implemented SQLite::Database#tables.

### 0.0.5

- Added Dataset#[] method. Refactored Model#find and Model#[].
- Renamed Pool#conn_maker to Pool#connection_proc.
- Added automatic require ‘sequel’ to all adapters for convenience.

### 0.0.4

- Added preliminary MySQL support.
- Code cleanup.

### 0.0.3

- Add Dataset#sum method.
- Added support for exclusive ranges (thanks Christian Neukirchen.)
- Added sequel console for quick‘n‘dirty access to databases.
- Fixed small bug in Dataset#qualified_field_name for better join support.

### 0.0.2

- Added Sequel.open as alias to Sequel.connect.
- 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’]).
- Added Model#[]= method for changing column values and Model#save

method for saving them.

- Added Dataset#destroy for deleting each record individually as support for models. Renamed Model#delete to Model#destroy (and Model#destroy_all) ala ActiveRecord.
- Refactored Dataset#first and Dataset#last code. These methods can now accept the number of records to fetch.

### 0.0.1

- More documentation for Dataset.
- Renamed Database#query to Database#dataset.
- Added Dataset#insert_multiple for inserting multiple records.
- Added Dataset#<< as shorthand for inserting records.
- Added Database#<< method for executing arbitrary SQL.
- Imported Sequel code.

## Sequel::Model CHANGELOG 0.1 - 0.5.0.2

### 0.5.0.2 (2008-03-12)

- More fixes for Model.associate to accept strings and symbols as class references.

### 0.5.0.1 (2008-03-09)

- Fixed Model.associate to accept class and class name in :class option.

### 0.5 (2008-03-08)

- Merged new associations branch into trunk.
- Rewrote RDoc for associations.
- Added has_and_belongs_to_many alias for many_to_many.
- Added support for optional dataset block.
- Added :order option to order association datasets.
- Added :cache option to return and cache array of objects for association.
- Changed one_to_many, many_to_many associations to return dataset by default.
- Added has_many, belongs_to aliases.
- Refactored associations code.
- Added deprecations for old-style relations.
- Completed specs for new associations code.
- New associations code by Jeremy Evans (replaces relations code.)

### 0.4.2 (2008-02-29)

- Fixed one_to_many implicit key to work correctly for namespaced classes (167).
- Fixed Model.db= to affect the underlying dataset (183).
- Fixed Model.implicit_table_name to disregard namespaces.

### 0.4.1 (2008-02-10)

- Implemented Model#inspect (151).
- Changed Model#method_missing to short-circuit and bypass checking columns if the values hash already contains the relevant column (150).
- Updated to reflect changes in sequel_core (Dataset#clone_merge renamed to Dataset#clone).

### 0.4 (2008-02-05)

- Fixed Model#set to work with string keys (143).
- Fixed Model.create to correctly initialize instances marked as new (135).
- Fixed Model#initialize to convert string keys into symbol keys. This also fixes problem with validating objects initialized with string keys (136).

### 0.3.3 (2008-01-25)

- Finalized support for virtual attributes.

### 0.3.2.1 (2008-01-24)

- Fixed Model.dataset to correctly set the dataset if using implicit naming or inheriting the superclass dataset (thanks celldee).

### 0.3.2 (2008-01-24)

- Added Model#update_with_params method with support for virtual attributes and auto-filtering of unrelated parameters, and changed Model.create_with_params to support virtual attributes (128).
- Cleaned up gem spec (132).
- Removed validations code. Now relying on validations in assistance gem.

### 0.3.1 (2008-01-21)

- Changed Model.dataset to use inflector to pluralize the class name into the table name. Works in similar fashion to table names in AR or DM.

### 0.3 (2008-01-18)

- Implemented Validatable::Errors class.
- Added Model#reload as alias to Model#refresh.
- Changed Model.create to accept a block (126).
- Rewrote validations.
- Fixed Model#initialize to accept nil values (115).

### 0.2 (2008-01-02)

- Removed deprecated Model.recreate_table method.
- Removed deprecated :class and :on options from one_to_many macro.
- Removed deprecated :class option from one_to_one macro.
- Removed deprecated Model#pkey method.
- Changed dependency to sequel_core.
- Removed examples from sequel core.
- Additional specs. We‘re now at 100% coverage.
- Refactored hooks code. Hooks are now inheritable, and can be defined by supplying a block or a method name, or by overriding the hook instance method. Hook chains can now be broken by returning false (111, 112).

### 0.1 (2007-12-30)

- Moved model code from sequel into separate model sub-project.

[Validate]