Permalink
Commits on Nov 1, 2011
  1. Bump version to 3.29.0

    jeremyevans committed Nov 1, 2011
Commits on Oct 31, 2011
  1. Allow Model.dataset_module to take a Module instance

    jeremyevans committed Oct 31, 2011
    This makes it easy to take an existing module and extend a
    model's dataset with it.
  2. Fix Model.[] optimization when dataset uses identifier_input_method d…

    jeremyevans committed Oct 31, 2011
    …ifferent than database
    
    Previously, the optimized Model.[] case used the wrong primary key
    if the dataset had a different identifier_input_method than the
    database.  Also, the Model.[] optimization was not applied if you
    gave a dataset to set_dataset.  Now, the optimization is applied
    if the dataset is a simple select * from a table.
Commits on Oct 28, 2011
  1. Work around pragma bug on jdbc/sqlite when emulating alter table support

    jeremyevans committed Oct 28, 2011
    Also, add a couple of guards for jdbc/sqlite, since with the
    latest gem the tests now run to completion.
  2. Remove empty RDoc line

    jeremyevans committed Oct 28, 2011
  3. Database#<< and Dataset#<< now return self so they can be safely chained

    jeremyevans committed Oct 28, 2011
    This breaks backward compatibility, as Database#<< used to return
    nil and Dataset#<< used to return the value of insert.  However,
    this change follows the principle of least surprise, and makes the
    methods more useful:
    
      DB << "UPADTE albums SET artist_id = NULL" << "DROP TABLE artists"
      DB[:t] << {:id=>0, :name=>'Zero'} << DB[:old_t].select(:id, name)
  4. Cleanup plugins_spec

    jeremyevans committed Oct 28, 2011
  5. Cleanup hooks_spec

    jeremyevans committed Oct 28, 2011
  6. Fix typo in RDoc

    jeremyevans committed Oct 28, 2011
Commits on Oct 27, 2011
Commits on Oct 26, 2011
  1. Fully support using an aliased table name as the :join_table option f…

    jeremyevans committed Oct 26, 2011
    …or a many_to_many association
    
    Previously, Sequel only had very little support for providing the
    :join_table option as an aliased name (e.g. :table___alias).  This
    isn't a problem in most code, as about the only time you would need
    to do this is using a self-referential association where the join
    table is the same as the current or associated table (or both).
    The simplest example is a tree structure using a many_to_many to
    get all grandchild nodes.
    
    This adds join_table_alias and join_table_source methods to the
    many_to_many association reflection.  join_table_alias was already
    available via the associated_key_table method, so make that just
    an alias for join_table_alias.  join_table_source is the source
    without the alias, join_table_alias is the alias, or the source
    if there is no alias.
    
    Because of possible join table aliasing, the :qualified_right_key
    entry in the many_to_many association reflection now must be
    dynamic, so use the qualified_right_key method to get it.
    
    Because of how the eager_grapher proc works, the alias for the
    associated table is produced before the alias to the join table,
    but the join table is joined to the dataset before the associated
    table is joined.  This means that Dataset#unused_table_alias
    wouldn't correctly handle the case where you alias the join table
    to the same name as the associated table.  Fix this by adding an
    optional second argument to unused_table_alias specifying the
    default aliases to considered already used.
  2. Remove the check constraint on boolean columns from the shared oracle…

    jeremyevans committed Oct 26, 2011
    … adapter
    
    Sequel doesn't set up similar constraints on the emulated boolean
    columns on other databases, and should not be forcing the user
    to use Y/N, when they could use T/F or 1/0, or something else.
Commits on Oct 25, 2011
  1. Cleanup base_spec.rb

    jeremyevans committed Oct 25, 2011