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

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

    committed
    …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
    it.
    
    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

    committed
    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

    committed
    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

    committed
    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

    committed
  7. Make Database#copy_into raise a DatabaseError if the database signals…

    committed
    … 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…

    committed
    …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

    committed
    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 …

    committed
    …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
    names.
  2. Add some warnings to the documentation related to Object#extend use

    committed
    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…

    committed
    …dapters
    
    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

    committed
    Sequel only supports HSQLDB 2.2+.  Previously, the jdbc-hsqldb
    gem was at version 1.8.1.3.  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. @kares

    update JDBC driver loading to handle latest jdbc gems

    kares committed
    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

    committed
    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
  2. clean up test

    mluu committed
  3. Fix error message for mismatched number of association keys

    committed
    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

    committed
    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

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

    committed
    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

    committed
    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…

    committed
    …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 …

    committed
    …identifier into array of strings
  4. Make Database#schema_and_table always return strings for the schema a…

    committed
    …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

    committed
    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

    committed
    )
    
    In addition to handling blob columns/values, this also allows
    you to arbitrarily skip stripping of certain columns via
    Model.skip_string_stripping.
Something went wrong with that request. Please try again.