Permalink
Commits on Mar 1, 2011
  1. Bump version to 3.21.0

    committed Mar 1, 2011
Commits on Feb 24, 2011
  1. Update CHANGELOG

    committed Feb 24, 2011
Commits on Feb 23, 2011
Commits on Feb 22, 2011
  1. Enable row locks in Oracle

    authorNari committed Feb 22, 2011
Commits on Feb 16, 2011
  1. Prefer cover? over include? for validates_includes/validates_inclusio…

    …n_of
    
    On ruby 1.9, non-numeric ranges (such as date ranges) are treated
    differently than 1.8 in regards to include?.  In 1.8 include?
    just checked against the beginning and end of the range, now it
    checks each object in the range to see if it matches.  The 1.8
    include? behavior is now known as cover?.  This is a simple switch
    to use cover? if available, and fallback to include? if not.
    committed Feb 16, 2011
  2. Make using NULL/NOT NULL, DEFAULT, and UNIQUE column options work cor…

    …rectly on H2 and possibly Oracle
    
    Before, Sequel had a default order that it used for column
    definitions.   The columns options used UNIQUE, then NULL/NOT NULL,
    then DEFAULT.  However, that is not valid SQL92.  In SQL92, DEFAULT
    always comes before NULL/NOT NULL and UNIQUE (which are constraints).
    
    While it may not be strictly necessary, I decided to break up the
    column_definition_sql method into smaller parts with a configurable
    order, similar to how dataset queries are built.  While MySQL appears
    to work with the new default order, based on the MySQL documentation,
    NULL/NOT NULL comes before default, so I decided to change the order
    on MySQL (maybe older versions of MySQL enforce it?).
    
    This passes on SQLite, MySQL, PostgreSQL, MSSQL, and H2.  I'd greatly
    appreciate testing on other databases.  Part of the reason for this
    change is that Oracle also requires that the SQL92 behavior of
    defaults being specified before constraints.
    committed Feb 16, 2011
Commits on Feb 14, 2011
  1. Remove deprecated use of be_close from the specs

    RSpec 2 has deprecated be_close in favor of be_within.of.  This
    changes all be_close calls to be_within.of, and adds a simple
    implementation of be_within.of for RSpec 1.
    committed Feb 14, 2011
  2. Modify connection pool spec to sleep longer for rubinius, without slo…

    …wing others down
    
    Rubinius seems to require a longer sleep on the connection pool
    spec in order to work correctly.  This makes rubinius sleep 30
    times longer in that spec.  Hopefully this will reduce the
    frequency of false positives.
    committed Feb 14, 2011
  3. Make bin/sequel accept file arguments and work correctly when $stdin …

    …is not a tty
    
    Previously, unless the -m, -C, -d, or -D options was given,
    bin/sequel always gave an IRB prompt.  This changes that behavior
    so that if any arguments are present, they are interpreted as
    filenames and are loaded.  Also, if $stdin is not a tty, it is
    read from and evaled.  These changes make bin/sequel operate more
    like a standard *nix program.
    
    For recent Linux users, this also means you can have a shebang
    line such as:
    
      #!/usr/bin/sequel postgres://user:pass@host/db
    
    to create a self contained script, where you can have ruby
    code in the script, with the DB constant already set.  This
    is because recent Linux versions (since 2.6.28) support
    recursion in the #! handling.
    committed Feb 14, 2011
  4. Combine -r and -L load commands to execute in order

    Previously, -r files would be loaded before the DB constant was
    established.  Now, it holds the information in the same data
    structure as the -L option, which enables it to be loaded in
    the same order.  So if you specify -L before -r, the -L dir will
    be loaded before the -r dir is required, and vice versa.
    committed Feb 14, 2011
  5. Make the -L option take effect even if the -m, -C, -d, or -D options …

    …are used
    
    Previously, the -L option would not be loaded if one of the above
    options was used.
    committed Feb 14, 2011
  6. Add support for -I and -r options to bin/sequel

    These options work just like the options for ruby itself.
    committed Feb 14, 2011
  7. Sequel::Model.plugin can now be overridden just like the other Model …

    …methods
    
    Before Model.plugin was special, since it was defined directly on
    the class.  Now, it is defined in ClassMethods instead.  This will
    allow plugins to alter the plugin method itself.  For example, you
    could now have a plugin that changes the behavior of future
    plugins.
    committed Feb 14, 2011
  8. Add tinytds adapter, the best way to connect to MSSQL from a C based …

    …ruby running on *nix
    
    Before, the only real way to connect to MSSQL from a C based ruby
    on *nix was to use the ODBC adapter with unixodbc and freetds.
    I've heard it's a big pain to set up, and never attempted to do
    so myself.  Fortunately, tiny_tds was released recently and makes
    it simple.
    
    Thanks to metaskills from the tiny_tds project for making changes
    to tiny_tds to better support Sequel.
    committed Feb 11, 2011
Commits on Feb 11, 2011
  1. Use block-structured #statement method consistently.

    John Firebaugh committed Nov 29, 2010
  2. Update CHANGELOG

    committed Feb 11, 2011
  3. Only clear the associations if the foreign key value actually changes

    Also, split the def_many_to_one method override into two methods.
    committed Feb 11, 2011
  4. Bump copyright year

    committed Feb 11, 2011
Commits on Feb 10, 2011
  1. Add AssociationAutoreloading plugin.

    The AssociationAutoreloading plugin makes many_to_one association
    accessor methods automatically reload the cached object whenever
    the association's foreign key is modified:
    
       album = Album.first
       album.artist_id #=> 1
       album.artist # caches associated artist
       album.artist_id = 2
       album.artist # reloads associated artist
    John Firebaugh committed Feb 10, 2011
Commits on Feb 9, 2011
  1. Support RSpec 2, keeping backwards compatibility with RSpec 1

    This updates the Rakefile and specs to use the new
    class names and methods for RSpec 2, and removes the
    use of context in favor of describe.  Future updates
    to the specs should only use describe and should work
    correctly under both RSpec 1 and RSpec 2.
    committed Feb 9, 2011
  2. Pass along block in join_table overrides.

    John Firebaugh committed Feb 9, 2011
  3. Support CTEs in joined datasets on SQL Server.

    SQL Server does not support CTEs on subqueries, so move any CTEs
    on joined datasets to the top level. The user is responsible for
    resolving any name clashes this may cause.
    John Firebaugh committed Feb 8, 2011
Commits on Feb 8, 2011
  1. Added comment about DELIMIDENT to documentation

    Chris Salch committed with Feb 8, 2011