Commits on Jan 8, 2013
  1. Bump version to 3.43.0

    jeremyevans committed Jan 8, 2013
  2. Move the #meta_def support for Database, Dataset, and Model to the me…

    jeremyevans committed Jan 8, 2013
    …ta_def extension
    This is a backwards incompatible change in that the #meta_def
    method is no longer available by default on Database, Dataset,
    and Model classes and instances.
    Sequel originally depended on the metaid gem that added meta_def
    and a handful of other methods to Object.  Over the years I removed
    usage of most of the other methods, and restricted their definitions
    in Sequel to just Database, Dataset, and Model classes and instances.
    However, the metadef method was only used in a couple of places
    in Sequel, and it really only saves a few characters in those
    places, so I decided to remove usage of meta_def completely.
    As meta_def was no longer used internally, and it was originally
    only used for implementing Sequel, there was no need to load it
    by default and have all Sequel users pay the memory penalty for
    Since some users may need it, I've decided to move it to an
    extension to make it easy to work with old code.
    The core and extension specs still use meta_def significantly, so
    the extension is loaded automatically by those specs.  Hopefully
    those specs can be cleaned up in the future.
  3. Fix Database#copy_into on jdbc/postgres when an exception is raised

    jeremyevans committed Jan 8, 2013
    The previous implementation has a serious error in that if a ruby
    exception was raised, it committed the copy instead of aborting
    it.  The reason this wasn't caught by the specs is that it used
    an internal transaction.  However, the method is not specced to
    use an internal transaction, and the native postgres adapter does
    not use an internal transaction, so remove the transaction usage.
    In addition to aborting the copy correctly, also correctly wrap
    the underlying exception in a DatabaseError.
  4. Optimize some #hash definitions

    jeremyevans committed Jan 8, 2013
    When Sequel supported ruby 1.8.6, it had to transform hashes to
    sorted arrays inside #hash, since in ruby  1.8.6, Hash#hash is
    different for two hashes even if they are equal according to ==.
    Starting at ruby 1.8.7, Hash#hash is the same for hashes equal
    according to ==, so we no longer need to create the sorted array,
    which should make these #hash definitions faster.
  5. Remove the _*_dataset_helper private method definition

    jeremyevans committed Jan 8, 2013
    This private method existed because when association support was
    originally added to Sequel, instance_exec was not supported, so
    the only way to pass arguments to an instance_evaled block was
    to define a method for it.  Now that Sequel has dropped Ruby
    1.8.6 support, all versions of ruby supported by Sequel support
    instance_exec, so just use that instead.
    The public AssociationReflection#dataset_helper_method is also
    being removed, since it no longer has any use.
  6. Bump copyright year

    jeremyevans committed Jan 8, 2013
  7. Make Database#copy_into raise a DatabaseError if the database signals…

    jeremyevans committed Jan 8, 2013
    … an error in the postgres adapter
    Previously, such errors were swallowed by accident.
  8. Define respond_to_missing? where method_missing is defined and the ob…

    jeremyevans committed Jan 8, 2013
    …ject supports respond_to?
    There are a couple of other places in Sequel where method_missing
    is used, but those places do not support respond_to?, so defining
    respond_to_missing? doesn't make sense for them.
  9. Allow lambda procs with 0 arity as virtual row blocks on ruby 1.9

    jeremyevans committed Jan 7, 2013
    Previously, such blocks did not work, because the blocks would be
    instance_evaled, which passes an argument, and lambda procs with
    0 arity would raise an error in that circumstance on ruby 1.9+.
    Now that Sequel no longer supports ruby 1.8.6, switch from
    instance_eval to instance_exec, making such procs work.
    For compatibility with ruby 1.8.7, make Sequel::BasicObject
    respond to instance_exec on ruby <1.9.
Commits on Jan 7, 2013
  1. Handle schema-qualified row_types in the pg_array integration in the …

    jeremyevans committed Jan 7, 2013
    …pg_row extension (Fixes #595)
    This isn't a bulletproof fix, but it does fix the issue in most
    cases.  A more complete fix would handle quoting of the type
  2. Add some warnings to the documentation related to Object#extend use

    jeremyevans committed Jan 7, 2013
    Object#extend busts method caches in MRI and probably other current
    ruby implementations, so note usage in the documentation so that
    users can be aware of it.
  3. Allow treating tinyint(1) unsigned columns as booleans in the mysql a…

    jeremyevans committed Jan 7, 2013
    Previously, the schema type for tinyint(1) unsigned columns would
    be integer instead of boolean.
  4. Attempt to use the jdbc-hsqldb driver if available

    jeremyevans committed Jan 7, 2013
    Sequel only supports HSQLDB 2.2+.  Previously, the jdbc-hsqldb
    gem was at version  However, it has recently been upgraded
    to 2.2.9, and Sequel now supports it, so load it automatically
    so that the jar does not need to be loaded manually.
Commits on Dec 27, 2012
  1. update JDBC driver loading to handle latest jdbc gems

    kares committed Dec 27, 2012
    latest gems no longer auto-load the driver jar but instead provide a load_driver method, this change is handled backward compatible (since not all driver gems are updated + users might decide to stick with an older gem version).
Commits on Dec 18, 2012
  1. Minor cleanups for db2 blob commit

    jeremyevans committed Dec 18, 2012
    Use fewer String#<< calls in literal_blob_append.
    When use_clob_as_blob is true, don't cast to blob.
    Don't use let in the specs.
    Remove jdbc/db2 guard for blob escaping.
Commits on Dec 17, 2012
  1. fix binary data escaping for DB2

    mluu committed Dec 17, 2012
  2. clean up test

    mluu committed Dec 17, 2012
  3. Fix error message for mismatched number of association keys

    jeremyevans committed Dec 17, 2012
    It is not guaranteed that composite keys are being used,
    so just drop the composite qualifier.
Commits on Dec 14, 2012
  1. Add date_arithmetic extension for database-independent date calculations

    jeremyevans committed Dec 14, 2012
    This is supported on all 11 database types that Sequel is
    regularly tested against.
    While here, fix an minor issue in the postgres adapter specs when
    activesupport is not installed.
  2. Make HSQLDB use standard SQL datetimes

    jeremyevans committed Dec 14, 2012
    This isn't always necessary, but it appears to fix some cases
    on HSQLDB.
  3. Update some spec guards for HSQLDB 2.2.9

    jeremyevans committed Dec 14, 2012
    Looks like between HSQLDB 2.2.5 and 2.2.9, changes were made that broken
    the correlated_subquery eager limit strategy, and an internal
    java.lang.ArrayIndexOutOfBoundsException is now raised if you try to add
    a self-referential foreign key.
Commits on Dec 13, 2012
  1. Explicit require rake < 10 on Travis

    jeremyevans committed Dec 13, 2012
    1.9.2 is currently failing due to the new rake, even with the
    Rakefile addition to ignore errors when requiring rake/rdoctask.
  2. Make Database#schema handle [host.]database.schema.table qualified ta…

    jeremyevans committed Dec 13, 2012
    …bles on Microsoft SQL Server
    Basically, the schema parsing queries need to use the [host.]database
    as a qualifier of the metadata tables.  There are not currently any
    adapter tests for this, but I've done some manually testing and it
    should work correctly.
  3. Add Dataset#split_qualifiers helper method for splitting a qualifier …

    jeremyevans committed Dec 13, 2012
    …identifier into array of strings
  4. Make Database#schema_and_table always return strings for the schema a…

    jeremyevans committed Dec 13, 2012
    …nd table
    Before, it sometimes returned a string, and sometimes returned a symbol.
    While here, update the documentation to reflect that this method
    does not handle more than one level of qualification.
  5. Better handle new rake/old rdoc combination in Rakefile

    jeremyevans committed Dec 13, 2012
    Instead of just rescuing just LoadError, rescue StandardError
    exceptions as well. New rake raises a RuntimeError when
    rake/rdoctask is required.
  6. Skip stripping of blob columns in the string_stripper plugin (Fixes #593

    jeremyevans committed Dec 13, 2012
    In addition to handling blob columns/values, this also allows
    you to arbitrarily skip stripping of certain columns via