Commits on Sep 1, 2010
  1. Bump version to 3.15.0

    committed Sep 1, 2010
Commits on Aug 31, 2010
  1. Only get the foreign key metadata if foreign key support is turned on

    Previously, this would fail if foreign key support was turned off,
    or if you were using a version that didn't support foreign keys.
    Also, fix the specs by resetting the foreign key support in an
    after filter. Also, clean up the specs to make them simpler and
    test both updating and deleting.
    committed Aug 31, 2010
  2. Make class MyModel < Sequel::Model(DB[:table]) reload safe

    The reason this didn't work before is because Dataset did not
    implement an appropriate hash or == method.  This commit does
    that.  Both == and hash check the database, options, and SQL
    for the dataset.  I was originally planning on having them
    check the row_proc, but that wouldn't work correctly with the
    existing implementation of Sequel::Model().
    committed Aug 31, 2010
Commits on Aug 30, 2010
Commits on Aug 29, 2010
Commits on Aug 27, 2010
  1. Add a Model.clear_setter_methods_cache method

    This is better in the long run if someone needs to clear the
    cache manually.
    committed Aug 27, 2010
  2. Cache setter methods in the model for a big speed boost

    Whenever a mass assignment is made, via .new/.create/#set/#update,
    a large part of the time was taken to determine which setter
    methods to allow.  For the common case, this can be cached in the
    model class, which yields a very nice performance improvement:
    * .create: 1.2x
    * .new: 8.5x
    * #set: 10.4x
    * #update: 1.4x
    Unfortunately, maintaining this code has a maintenance cost, as
    all the class methods that could affect the cache need to clear it,
    and you have to use method_added and singleton_method_added to
    check for someone adding their own methods.  Kind of ugly, but
    definitely worth it for the performance benefit.
    This is not full proof, as I didn't add method_removed or
    method_undefined hooks.  If you remove or undefine a setter method
    and then try to assign to it, you'll still get an exception, though
    it will probably be a NoMethodError instead of a Sequel::Error. I
    expect that use case is infrequent enough that there shouldn't be
    built in support for it.  Any affected users can use:
      MyModel.instance_variable_set(:@setter_methods, nil)
    to clear the cache manually.
    committed Aug 27, 2010
  3. Update CHANGELOG

    committed Aug 27, 2010
  4. Handle the case where the :join_table option contains an alias, from …

    …Mike Luu
    Minor change by me to cache the result.
    committed Aug 27, 2010
  5. Respect the @convert_types setting when using MSSQL bug fix

    Might not be necessary, as it is only used for the
    metadata_dataset, but still a good practice.
    committed Aug 27, 2010
  6. Work around a bug in SQL Server JDBC Driver 3.0.

    The metadata for the getColumns result set specifies an incorrect
    type for the IS_AUTOINCREMENT column. The column is a string, but the
    type is specified as a short. This causes getObject() to throw a "The conversion
    from char to SMALLINT is unsupported." Using getString() rather
    than getObject() for this column avoids the problem.
    John Firebaugh committed with Aug 27, 2010
Commits on Aug 26, 2010
  1. Update CHANGELOG

    committed Aug 26, 2010
Commits on Aug 25, 2010
  1. Don't subselect when eager graphing a model with an aliased table

    This may work better on sucky databases that don't implement
    subselects well.
    committed Aug 25, 2010
  2. Handle the case where both an implicit and explicit alias is given to…

    … join_table
    Instead of attempting to use both aliases and yielding invalid SQL,
    prefer the explicit alias.
    This adds the helper method split_alias, which is much like the
    unaliased_identifier method, except it returns an array that includes
    the alias.
    This appears to work with eager_graph, though it doesn't have much of
    an effect as eager_graph uses a subselect for an aliased join.
    committed Aug 25, 2010
Commits on Aug 24, 2010
Commits on Aug 21, 2010
  1. Switch to hosting presentations on heroku

    Most of the presentations were stored on the
    site, but were not added to the repository.  However, the MWRC 2009
    presentation was added to the repository, and this commit removes
    committed Aug 21, 2010
Commits on Aug 13, 2010
  1. Make class_table_inheritance plugin work with non integer primary key…

    …s on SQLite
    It was broken before because SQLite returns the hidden integer primary
    key on insert if the primary key is not an integer, and the plugin
    did not check for an existing primary key entry (like the standard
    insert code does).
    Also change before_create to call super last, per Sequel's convention.
    committed Aug 13, 2010
Commits on Aug 12, 2010
  1. Don't run a spec on 1.8.6 Windows

    Removing Rational broke this spec, as for some reason ruby 1.8.6
    on Windows doesn't round to the nearest second correctly, unlike
    other ruby versions.  Rather than use Rational, I'd rather just
    skip this spec on on ruby 1.8.6 on Windows.
    committed Aug 12, 2010
Commits on Aug 11, 2010
Commits on Aug 10, 2010
  1. Add :auto_increment field to column schema values on MySQL if the col…

    …umn is auto incrementing
    committed Aug 10, 2010
Commits on Aug 9, 2010
Commits on Aug 6, 2010