Permalink
Commits on Jul 1, 2011
  1. Bump version to 3.25.0

    jeremyevans committed Jul 1, 2011
Commits on Jun 28, 2011
  1. Work with tinytds 0.4.5

    jeremyevans committed Jun 28, 2011
    This removes the copying of the :host option to the :dataserver
    option when using the tinytds adapter.  That worked fine for previous
    versions of tiny_tds, but no longer works with 0.4.5.
    
    This breaks backwards compatibility with previous connection urls
    where the freetds.conf name was specified as the :host.  To use
    an entry in the freetds.conf file, you must now provide the
    :dataserver option.
    
    Unfortunately, tinytds 0.4.5 does not work with FreeTDS 0.91rc1, you
    have to use FreeTDS 0.91rc2 or an older version of FreeTDS such as
    0.82 (and older versions require the use of the freetds.conf file).
    
    Since 0.4.5 is now required, switch to using active? instead of
    closed? and dead? to detect disconnects.
Commits on Jun 27, 2011
  1. Make association_pks plugin typecast provided values to integer if th…

    jeremyevans committed Jun 27, 2011
    …e primary key column type is integer
    
    When used in a web application, an array of strings will often be
    provided instead of an array of integers.  This can cause issues
    such as not recognizing which items are already associated.
Commits on Jun 17, 2011
Commits on Jun 9, 2011
  1. Model.set_dataset now accepts Identifier, QualifiedIdentifier, and Al…

    jeremyevans committed Jun 9, 2011
    …iasedExpression arguments
Commits on Jun 8, 2011
  1. Fix handling of nil bound variable arguments in the jdbc postgres sub…

    jeremyevans committed Jun 8, 2011
    …adapter
    
    The change made to fix stored procedure arguments on SQL Server
    and Oracle appears to not work on PostgreSQL.  Leave the default
    the same but override the handling for nil values in the jdbc
    PostgreSQL subadapter.
  2. Fix handling of nil values in stored procedure arguments in the jdbc …

    jeremyevans committed Jun 8, 2011
    …adapter
    
    I've tested this on MySQL, and Wei reports that it works on SQL
    Server and probably Oracle as well.  It does sound like setNull
    should work, but Sequel doesn't know the actual type of the
    column and JavaSQL::Types::NULL doesn't appear to work in all
    cases.
  3. Allow treating Datasets as Expressions, e.g. DB[:table1].select(:colu…

    jeremyevans committed Jun 8, 2011
    …mn1) > DB[:table2].select(:column2)
    
    This includes many of the modules in Sequel::SQL in Sequel::Dataset,
    allowing you to treat a dataset as an expression.  Sequel had
    already implemented Dataset#as, that is being removed and instead
    AliasMethods is being used to implement it.
Commits on Jun 7, 2011
  1. Move some more specs from database_spec to schema_spec

    jeremyevans committed Jun 7, 2011
    Add a spec for Database#drop_column with :cascade.
    
    Also, move some classes to spec_helper.  Inline classes in
    multithousand line spec files are not a good thing.
  2. Support :cascade option to #drop_column and #drop_constraint

    jeremyevans committed Jun 7, 2011
    Of the databases I looked at, only PostgreSQL supports this, but
    it is in SQL92, so I don't have a problem adding it.
  3. Support :cascade option to Database#drop_table and #drop_view for usi…

    jeremyevans committed Jun 7, 2011
    …ng CASCADE
    
    This makes drop_table and drop_view accept an options hash as the
    final argument.  Currently they only support the :cascade=>true
    option for turning on CASCADE.
    
    No longer use CASCADE unilaterally when dropping tables on
    PostgreSQL.  This breaks backwards compatibility, but is in my
    mind the sanest choice.  CASCADE is a dangerous option, and
    using it implicitly is a bad idea.  The usage of CASCADE by
    default dates back to the original import of Sequel code into
    the subversion repository on February 28, 2007.
    
    This adds the private drop_view_sql method, and makes drop_table_sql
    take two arguments.
    
    This also moves some schema related specs to the schema_spec file.
  4. Fix typo in RDoc

    jeremyevans committed Jun 7, 2011
  5. If validation error messages are LiteralStrings, don't add the column…

    jeremyevans committed Jun 7, 2011
    … name to them in Errors#full_messages
    
    Feature requested by Andic on the Google Group, abuse of the
    LiteralString class was my own idea.
  6. Fix bug loading plugins on 1.9 where ::ClassMethods, ::InstanceMethod…

    jeremyevans committed Jun 7, 2011
    …s, or ::DatasetMethods is defined
    
    Thanks to Mikhail Shirkov on the Google Group for pointing this bug
    out and suggesting the fix.
Commits on Jun 3, 2011
  1. Add Dataset#exclude_where and Dataset#exclude_having methods, so you …

    jeremyevans committed Jun 3, 2011
    …can force use of having or where clause
    
    This also adds the private Dataset#_filter_or_exclude method to
    reduce duplication.
  2. Allow Dataset#select_all to take table name arguments and select all …

    jeremyevans committed Jun 3, 2011
    …columns from each given table
  3. Add Dataset#select_group method, for selecting and grouping on the sa…

    jeremyevans committed Jun 3, 2011
    …me columns
    
    Refactor group_and_count to use select_group.
  4. Add a private Dataset#virtual_row_columns method for adding virtual c…

    jeremyevans committed Jun 3, 2011
    …olumns
    
    This changes how columns are added by using Array#concat to extend
    the existing array instead of Array#+ to create a new array.  However,
    as all methods that call it use *columns to get the columns, there
    is no risk of modifying a passed in argument.
  5. Ignore index creation errors if using create_table? with the IF NOT E…

    jeremyevans committed Jun 3, 2011
    …XISTS syntax (Fixes #362), bump version to 3.24.1
Commits on Jun 2, 2011
Commits on Jun 1, 2011
  1. Bump version to 3.24.0

    jeremyevans committed Jun 1, 2011
Commits on May 31, 2011
Commits on May 26, 2011
  1. Add prepared_statements_association plugin, for using prepared statem…

    jeremyevans committed May 26, 2011
    …ents by default for regular association loading
    
    This is similar to the prepared_statements_with_pk plugin, as it
    also uses Dataset#unbind, but it should be more safe as it skips
    using a prepared statement completely if it detects that there
    are association options that it does not handle.