Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Commits on Mar 1, 2012
  1. Bump version to 3.33.0

Commits on Feb 29, 2012
  1. Set provides_accurate_rows_matched? correctly on mysql and mysql2 ada…

    The fix was already in earlier this month, but this change is
    required so the model will check for an accurate number of rows.
    Since do/mysql is the only adapter that doesn't support it, just
    move the override to the adapter.
  2. Reference json_class in the :naked option for the json_serializer plugin

    This should make it easy to grep, since most people looking to
    disable the json_class entry will grep for json_class and not
Commits on Feb 28, 2012
  1. Add ability to disable transaction use in migrations

    This commit gives you two separate ways to disable transaction use in
    migrations.  The recommended way to disable them is on a per
    migration basis by calling no_transaction inside the
    Sequel.migration block.  You can also either disable them completely
    at the migrator level by passing a :use_transactions=>false option
    to  Likewise, you can force the use of transactions
    even when no_transaction is set by using :use_transactions=>true.
    While here, add the ability to choose the migrator class to use
    by specifying it directly instead of having guess it.
    For example, to force use of the TimestampMigrator, you would call
Commits on Feb 27, 2012
  1. Add arbitrary_servers extension for connecting to arbitrary servers

    With this extension, you just pass a hash of connection options that
    get merged into the default options.  It's designed to work well
    with the server block plugin, making it possible for to use arbitrary
    servers easily, such as per-request in a web framework.
    As you can't be sure if the arbitrary server will be needed again
    do not cache the connection, disconnect as soon as the connection
    is finished being used.
Commits on Feb 25, 2012
  1. Make mock adapter escape non-Symbol shards

    Use inspect instead of to_s, so non-Symbol shards show up nicely.
  2. Allow Database#server_opts to take a Hash

    If the argument isn't already in servers, just merge the hash into
    the main options.  This will be used shortly.
  3. Add a server_block extension for scoping database access inside a blo…

    …ck to specific shards
    Multiple people have asked for this over the years, but I only
    recently thought of a good way to do this.  This adds some
    slight refactoring to the connection pools to move the code
    the transforms the given server/shard name into the actual
    server/shard name into it's own method (named pick_server).
    The extension then overrides the method so it will use
    a different default server if one has been defined and no
    specific shard has been set.  To handle nested of blocks,
    the different default servers are stored in an array
    (thread-local in the threaded case), which is used as a
    stack with the current default as the last entry.
Commits on Feb 22, 2012
  1. Use Mysql2::Client::FOUND_ROWS to get accurate number of rows matched…

    … in the mysql2 adapter
    Thanks to brianmario and tenderlove for this.
  2. Use Mysql#info to get accurate number of rows matched in the mysql ad…

    This is kind of ugly, as it requires parsing the information out
    of a string using a regular expression.  However, there does not
    appear to be another way to get the information.
    Unfortunately, neither do_mysql nor mysql2 appear to offer a way
    to get an accurate number of rows matched.
  3. Make mock adapter with specific SQL dialect use appropriate defaults …

    …for quoting identifiers
    The specs set global defaults, which override the defaults used by
    the mock adapter.  So unset the global defaults for the related
    spec in order to test the appropriate default handling.
  4. Allow savepoints in prepared transactions on MySQL 5.5.0-5.5.12

    authored indicates that this bug
    is not present in 5.5.12, though it is present in 5.5.15.  Not
    sure the exact version it broke in, or when it will be fixed,
    so just allow for <= 5.5.12 for now.
  5. Make list plugin automatically set position field value on creation i…

    …f not already set
    Before, if you did not set the position field manually, you could
    break the functionality of the plugin, and the requirement to do
    so was not mentioned in the plugin itself.
    While here, add a note to the documentation about the race
    conditions that exist in the plugin.
Commits on Feb 21, 2012
  1. Typecast columns stored as integers/floats in the SQLite adapter

    Before on SQLite, only column values stored with the TEXT/BLOB
    storage class where typecasted.  Column values stored via the
    INTEGER/REAL storage class were returned as ruby Integer/Float
    values, and were not subject to typecasting.  However, in some
    cases, you want to convert such values.  For example, if you
    want to store boolean values as 1/0 integers (which SQLite
    recommends), those values are stored in the INTEGER storage
    class, and the integer needs to be converted to a boolean.
    Likewise, if you store date/time/datetime values with the
    INTEGER/REAL storage classes, they should be returned as
    Date/Time/SQLTime/DateTime values.
    Since SQLite recommends that booleans be stored as 1/0, add
    an integer_booleans setting to SQLite databases that stores
    the boolean values using integers.  Currently, only the
    native sqlite adapter correctly converts the integers to
    booleans on retrieval, though.
    The integer_booleans setting currently defaults to false,
    but that could possibly change in a newer version of Sequel,
    so if you care about how booleans are stored, set the desired
    default manually.
    Any custom type conversion procs used by the SQLite adapter
    need to be modified so that they work with both String,
    Integer, and Float values.
  2. Remove gem check in sqlite adapter

    Sequel no longer uses the type_translation method, and I think it
    will be removed in a future version.  Also, the sqlite3-ruby gem
    got renamed to sqlite3.  This code was originally written to
    provide a better error message for people who used the sqlite3
    gem before sqlite3-ruby got renamed, but I don't think it serves
    a purpose any more.
  3. In the instance_hooks plugin, (before|after)_*_hook instance methods …

    …now return self
    This makes it possible to use these methods as part of a method
    chain.  Before, they didn't return a useful value.
  4. Cleanup NaN/Infinity PostgreSQL support

    Use a case statement instead of if/elsif chain for double the
    performance. As only the postgres adapter has code to handle
    transforming the values on retrieval, guard the related specs
  5. @kf8a

    added tests for actual inserting and found the float translator neede…

    kf8a authored
    …d to modified to account for nan and infinity
Commits on Feb 20, 2012
  1. @kf8a
Commits on Feb 15, 2012
Commits on Feb 14, 2012
  1. Cleanup create/drop schema commit and update CHANGELOG

    The schema name needs to be quoted, and we should be checking the
    method actually works, not just that it produces the expected SQL.
  2. @tkellen
  3. @tkellen
Commits on Feb 7, 2012
Commits on Feb 6, 2012
  1. Add Database#supports_savepoints_in_prepared_transactions?, false on …

    …MySQL 5.5 (Fixes #437)
    MySQL 5.5 appears not to like savepoints in prepared transactions,
    which MySQL 5.1 (and I think 5.0) do not have a problem with. Add
    an additional method to check the support for savepoint/prepared
    transactions combination, and set it to false on MySQL 5.5+.
    While here, only support prepared transactions and savepoints on
    MySQL 5.0+.  I never test on MySQL < 5.0, but I don't think earlier
    versions support those features.
  2. Support an identifier output method in the mysql2 adapter

    Using an identifier output method makes the adapter significantly
    slower, since it has to create a new hash, but at least it still
    works correctly.  There should be no measureable decrease in
    performance if you don't have an identifier output method.
Something went wrong with that request. Please try again.