Commits on Jan 4, 2010
  1. Bump version to 3.8.0

    committed Jan 4, 2010
Commits on Dec 31, 2009
  1. Fix typo in CHANGELOG

    committed Dec 31, 2009
  2. Add servers, add_servers, and remove_servers to the single threaded c…

    …onnection pool
    
    These mirror the methods for the default connection pool, so the
    single threaded connection pool operates more as a drop in
    replacement (modulo threading support).  This also allows
    disconnect to accept a :servers option specifying the servers from
    which to disconnect.
    committed Dec 31, 2009
Commits on Dec 30, 2009
  1. Catch cases in the postgres adapter where exceptions weren't converte…

    …d or raised appropriately
    
    This adds check_disconnect_errors to the Postgres::Adapter class,
    and check_database_errors to the Postgres::Database class.  The
    former rescues PGErrors and converts them to
    DatabaseDisconnectErrors if the connection status cannot be
    determined or is not OK.  The latter converts exceptions to
    regular DatabaseErrors.  They both yield to their blocks.
    This cuts down on the amount of manually rescuing in the adapter.
    
    Specifically, this patch fixes two problems:
    
    1) PGErrors that weren't converted when preparing a statement or
    executing a prepared statement.
    
    2) A DatabaseDisconnectError not being raised for a non-OK status.
    committed Dec 30, 2009
  2. Specs and minor fixes for validates_type method in validation_helpers

    This fixes a bug in the default validation error message for
    validates_type.  It also allows the specifying of a class name using
    either a Symbol or String, similar to how associations :class option
    works.  Finally, it adds specs.
    committed Dec 30, 2009
  3. Remove the validates_type_of method in validation_class_methods

    validation_class_methods exists only for backward compatibility. It
    receives bug fixes, but no new features.
    committed Dec 30, 2009
  4. Respect the :size option for the generic File type on MySQL to create…

    … tinyblob, mediumblob, and longblob
    
    The :tiny, :medium, and :long values for the :size option are all
    respected and create the related type of blob.  All other values
    default to a plain blob.
    committed Dec 30, 2009
  5. Don't use the OUTPUT clause on SQL Server versions that don't support…

    … it (pre-2005) (Fixes #281)
    
    The OUTPUT clause was only used implicitly in a single case,
    Dataset#insert_select, so otherwise OUTPUT would not be used unless
    Dataset#output was called manually.  Unfortunately, model object
    creation uses insert_select, so creating a model object on SQL
    Server 2000 failed.
    
    This commit checks the server version to make sure OUTPUT is
    supported before using it.  If Dataset#output is called explicitly
    when not supported, an Error is raised.
    committed Dec 30, 2009
  6. 'order' should be after 'having'

    mluu committed with John Firebaugh Dec 11, 2009
  7. add type validations

    for validation helpers plugin, adds 'validates_type' method
    for validation class methods plugin, adds 'validates_type_of' method
    mluu committed with John Firebaugh Dec 7, 2009
  8. Try to detect disconnects in the JDBC adapter

    John Firebaugh committed Nov 25, 2009
  9. Apply same fix for SQL_ROLLBACK_TO_SAVEPOINT as for SQL_ROLLBACK

    The issue here is that some SQL Server errors cause an active
    transaction to be rolled back automatically and unconditionally.
    Sequel has no way to know about this, and so must guard against
    the case where there is no active transaction when it tries to
    rollback.
    John Firebaugh committed Nov 17, 2009
  10. Added Expression#==

    David Lee committed with John Firebaugh Nov 13, 2009
  11. Better diagnostics

    John Firebaugh committed Nov 9, 2009
Commits on Dec 29, 2009
Commits on Dec 28, 2009
Commits on Dec 24, 2009
  1. @nullstyle
  2. @nullstyle
Commits on Dec 21, 2009
  1. Fix handling of non-existent server in single-threaded connection pool

    This was already working in the threaded connection pool, but it
    wasn't handled correctly in the single threaded connection pool.
    Add a spec for correct behavior to both pools.
    committed Dec 21, 2009
  2. Default to using mysqlplus driver in the native mysql adapter, fall b…

    …ack to mysql driver
    
    mysqlplus is significantly better than the standard mysql driver in
    threaded environments, as it does not block the entire interpreter
    while waiting for query results.
    committed Dec 21, 2009
Commits on Dec 20, 2009
Commits on Dec 19, 2009
Commits on Dec 17, 2009
Commits on Dec 15, 2009
Commits on Dec 14, 2009
  1. Add #each_server to Database and Dataset, for running operations on a…

    …ll shards
    
    Sequel has supported sharding for a long time (since 2.4.0), but it
    hasn't had built in support for updating all shards at once until
    now.  Database#each_server and Dataset#each_server are designed to
    fill those needs.
    
    Database#each_server yields a new Database object for each server,
    and is intended for use when you want to run schema modification
    (DDL) queries, or other custom SQL against all shards.
    
    Dataset#each_server yields copies of the current dataset, each
    of which is tied to a separate server in the connection pool.
    It's intended for when you want to select/insert/update/delete
    from all shards.
    
    To implement this, ConnectionPool#servers and Database#servers
    methods were added.
    committed Dec 13, 2009
Commits on Dec 10, 2009
  1. Remove the irregular ox->oxen pluralization, it screws up box->boxes

    I didn't want to touch the default inflections again, but as box is
    much more common than ox, I think this is best removed.
    committed Dec 10, 2009
  2. Remove meta_eval and metaclass private methods from Sequel::Metaprogr…

    …amming
    
    If you want this, require 'metaid'.  Sequel only uses meta_def, both
    in the lib and in the specs.  meta_def can be implemented without
    meta_eval, and metaclass is small enough to inline into meta_def.
    committed Dec 10, 2009
  3. Merge Dataset::FROM_SELF_KEEP_OPTS into Dataset::NON_SQL_OPTIONS

    While used in different places, these were used pretty much for the
    same things, and in both cases where one was used, the values from
    the other should have been taken into account.  Breaks backwards
    compatibility slightly, but it's unlikely anyone is using it.
    committed Dec 10, 2009