### Home Classes Methods

### Files

- CHANGELOG
- COPYING
- README.rdoc
- advanced_associations.rdoc
- association_basics.rdoc
- cheat_sheet.rdoc
- dataset_basics.rdoc
- dataset_filtering.rdoc
- migration.rdoc
- model_hooks.rdoc
- opening_databases.rdoc
- prepared_statements.rdoc
- querying.rdoc
- reflection.rdoc
- 1.0.txt
- 1.1.txt
- 1.3.txt
- 1.4.0.txt
- 1.5.0.txt
- 2.0.0.txt
- 2.1.0.txt
- 2.10.0.txt
- 2.11.0.txt
- 2.12.0.txt
- 2.2.0.txt
- 2.3.0.txt
- 2.4.0.txt
- 2.5.0.txt
- 2.6.0.txt
- 2.7.0.txt
- 2.8.0.txt
- 2.9.0.txt
- 3.0.0.txt
- 3.1.0.txt
- 3.10.0.txt
- 3.11.0.txt
- 3.12.0.txt
- 3.2.0.txt
- 3.3.0.txt
- 3.4.0.txt
- 3.5.0.txt
- 3.6.0.txt
- 3.7.0.txt
- 3.8.0.txt
- 3.9.0.txt
- sharding.rdoc
- sql.rdoc
- virtual_rows.rdoc

### Class Index

Quicksearch

- Sequel
- Sequel::ADO
- Sequel::ADO::Database
- Sequel::ADO::Dataset
- Sequel::ADO::MSSQL
- Sequel::ADO::MSSQL::DatabaseMethods
- Sequel::ADO::MSSQL::Dataset
- Sequel::AdapterNotFound
- Sequel::Amalgalite
- Sequel::Amalgalite::Database
- Sequel::Amalgalite::Dataset
- Sequel::Amalgalite::SequelTypeMap
- Sequel::BasicObject
- Sequel::BeforeHookFailed
- Sequel::ConnectionPool
- Sequel::ConnectionPool::ClassMethods
- Sequel::DB2
- Sequel::DB2::Database
- Sequel::DB2::Dataset
- Sequel::DBI
- Sequel::DBI::Database
- Sequel::DBI::Dataset
- Sequel::DataObjects
- Sequel::DataObjects::Database
- Sequel::DataObjects::Dataset
- Sequel::DataObjects::MySQL
- Sequel::DataObjects::MySQL::DatabaseMethods
- Sequel::DataObjects::MySQL::Dataset
- Sequel::DataObjects::Postgres
- Sequel::DataObjects::Postgres::AdapterMethods
- Sequel::DataObjects::Postgres::DatabaseMethods
- Sequel::DataObjects::Postgres::Dataset
- Sequel::DataObjects::SQLite
- Sequel::DataObjects::SQLite::DatabaseMethods
- Sequel::DataObjects::SQLite::Dataset
- Sequel::Database
- Sequel::DatabaseConnectionError
- Sequel::DatabaseDisconnectError
- Sequel::DatabaseError
- Sequel::Dataset
- Sequel::Dataset::ArgumentMapper
- Sequel::Dataset::Pagination
- Sequel::Dataset::PreparedStatementMethods
- Sequel::Dataset::QueryBlockCopy
- Sequel::Dataset::StoredProcedureMethods
- Sequel::Dataset::StoredProcedures
- Sequel::Dataset::UnnumberedArgumentMapper
- Sequel::Error
- Sequel::Error::AdapterNotFound
- Sequel::Error::InvalidOperation
- Sequel::Error::InvalidValue
- Sequel::Error::PoolTimeoutError
- Sequel::Error::Rollback
- Sequel::Firebird
- Sequel::Firebird::Database
- Sequel::Firebird::Dataset
- Sequel::Inflections
- Sequel::Informix
- Sequel::Informix::Database
- Sequel::Informix::Dataset
- Sequel::IntegerMigrator
- Sequel::InvalidOperation
- Sequel::InvalidValue
- Sequel::JDBC
- Sequel::JDBC::AS400
- Sequel::JDBC::AS400::DatabaseMethods
- Sequel::JDBC::AS400::Dataset
- Sequel::JDBC::Database
- Sequel::JDBC::Dataset
- Sequel::JDBC::Dataset::PreparedStatementMethods
- Sequel::JDBC::Dataset::StoredProcedureMethods
- Sequel::JDBC::H2
- Sequel::JDBC::H2::DatabaseMethods
- Sequel::JDBC::H2::Dataset
- Sequel::JDBC::JavaLang
- Sequel::JDBC::JavaSQL
- Sequel::JDBC::JavaxNaming
- Sequel::JDBC::MSSQL
- Sequel::JDBC::MSSQL::DatabaseMethods
- Sequel::JDBC::MSSQL::Dataset
- Sequel::JDBC::MySQL
- Sequel::JDBC::MySQL::DatabaseMethods
- Sequel::JDBC::MySQL::Dataset
- Sequel::JDBC::Oracle
- Sequel::JDBC::Oracle::DatabaseMethods
- Sequel::JDBC::Oracle::Dataset
- Sequel::JDBC::Postgres
- Sequel::JDBC::Postgres::AdapterMethods
- Sequel::JDBC::Postgres::DatabaseMethods
- Sequel::JDBC::Postgres::Dataset
- Sequel::JDBC::SQLite
- Sequel::JDBC::SQLite::DatabaseMethods
- Sequel::JDBC::SQLite::Dataset
- Sequel::LiteralString
- Sequel::LooserTypecasting
- Sequel::MSSQL
- Sequel::MSSQL::DatabaseMethods
- Sequel::MSSQL::DatasetMethods
- Sequel::Metaprogramming
- Sequel::Migration
- Sequel::MigrationDSL
- Sequel::Migrator
- Sequel::Migrator::Error
- Sequel::Model
- Sequel::Model::Associations
- Sequel::Model::Associations::AssociationDatasetMethods
- Sequel::Model::Associations::AssociationReflection
- Sequel::Model::Associations::ClassMethods
- Sequel::Model::Associations::DatasetMethods
- Sequel::Model::Associations::InstanceMethods
- Sequel::Model::Associations::ManyToManyAssociationReflection
- Sequel::Model::Associations::ManyToOneAssociationReflection
- Sequel::Model::Associations::OneToManyAssociationReflection
- Sequel::Model::Associations::OneToOneAssociationReflection
- Sequel::Model::ClassMethods
- Sequel::Model::DatasetMethods
- Sequel::Model::Errors
- Sequel::Model::InstanceMethods
- Sequel::MySQL
- Sequel::MySQL::Database
- Sequel::MySQL::DatabaseMethods
- Sequel::MySQL::Dataset
- Sequel::MySQL::Dataset::CallableStatementMethods
- Sequel::MySQL::Dataset::PreparedStatementMethods
- Sequel::MySQL::Dataset::StoredProcedureMethods
- Sequel::MySQL::DatasetMethods
- Sequel::NamedTimezones
- Sequel::NoExistingObject
- Sequel::NotImplemented
- Sequel::ODBC
- Sequel::ODBC::Database
- Sequel::ODBC::Dataset
- Sequel::ODBC::MSSQL
- Sequel::ODBC::MSSQL::DatabaseMethods
- Sequel::ODBC::MSSQL::Dataset
- Sequel::OpenBase
- Sequel::OpenBase::Database
- Sequel::OpenBase::Dataset
- Sequel::Oracle
- Sequel::Oracle::Database
- Sequel::Oracle::DatabaseMethods
- Sequel::Oracle::Dataset
- Sequel::Oracle::DatasetMethods
- Sequel::Plugins
- Sequel::Plugins::ActiveModel
- Sequel::Plugins::ActiveModel::InstanceMethods
- Sequel::Plugins::AssociationDependencies
- Sequel::Plugins::AssociationDependencies::ClassMethods
- Sequel::Plugins::AssociationDependencies::InstanceMethods
- Sequel::Plugins::AssociationPks
- Sequel::Plugins::AssociationPks::ClassMethods
- Sequel::Plugins::AssociationProxies
- Sequel::Plugins::AssociationProxies::AssociationProxy
- Sequel::Plugins::AssociationProxies::ClassMethods
- Sequel::Plugins::BooleanReaders
- Sequel::Plugins::BooleanReaders::ClassMethods
- Sequel::Plugins::Caching
- Sequel::Plugins::Caching::ClassMethods
- Sequel::Plugins::Caching::InstanceMethods
- Sequel::Plugins::ClassTableInheritance
- Sequel::Plugins::ClassTableInheritance::ClassMethods
- Sequel::Plugins::ClassTableInheritance::InstanceMethods
- Sequel::Plugins::Composition
- Sequel::Plugins::Composition::ClassMethods
- Sequel::Plugins::Composition::InstanceMethods
- Sequel::Plugins::ForceEncoding
- Sequel::Plugins::ForceEncoding::ClassMethods
- Sequel::Plugins::ForceEncoding::InstanceMethods
- Sequel::Plugins::HookClassMethods
- Sequel::Plugins::HookClassMethods::ClassMethods
- Sequel::Plugins::HookClassMethods::InstanceMethods
- Sequel::Plugins::IdentityMap
- Sequel::Plugins::IdentityMap::ClassMethods
- Sequel::Plugins::IdentityMap::InstanceMethods
- Sequel::Plugins::InstanceFilters
- Sequel::Plugins::InstanceFilters::Error
- Sequel::Plugins::InstanceFilters::InstanceMethods
- Sequel::Plugins::InstanceHooks
- Sequel::Plugins::InstanceHooks::InstanceMethods
- Sequel::Plugins::LazyAttributes
- Sequel::Plugins::LazyAttributes::ClassMethods
- Sequel::Plugins::LazyAttributes::InstanceMethods
- Sequel::Plugins::ManyThroughMany
- Sequel::Plugins::ManyThroughMany::ClassMethods
- Sequel::Plugins::ManyThroughMany::ManyThroughManyAssociationReflection
- Sequel::Plugins::NestedAttributes
- Sequel::Plugins::NestedAttributes::ClassMethods
- Sequel::Plugins::NestedAttributes::InstanceMethods
- Sequel::Plugins::OptimisticLocking
- Sequel::Plugins::OptimisticLocking::ClassMethods
- Sequel::Plugins::OptimisticLocking::InstanceMethods
- Sequel::Plugins::RcteTree
- Sequel::Plugins::Schema
- Sequel::Plugins::Schema::ClassMethods
- Sequel::Plugins::Serialization
- Sequel::Plugins::Serialization::ClassMethods
- Sequel::Plugins::Serialization::InstanceMethods
- Sequel::Plugins::Sharding
- Sequel::Plugins::Sharding::ClassMethods
- Sequel::Plugins::Sharding::DatasetMethods
- Sequel::Plugins::Sharding::InstanceMethods
- Sequel::Plugins::SingleTableInheritance
- Sequel::Plugins::SingleTableInheritance::ClassMethods
- Sequel::Plugins::SingleTableInheritance::InstanceMethods
- Sequel::Plugins::SkipCreateRefresh
- Sequel::Plugins::SkipCreateRefresh::InstanceMethods
- Sequel::Plugins::StringStripper
- Sequel::Plugins::StringStripper::InstanceMethods
- Sequel::Plugins::Subclasses
- Sequel::Plugins::Subclasses::ClassMethods
- Sequel::Plugins::TacticalEagerLoading
- Sequel::Plugins::TacticalEagerLoading::DatasetMethods
- Sequel::Plugins::TacticalEagerLoading::InstanceMethods
- Sequel::Plugins::Timestamps
- Sequel::Plugins::Timestamps::ClassMethods
- Sequel::Plugins::Timestamps::InstanceMethods
- Sequel::Plugins::Touch
- Sequel::Plugins::Touch::ClassMethods
- Sequel::Plugins::Touch::InstanceMethods
- Sequel::Plugins::TypecastOnLoad
- Sequel::Plugins::TypecastOnLoad::ClassMethods
- Sequel::Plugins::TypecastOnLoad::InstanceMethods
- Sequel::Plugins::UpdatePrimaryKey
- Sequel::Plugins::UpdatePrimaryKey::ClassMethods
- Sequel::Plugins::UpdatePrimaryKey::InstanceMethods
- Sequel::Plugins::ValidationClassMethods
- Sequel::Plugins::ValidationClassMethods::ClassMethods
- Sequel::Plugins::ValidationClassMethods::ClassMethods::Generator
- Sequel::Plugins::ValidationClassMethods::InstanceMethods
- Sequel::Plugins::ValidationHelpers
- Sequel::Plugins::ValidationHelpers::InstanceMethods
- Sequel::PoolTimeout
- Sequel::Postgres
- Sequel::Postgres::Adapter
- Sequel::Postgres::AdapterMethods
- Sequel::Postgres::Database
- Sequel::Postgres::DatabaseMethods
- Sequel::Postgres::Dataset
- Sequel::Postgres::Dataset::ArgumentMapper
- Sequel::Postgres::Dataset::BindArgumentMethods
- Sequel::Postgres::Dataset::PreparedStatementMethods
- Sequel::Postgres::DatasetMethods
- Sequel::Postgres::DatasetMethods::PreparedStatementMethods
- Sequel::PrettyTable
- Sequel::Progress
- Sequel::Progress::DatabaseMethods
- Sequel::Progress::DatasetMethods
- Sequel::Rollback
- Sequel::SQL
- Sequel::SQL::AliasMethods
- Sequel::SQL::AliasedExpression
- Sequel::SQL::BitwiseMethods
- Sequel::SQL::Blob
- Sequel::SQL::BooleanConstant
- Sequel::SQL::BooleanExpression
- Sequel::SQL::BooleanMethods
- Sequel::SQL::CaseExpression
- Sequel::SQL::Cast
- Sequel::SQL::CastMethods
- Sequel::SQL::ColumnAll
- Sequel::SQL::ComplexExpression
- Sequel::SQL::ComplexExpressionMethods
- Sequel::SQL::Constant
- Sequel::SQL::Constants
- Sequel::SQL::Expression
- Sequel::SQL::Function
- Sequel::SQL::GenericComplexExpression
- Sequel::SQL::GenericExpression
- Sequel::SQL::Identifier
- Sequel::SQL::IdentifierMethods
- Sequel::SQL::InequalityMethods
- Sequel::SQL::JoinClause
- Sequel::SQL::JoinOnClause
- Sequel::SQL::JoinUsingClause
- Sequel::SQL::NegativeBooleanConstant
- Sequel::SQL::NoBooleanInputMethods
- Sequel::SQL::NumericExpression
- Sequel::SQL::NumericMethods
- Sequel::SQL::OrderMethods
- Sequel::SQL::OrderedExpression
- Sequel::SQL::PlaceholderLiteralString
- Sequel::SQL::QualifiedIdentifier
- Sequel::SQL::QualifyingMethods
- Sequel::SQL::SQLArray
- Sequel::SQL::StringConcatenationMethods
- Sequel::SQL::StringExpression
- Sequel::SQL::StringMethods
- Sequel::SQL::Subscript
- Sequel::SQL::SubscriptMethods
- Sequel::SQL::VirtualRow
- Sequel::SQL::Window
- Sequel::SQL::WindowFunction
- Sequel::SQLite
- Sequel::SQLite::Database
- Sequel::SQLite::DatabaseMethods
- Sequel::SQLite::Dataset
- Sequel::SQLite::Dataset::ArgumentMapper
- Sequel::SQLite::Dataset::PreparedStatementMethods
- Sequel::SQLite::DatasetMethods
- Sequel::Schema
- Sequel::Schema::AlterTableGenerator
- Sequel::Schema::Generator
- Sequel::ShardedSingleConnectionPool
- Sequel::ShardedThreadedConnectionPool
- Sequel::SimpleMigration
- Sequel::SingleConnectionPool
- Sequel::ThreadLocalTimezones
- Sequel::ThreadedConnectionPool
- Sequel::TimestampMigrator
- Sequel::Timezones
- Sequel::ValidationFailed
- String
- String::Inflections
- Array
- FalseClass
- Hash
- NilClass
- Numeric
- Object
- PGconn
- PGresult
- Proc
- Symbol
- TrueClass

No matching classes.

New Features

- Dataset#filter and related methods now accept a string with named placeholders, and a hash with placeholder values:

      ds.filter('copies_sold > :sales', :sales=>500000)

  Sequel’s general support for this syntax is nicer:

      ds.filter{copies_sold > 500000}

  But named placeholder support can make it easier to port code from other database libraries. Also, it works much better than the ? placeholder support if you have a long SQL statement:

      DB['SELECT :n FROM t WHERE p > :q AND p < :r', :n=>1,:q=>2,:r=>3]

  Sequel doesn't subsitute values that don't appear in the hash:

      ds.where('price < :p AND id in :ids', :p=>100)
      # WHERE (price < 100 AND id in :ids)

  This makes it easier to spot missed placeholders, and avoids issues

  with PostgreSQL’s | casting syntax or : inside string literals.

- The Model add_ association method now accepts a hash and creates a new associated model object associated to the receiver:

      Artist[:name=>'YJM'].add_album(:name=>'RF')

- The Model remove_ association method now accepts a primary key and removes the associated model object from the association. For models using composite primary keys, an array of primary key values can be used. Example:

      Artist[:name=>'YJM'].remove_album(1) # regular pk
      Artist[:name=>'YJM'].remove_album([2, 3]) # composite pk

- Dataset#bind was added, allowing you to bind values before calling Dataset#call. This is more consistent with Sequel’s general approach where queries can be built in any order.

- The native postgres adapter now has Dataset#use_cursor, which allows you to process huge datasets without keeping all records in memory. The default number of rows per cursor fetch is 1000, but that can be modified:

      DB[:huge_table].use_cursor.each{|r| p r}
      DB[:huge_table].use_cursor(:rows_per_fetch=>10000).each{|r| p r}

  This probably won’t work with prepared statements or bound variables.

- The nested_attributes plugin now adds newly created objects to the cached association array immediately, even though the changes are not persisted to the database until after the object is saved. The reasoning for this is that otherwise there is no way to access the newly created associated objects before the save, and no way to access them at all if validation fails.

  This makes the nested_attributes plugin much easier to use, since now you can just iterate over the cached association array when building the form. If validation fails, it will have the newly created failed objects in the array, so you can easily display the form as the user entered it for them to make changes.

  This change doesn’t affect many_to_one associations, since those don’t have a cached association array. This also does not affect updating existing records, since those are already in the cached array.

- You can now easily override the default options used in the validation_helpers plugin (the recommended validation plugin). Options can be overridden at a global level:

      Sequel::Plugins::ValidationHelpers::DEFAULT_OPTIONS[:format].
        merge!(:message=>"incorrect format", :allow_missing=>true)

  Options can also be overridden on a per-class level:

      class Album < Sequel::Model
        plugin :validation_helpers
        DEFAULT_VALIDATION_OPTIONS = {
         :format=>{:message=>"incorrect format", :allow_missing=>true}}

        private

        def default_validation_helpers_options(type)
          super.merge(DEFAULT_VALIDATION_OPTIONS[type] || {})
        end
      end

- You can now use a proc instead of a string for the validation_helpers :message option. This should allow much easier internationalization support. If a proc is given, Sequel calls it to get the format string to use. Whether the proc should take an argument depends on whether the associated validation method takes an argument before the array of columns to validate, and the argument provided is what is passed to the proc. The exception to this is the validates_not_string method, which doesn’t take an argument, but does pass one to the proc (a symbol with the schema type of the column).

  Combined with the above default option support, full internationalization support for the validation_helpers plugin should be fairly easy.

- The nested_attributes plugin now accepts a :fields option that specifies the fields that are allowed. If specified, the plugin will use set_only instead of set when mass assigning attributes. Without this, the only way to control which fields are allowed is to set allowed/restricted attributes at a class level in the associated class.

- Associations now accept a :distinct option which uses the SQL DISTINCT clause. This can be used instead of :uniq for many_to_many and many_through_many associations to handle the uniqueness in the database instead of in ruby. It can also be useful for one_to_many associations to models that don’t have primary keys.

- The caching plugin now accepts an :ignore_exceptions option that allows it to work with memcached (which raises exceptions instead of returning nil for missing records).

- Sequel now emulates JOIN USING poorly using JOIN ON for databases that don't support JOIN USING (MSSQL and H2). This isn't guaranteed to work for all queries, since USING and ON have different semantics, but should work in most cases.

- The MSSQL shared adapter now supports insert_select, for faster model object creation. If for some reason you need to disable it, you can use disable_insert_output.

- Model#modified! has been added which explicitly marks the object as modified. So even if no column values have been modified, calling save_changes/update will still run through the regular save process and call all before and after save/update hooks.

- Model#marshallable! has been added which removes unmarshallable attributes from the object. Previously, you couldn’t marshal a saved model object because it contained a dataset with a singleton class. Custom _dump and _load methods could be used instead, but this approach is easier to implement.

- Dataset#literal_other now calls sql_literal on the object with the current dataset instance, if the object responds to it. This makes it easier to support the literalization of arbitrary objects.

  Note that if the object is a subclass of a class handled by an existing dataset literalization method, you cannot use this method. You have to override the specific Dataset#literal_* method in that case.

- Model#save_changes now accepts an option hash that is passed to save:

      album.save_changes(:validate=>false)

- A bunch of Dataset#*_join methods have been added, for specific join types:

  - cross_join

  - natural_join

  - full_join

  - left_join

  - right_join

  - natural_full_join

  - natural_left_join

  - natural_right_join

  Previously, you had to use join_table(:cross, …) to use a CROSS JOIN.

- You can now create clustered indexes on Microsoft SQL Server using the :clustered option.

- AssociationReflection#associated_object_keys has been added, specifying the keys in the associated model object that are related to this association.

- Sequel::SQL::SQLArray#to_a was added.

Other Improvements

- Constant lookup in virtual row blocks now works correctly in ruby 1.9. Virtual row blocks are based on BasicObject on ruby 1.9, which doesn’t allow referencing objects in the top level scope. So the following code would cause an error on 1.9:

      DB[:bonds].filter{maturity_date > Time.now}

  Sequel now uses a Sequel::BasicObject class on 1.9 with a const_missing that looks up constants in Object, which allows the above code to work.

- Sequel no longer attempts to load associated objects when one of the key fields in the current table is NULL. This fixes the behavior when the :primary_key option for the association is used to point to a non-primary key.

  A consequence of this change is that attempting to load a *_to_many association for a new model object now returns an empty array instead of raising an exception. This has its own advantage of allowing the same association viewing code to work on both new and existing objects. Previously, you had to actively avoid calling the association method on new objects, or Sequel would raise an exception.

- Dataset aggreate methods (sum/avg/min/max/range/interval) now work correctly with limited, grouped, or compound datasets. Previously, count worked with them, but other aggregate methods did not. These methods now use a subquery if called on a limited, grouped or compound dataset.

- It is no longer required to have an existing GROUP BY clause to use a HAVING clause (except on SQLite, which doesn’t permit it). Sequel has always had this limitation, but it’s not required by the SQL standard, and there are valid reasons to use HAVING without GROUP BY.

- Sequel will now emulate support for databases that don't support multiple column IN/NOT IN syntax, such as MSSQL and SQLite:

      ds.filter([:col1, :col2]=>[[1, 2], [3, 4]].sql_array)
      # default:  WHERE (col1, col2) IN ((1, 2), (3, 4))
      # emulated: WHERE (((col1 = 1) AND (col2 = 2)) OR
      #                  ((col1 = 3) AND (col2 = 4)))

  This is necessary for eager loading associated objects for models with composite primary keys.

- Sequel now emulates :column.ilike('blah%') for case insensitive searches on MSSQL and H2. MSSQL is case insensitive by default, so it is the same as like. H2 is case sensitive, so Sequel uses a case insensitive cast there.

- The nested_attributes plugin no longer allows modification of keys related to the association. This fixes a possible security issue with the plugin, where a user could associate the nested record to a different record. For example:

      Artist.one_to_many :albums
      Artist.plugin :nested_attributes
      Artist.nested_attributes :albums
      artist = Artist.create
      artist2 = Artist.create
      album = Album.create
      artist.add_album(album)
      artist.albums_attributes = [{:id=>album.id,
       :artist_id=>artist2.id}]
      artist.save

- The one_to_many remove_* association method now makes sure that the object to be removed is currently associated to this object. Before, the method could be abused to disassociate the object from whatever object it was associated to.

- Model add_ and remove_ association methods now check that the passed object is of the correct class.

- Calling the add_* association method no longer adds the record to the cached association array if the object is already in the array. Previously, Sequel did this for reciprocal associations, but not for regular associations.

  This makes the most sense for one_to_many associations, since those can only be associated to the object once. For many_to_many associations, if you want an option to disable the behavior, please bring it up on the Sequel mailing list.

- An array with a string and placeholders that is passed to Dataset#filter is no longer modified. Previously:

      options = ["name like ?", "%dog%"]
      DB[:players].where(options)
      options # => ["%dog%"]

- Getting the most recently inserted autoincremented primary key is now optimized when connecting to MySQL via JDBC.

- Model.inherited now calls Class.inherited.

- The MSSQL shared adapter once again works on ruby 1.9. It was broken in 3.5.0 due to minor syntax issues.

- The force_encoding plugin now handles refreshing an existing object, either explicitly or implicitly when new objects are created.

  To use the force_encoding plugin with the identity_map plugin, the identity_map plugin should be loaded first.

- Using nil as a bound variable now works on PostgreSQL. Before, Sequel would incorrectly use “” instead of NULL, since it transformed all objects to strings before binding them. Sequel now binds the objects directly.

- The Amalgalite adapter is now significantly faster, especially for code that modifies the schema or submits arbitrary SQL statements using Database <<, run, or execute_ddl.

- Model#save_changes is now used when updating existing associated objects in the nested_attributes plugin. This should be significantly faster for the common case of submitting a complex form with nested objects without making modifications.

- You can now prepare insert statements that take multiple arguments, such as insert(1, 2, 3) and insert(columns, values).

- Dataset#group_and_count now supports aliased columns.

- Adding indexes to tables outside the default schema now works.

- Eager graphing now works better with models that use aliased tables.

- Sequel now correctly parses the column schema information for tables in a non-default schema on Microsoft SQL Server.

- changed_columns is now cleared for when saving new model objects for adapters that support insert_select, such as PostgreSQL.

- Dataset#replace on MySQL now works correctly when default values are used.

- Dataset#lock on PostgreSQL now works correctly.

- Dataset#explain now works correctly on SQLite, and works using any adapter. It also works correctly on Amalgalite.

- The JDBC adapter now handles binding Time arguments correctly when using prepared statements.

- Model add_ and remove_ association methods now have more descriptive exception messages.

- Dataset#simple_select_all? now ignores options that don’t affect the SQL, such as :server.

- Dataset#window in the PostgreSQL adapter now respects existing named windows.

- Sequel now better handles a failure to begin a new transaction.

- The dataset code was split into some additional files for improved readability.

- Many documentation improvements were made.

Backwards Compatibility

- Model::Errors no longer uses a default proc, but emulates one in the

    method. This is unlikely to have a negative affect unless you

  are calling a method on it that doesn’t call [] (maybe using it in a C extension?).

- Model#table_name now only provides the alias if an aliased table is used.

- The Sequel::Dataset::STOCK_COUNT_OPTS constant has been removed.

- Dataset#lock on PostgreSQL now returns nil instead of a dataset.

[Validate]

Generated with the Darkfish Rdoc Generator 2.