Commits on Nov 5, 2010
  1. Bump version to 3.17.0

    committed Nov 5, 2010
Commits on Nov 3, 2010
  1. Ensure that the optimistic locking plugin increments the lock column …

    …when using Model#modified!
    John Firebaugh committed Nov 3, 2010
  2. Correctly handle nil values in the xml_serializer plugin, instead of …

    …converting them to empty strings (Fixes #313)
    This adds a nil='' attribute to the XML tag if the value should be
    nil.  Kind of ugly, but gets the job done.  This makes nil values
    roundtrip successfully, but it's up to the consumer of the XML to
    recognize the nil attribute and act appropriately.
    committed Nov 3, 2010
  3. Use a default wait_timeout that's allowed on Windows for the mysql an…

    …d mysql2 adapters (Fixes #314)
    Another MySQL stupidity rears its ugly head.  For some reason, MySQL
    has different allowed value ranges for wait_timeout depending on the
    server OS used.  The previous default value that Sequel used was
    above the limit allowed on Windows.  This lowers the value to the
    maximum allowed on Windows, for both the mysql and mysql2 adapters.
    committed Nov 3, 2010
Commits on Nov 2, 2010
  1. Fix Database#each_server when used with jdbc or do connection strings…

    … without separate :adapter option
    Database#each_server calls Sequel.connect with the current Database
    instance's options.  Unfortunately, for jdbc and do connection
    strings, the connection string itself is not parsed into options,
    it is passed directly to the underlying adapter.  Because of this,
    the :adapter option is not filled in, and when #each_server calls
    connect with the options hash, no :adapter option is present and
    you got an error.
    You could previously work around this using the :adapter option
    specificially, but that was an ugly fix.  This makes all Database
    instances store an :adapter_class option that points to the
    adapter class currently being used.  That way, when each_server
    is called, the correct adapter class will always be used.
    committed Nov 2, 2010
  2. Update CHANGELOG

    committed Nov 2, 2010
Commits on Oct 29, 2010
  1. @bhauff
  2. @bhauff

    Fix missing guard on offset.

    bhauff committed Oct 29, 2010
  3. @bhauff
  4. @bhauff
Commits on Oct 12, 2010
  1. Allow cloning of many_through_many associations

    This relaxes the API of many_through_many to accept a hash as
    a second argument.  This allows it to work with with the :clone
    option.  You can also now specify the :through array as the
    value of the :through key, instead of as a separate argument.
    committed Oct 12, 2010
Commits on Oct 8, 2010
  1. In the nested_attributes plugin, don't make unnecessary update calls …

    …to modify associated objects that are about to be deleted
    This adds a remove_before_destroy? method to the AssociationReflection
    classes.  This is true by default, but false for one_to_one and
    one_to_many associations, where deleting the associated object would
    automatically remove the foreign key reference.
    committed Oct 8, 2010
  2. Don't run the inflector specs if the activesupport inflector is loaded

    The activesupport inflector can take precedence over Sequel's
    string inflector if is is loaded afterward, as it can be by the
    active_model plugin specs.
    As the activesupport inflector rules are different than Sequel's,
    this can cause failing examples.
    committed Oct 8, 2010
  3. Allow Dataset#(add|set)_graph_aliases to accept as hash values symbol…

    …s and arrays with a single element
    If a symbol or array with a single element is used as a hash value,
    the meaning is the same as if an array with two elements was provided,
    where the second element was the same as the key.  Basically, this
    allows you to shorten the common case where the column alias used
    and the column name in the table are the same:
      DB[:a].graph(:b, :a_id=>:id).
       :b_name=>[:b, :name],
       :ft=>[:b, :ft2, 42]).first
      # SELECT a.c, AS b_name, 42 AS ft
      # FROM a LEFT OUTER JOIN b ON (b.a_id =
      # => {:a=>{:c=>a.c}, :b=>{:name=>, :ft2=>42}}
    committed Oct 8, 2010
  4. Note that the identity_map plugin is not compatible with the rcte_tre…

    …e plugin's eager loading
    committed Oct 8, 2010
Commits on Oct 6, 2010
  1. Update CHANGELOG

    committed Oct 6, 2010
  2. @gpherguson
Commits on Oct 5, 2010
  1. Add Database#sql_log_level for changing the level at which SQL querie…

    …s are logged
    This has been requested numerous times.  Previously, I rejected it
    since it's easy to work around using a proxy object, and it slows
    things down.  At present, I think making things simplier for
    people who want to change it is worth the small performance
    committed Oct 5, 2010
  2. A couple of changes to the swift adapter

    This fixes a couple of issues with the swift adapter. On PostgreSQL,
    it would log some statements twice.  On MySQL, it would use a new
    server-side prepared statement for every SELECT, eventually running
    out of server-side prepared statements and crashing.
    On the PostgreSQL adapter, execute insert was not catching swift
    exceptions and reraising them as DatabaseErrors, and on MySQL it
    wasn't explicitly finishing the result object, so memory wouldn't
    be freed until garbage collection was run.
    With these changes and recent updates to swift/dbic++, the swift
    adapter passes the Sequel specs for both PostgreSQL and MySQL, and
    the swift benchmarks can be successfully run on the Sequel swift
    committed Oct 5, 2010
Commits on Oct 1, 2010
  1. Bump version to 3.16.0

    committed Oct 1, 2010
Commits on Sep 30, 2010
  1. Use the same identity map key for composite foreign key associations …

    …as standard composite primary key
    Before, inspect was called in the composite key case, which would
    result in incorrect behavior, in that you could have two objects
    that represent the same row.
    While here, in the association's case, check the associated
    class's identity_map instead of the current models.  This won't
    matter in the common case where all models share the same
    identity_map, but it will matter if two models have separate
    Update CHANGELOG while here.
    committed Sep 30, 2010
  2. @harukizaemon
Commits on Sep 29, 2010
  1. Update CHANGELOG

    committed Sep 29, 2010
  2. Consistency, refactoring.

    John Firebaugh committed Sep 29, 2010