Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Commits on Jul 7, 2009
  1. Much better support for Microsoft SQL Server

    This substantial commit provides much better support for Microsoft
    SQL Server.  Specific MSSQL subadapters were added for the ado, odbc,
    and jdbc adapters.  Mostly the subadapters involve getting insert
    working properly to return the last inserted id.
    While making these changes I've noticed that the ado adapter has huge
    problems, enough so that I wouldn't recommend that anyone use it.  It
    doesn't use a stable native connection, which means it can't work
    correctly with transactions.  It requires a pretty ugly hack to get
    insert to return the id inserted.
    Transactions on ado now unconditionally yield nil.  I thought about
    them raising an exception instead, but that would make the ado
    adapter not work well with models (without fiddling).  It's possible
    the behavior will be changed in the future.
    As bad as the ado adapter is now, it's still much better than before.
    Before, the ado adapter would run all queries twice when fetching
    rows, and if you did any nonidempotent actions inside the SQL, you'd
    have problems (as I found out when I used the ugly hack to get
    insert to return the id inserted).
    The ado and odbc adapters now catch the native exceptions and raise
    Sequel::DatabaseError exceptions.  Also, the behavior to handle
    blank identifiers has been standardized.  Sequel will now assume an
    identifier of 'untitled' if a blank identifier is given.
    The shared MSSQL adapter now supports Database#tables and
    Database#schema, using the INFORMATION_SCHEMA views (very similarly
    to what was used in Sequel 2.0).  Now, it also supports add_column,
    rename_column, set_columns_type, set_column_null, and
    The shared MSSQL's schema method doesn't include primary key info, so
    some of the model logic changed so that it doesn't try to set
    no primary key unless all schema hashes include a primary key entry.
    The shared MSSQL adapter now uses the datetime type instead of the
    timestamp type for generic datetimes, and uses bit and image for
    boolean and file types.  It uses 0 and 1 for false and true, and
    no longer attempts to use IS TRUE.
    The odbc adapter's literal_time method has been fixed.
    In order to ease the connection to MSSQL servers with instances
    using a connection string, Sequel now will unescape URL parts. So the
    following now works:
    The ado adapter specs were removed, because the ado adapter itself
    doesn't really have any specific behavior that should be tested.  Now
    that Sequel has the generic integration tests, those should be used
    instead.  I removed the spec_ado rake task. and replaced it with a
    spec_firebird rake task.
    Here's the results for integration testing on MSSQL with each
    * ado: 115 examples, 42 failures
    * jdbc: 117 examples, 22 failures
    * odbc: 115 examples, 19 failures
    Many of the remaining failures are due to the fact that some tests
    try to insert values into an autoincrementing primary key field,
    which MSSQL doesn't allow.  Those tests should be refactored unless
    they are explicitly testing that feature.
Commits on Jun 4, 2009
  1. Have the adapter specs also run the integration tests

    The integration tests can also be thought of as generic adapter
    specs.  In my testing, I was always running both the adapter specs
    and the integration tests.  Combining them should make my test suite
    run faster (especially the JRuby tests because of the startup time).
    Implementation is fairly simple, just assigning the adapter database
    constant to the integration database constant and including the
    integration spec files.
    The integration rake task stays, for backwards compatibility and
    because some adapters don't have adapter specs (e.g. H2 on JDBC).
    Combining the two is what helped me find the PostgreSQL
    Database#indexes problem.
    Finally, change the start_logging/stop_logging helper methods to
    a single log method that takes a block.  Almost always I use the
    logging methods when debugging where an exception is raised,
    and the log method makes that a lot easier.
Commits on Apr 21, 2009
Commits on Apr 2, 2009
  1. Cleanup Rakefile and use new rdoc format for website

    The website now will have 3 separate rdoc sections, one for
    core/model, one for adapters, and one for extensions/plugins.
    I think this will make the RDoc less cluttered and more approachable.
    The Rakefile website and website_rdoc tasks are now able to generate
    a fully functional local version of the site.  In order for this to
    work, I changed all of the internal website links to relative links
    instead of the absolute links used previously.
    You can now use the Rakefile without rspec installed, though obviously
    you can't use the spec tasks.  I refactored the Rakefile to use
    lambdas to reduce the amount of work done just by parsing the
    Rakefile, by only running code inside the tasks that need it.
    I removed the install_no_docs task.  If anyone really wants it I can
    add it back.
    I made the .gitignore patterns absolute.  I don't think this will
    cause any problems, and with normal usage of the sequel repository,
    there should be no effect.
    This commit changes the website task to only generate the base
    website, and adds a website_rdoc task to generate the 3 rdoc
    pages.  You now need to use the website_rf task to update the site.  As I'm the only person that does
    that, I don't expect any complaints.  I'm also switching the
    website upload to use rsync instead of scp, to improve the speed.
Commits on Mar 13, 2009
  1. Move spec/sequel_{core,model} to spec/{core,model}

    This commit also adds the deprec helper method to
    spec/core/spec_helper.rb.  A few spec_core specs were previously
    broken because of this.  I usually run the full test suite (since
    that is rake default task), which is why I didn't notice this
  2. Merge sequel_core directory into sequel directory

    This is the first half of the merge, the merge of sequel_model into
    sequel will come next.  I'm going this because it makes things
    cleaner.  I've wanted to do this for a while, but it wasn't worth
    the minor breakage.  Now that Sequel 3.0 is coming soon, it seemed
    like a good time.
    To make life easier and to allow for more flexibility, I'm adding
    a Sequel.require method that simplifies requiring multiple files.
    It also only loads files in the same directory or a subdirectory
    of the directory containing lib/sequel/core.rb.  Sequel used to do
    this many moons ago, and I removed it to give users more flexibility
    to override stuff.  I've come to the conclusion that removing it
    caused more problems than it solved.  There have been a couple of
    cases during the recent refactoring where I got obscure errors
    because I deleted a file but still had it required somewhere, and it
    loaded a file in a previous gem.  If people want to customize sequel,
    they should fork the repository or unpack the gem to make their
    This requires simple changes to all adapters.  I hope I didn't screw
    anything up, but it should be easy to fix if I did.
    This also fixes a reference to Schema::SQL in the shared MySQL
Commits on Mar 8, 2009
  1. Move caching, hook class methods, and STI into plugins, deprecate old…

    … methods of using them
    This large commit was necessary because caching and STI both depended
    on the hook class methods.
    This commit refactors the plugin support to try loading plugins from
    sequel/plugins/plugin_name before sequel_plugin_name.  It also makes
    the plugins code use Model::ClassMethods.
    This commit moves Sequel::Model constants and instance variables to
    sequel_model.rb, so they will be loaded before other files.
    This commit refactors Model. inherited because
    subclass.superclass == self, and to remove the hook class method
    and STI stuff.
    This commit removes the PRIVATE_HOOKS, before_update_values and
    before_delete.  They are not needed as with the recent commits, you
    can just override update_values and delete in the InstanceMethods
    plugin submodule, do the hook stuff and then call super.
    Finally, this commit adds a spec_plugin rake task.  It's not
    possible to run the specs for the plugins/extensions in the same
    task as the model/core specs, because the plugin specs may modify
    the workings of model/core, and those changes can't be a factor
    when running the model/core specs.  All plugins and extensions are
    loaded and tested simultaneously, in order to make sure they all
    work together (currently fairly easy, as they all were available
    by default).
Commits on Feb 19, 2009
Commits on Jan 12, 2009
  1. @pusewicz
  2. Bump version to 2.9.0

Commits on Dec 6, 2008
  1. Bump version to 2.8.0

Commits on Nov 4, 2008
  1. Fix PostgreSQL Date optimization so that it doesn't reject dates like…

    … 11/03/2008, bump version
    It turns out the PostgreSQL optimization for dates went too far.
    I should have only changed the output format specification, not
    the input/output specification for year/month/day ordering.  It
    turns out this breaks the standard American date format.  This is a
    significant enough bug that it warrants a new release, so I'm also
    bumping the version to 2.7.1.
  2. Bump version to 2.7.0

Commits on Oct 12, 2008
  1. Bump version to 2.6.0

Commits on Sep 11, 2008
Commits on Sep 3, 2008
  1. Bump version to 2.5.0

Commits on Aug 6, 2008
  1. Bump version to 2.4.0

Commits on Aug 5, 2008
  1. Use boof's website design for

    Instead of just hosting the RDoc at, have an
    actual website, based on boof's design for
    However, drop the Rails project and instead create a plain html site
    generated with a simple script, a single template, and ERB.
    Also, add a fifth main feature to the README, showing off the
    improvements coming in 2.4.0.
Commits on Jul 25, 2008
Commits on Jul 22, 2008
  1. Fixed empty datasets in ADO adapter

    unknown authored
Commits on Jul 7, 2008
  1. Add integration test suite, testing sequel against a real database, w…

    …ith nothing mocked
    After a long wait, I've finally put together an integration test
    suite for sequel.  Currently, it only covers the examples shown in
    the advanced_associations.rdoc file, but hopefully now that it is
    here, more people will contribute real specs.
    The integration specs have two ways of running, one where the
    database is specified, and one where it is not.  If the database is
    not specified, it uses a sqlite memory database, and addition to
    checking for the correct functionality, it also checks that the
    correct SQL is being issued to the server.  If the database is
    specified, it uses that database and ignores the SQL (since it can
    be different depending on the database).  This gives the best of
    both worlds, the ability to check that sequel works with real
    databases, and the ability to see what SQL sequel is actual issuing
    to the server when nothing is mocked.  Incidently, a prototype of
    this test suite is what helped me discover the Database#columns bug.
    You can run the integration test suite with "rake integration", and
    configure it via the INTEGRATION_URL constant in spec_config.rb, or
    via the SEQUEL_INTEGRATION_URL environment variable.
    While here, change the MYSQL_DB and POSTGRES_DB examples in
    spec_config.rb to MYSQL_URL and POSTGRES_URL, as it is preferable to
    use the URL instead of DB constant.
  2. Combine sequel and sequel_core into one gem

    For merging the READMEs, I put the model README at the bottom of the
    core README and used that.
    For merging the CHANGELOGs, I merged them manually back to 1.4.0, and
    copied the rest of the model CHANGELOG to the bottom of the file.
    Most of the Rakefile code was duplicative, but I think I got
    all tasks except spec_adapters.  I figure few people have all 5
    adapters necessary to run the adapter specs.  I only have 3 of them,
    so I never used spec_adapters.
    The specs are still split up so they can be run independently.
    Additionally, the adapter specs are split off from the core specs,
    which helps if you want to put Sequel.connect lines in
    spec_config.rb. The only other spec changes were for path changes.
    There weren't conflicts merging anything else, IIRC.
    I hope there is no fallout from this.  I haven't noticed any yet,
    running the specs and the test suites for all of my apps that use
Commits on Jun 1, 2008
  1. Bump version to 2.0.0

Commits on May 22, 2008
  1. Add dataset_filtering.rdoc, using the Wiki and adding info on blockle…

    …ss filters
    Add the doc/*.rdoc files to the list of RDoc files
  2. (Re)?move some files and fix RDoc clean tasks

    Move stats.rb file from both sequel/extra and sequel_core/extra
    subdirectories, place in the extra directory in the root of the
    Move the stress tests from sequel_core/stress to extra/stress.
    Remove the postgres_perf.rb stress test.
    Remove the TODO files, since I don't plan on implementing the
    suggestions therein.
    Remove the autotest files.
    Remove the sequel_core/examples files.
    Make the clean tests delete the temporary directories created,
    such as pkg, rdoc, and coverage.
  3. Refactor RDoc creation and options in Rakefiles

    This should fix the problem of gems not having the correct RDoc options.
    The directory structure is changing so that RDoc is now stored in rdoc
    instead of doc/rdoc.  This is because doc is now going to hold
    additional documentation files.
Commits on Apr 30, 2008
Commits on Apr 23, 2008
Commits on Apr 13, 2008
Commits on Apr 9, 2008
Commits on Apr 8, 2008
Something went wrong with that request. Please try again.