Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Commits on Oct 31, 2012
  1. Add bin/sequel usage guide

    The command line usage (-h) output is pretty slim, and many
    interesting features were only mentioned in past release notes.
    This offers a central location for bin/sequel information.
    Currently, the explanations are fairly brief, but I'll certainly
    consider expanding the explanations if I get some specific
Commits on Oct 24, 2012
  1. Add connection_validator extension for automatically checking connect…

    …ions and transparently handling disconnects
    This extension is primarily designed for users whose idle
    database connections are automatically disconnected from the
    database after a given period of time.  However, it can also
    be used to handle all disconnects by validating connections
    at every checkout, though that may hurt performance significantly.
    This shouldn't cause any problems with transactions or special
    connection states, since code that relies on either isn't even
    yielded a connection until after the validation check has been
Commits on Oct 21, 2012
  1. @sdepold
Commits on Oct 19, 2012
  1. @sdepold

    added sequel-bit-fields

    sdepold authored
Commits on Aug 16, 2012
  1. Add constraint_validations extension and plugin

    The extension allows you to create database constraints that mirror
    model validations when creating and altering tables.  It adds
    validation metadata to a separate table.  The plugin reads the
    metadata from that table, and uses it to automatically validate your
    models before saving.
    The advantage to doing so is that your validations are only specified
    in one place, but are enforced both at the model level and at the
    database level.  This is better for data integrity, since it
    enforces the validation for all rows in the database, so changes
    made by external programs or via the dataset layer are still
Commits on Jul 23, 2012
Commits on Jul 20, 2012
  1. Add support for PostgreSQL row-valued types

    The adapter specs for these were all interrelated, so it was
    easiest to combine them all into a single commit.
Commits on Jul 13, 2012
  1. Organize Sequel 3 release notes better on documentation page

    Instead of having one really long line, try to limit the
    release notes links to 10 per line.
  2. Organize documentation page on website

    Instead of a single list of ~25 links, separate the links by
    section so it is less overwhelming for users.
  3. Add document describing the core extensions

    Also, link to this document from some other documents, including
    the README, so that new users can be exposed to the core extensions
Commits on Jun 27, 2012
  1. Add pg_interval extension, for returning interval types as ActiveSupp…

    …ort::Duration instances
    Implementation is similar to the pg_inet extension, though it uses a
    Regexp parser similar to the pg_range extension.
    This is mostly useful if you want to take intervals stored in your
    PostgreSQL database and use them in calculations involving ruby Time
    or DateTime instances.
    While adding adapter specs, do some minor cleanup using
    Database#extension instead of Sequel.extension.
Commits on Jun 21, 2012
  1. Add pg_range_ops extension for DSL support for PostgreSQL range opera…

    …tors and functions
    This is modeled after the pg_array_ops and pg_hstore_ops extensions.
    While here, cleanup the plugins page for better consistency in the
    extension descriptions.
Commits on Jun 14, 2012
  1. Add split_array_nil extension, for compiling :col=>[1, nil] to col IN…

    … (1) OR col IS NULL
    This has been requested a couple times in the last year.  I don't
    think it's a good idea by default, which is why it's being
    implemented as an extension.
Commits on Jun 13, 2012
  1. Add pg_range extension, for dealing with PostgreSQL 9.2+ range types

    Range types are a new feature in PostgreSQL 9.2.  They are similar
    to ruby's Range class, but significantly more flexible.  Because
    not all PostgreSQL Ranges can be converted to ruby Range objects,
    the PGRange class is not a DelegateClass of Range, but a plain
    subclass of Object.  However, in many cases it acts similarly to
    a delegate class, as least if the PGRange can be represented by
    a ruby Range.  Otherwise, this extension is similar to the other
    Sequel pg_* extensions.
Commits on Jun 6, 2012
  1. Add eval_inspect extension, which makes Sequel::SQL::Expression#inspe…

    …ct attempt to return a string suitable for eval
    This extension is definitely not bullet proof, as there are a lot
    of cases it does not handle.  However, in most simple cases it
    allows you to take an arbitrary Sequel expression and have
    inspect on it return a string that when evaled will produce an
    equivalent object.
Commits on May 29, 2012
Commits on May 27, 2012
Commits on May 24, 2012
  1. Add pg_inet extension, for working with PostgreSQL inet and cidr types

    ActiveRecord added this support recently, and I think it's a
    worthwhile extension to have.
  2. Add eager_each plugin, which makes each on an eagerly loaded dataset …

    …do eager loading
    This behavior has been requested by multiple people over the years.
    I've always been against changing having all call a method other
    than each for eager loading.  I just recently thought of this
    approach, which doesn't require any changes to the core of Sequel.
Commits on May 23, 2012
Commits on Apr 26, 2012
Commits on Apr 20, 2012
Commits on Mar 28, 2012
  1. Add query_literals extension for treating regular strings like litera…

    …l strings in select, group, and order methods
    Sequel's default behavior for these methods, while generally
    consistent internally, is not consistent with the filter handling,
    and I think the filter handling is much more user friendly. If
    there ever is a Sequel 4, it will definitely act this way by
    For SELECT, I sort of understand the default, since selecting
    literal strings can have some uses.  However, since Sequel uses
    hashes and literal strings without aliases aren't really a good
    idea (since you can't control the identifier used), that use
    case is going to be very uncommon.  Both GROUP and ORDER don't
    appear to accept non-integer constants on PostgreSQL (though
    SQLite accepts them), so I can't imagine any breakage there.
    While the usage of literal strings leads to less database
    independent code and less opportunities for introspection, it's
    not necessarily a bad thing in all use cases.  This makes it
    easier to use literal strings in SELECT, GROUP, and ORDER without
    the core extensions' String#lit or Sequel.lit.
  2. Give direct links to release note pages on website

    This is a lot nicer than just directing them to the directory
    index page.
Commits on Mar 27, 2012
  1. The core extensions have now been made a real Sequel extension (still…

    … loaded by default)
    This moves the core_sql.rb file into a real extension that is loaded
    by Sequel.extension.  For backwards compatibility, this extension is
    still loaded by default.
Commits on Mar 23, 2012
  1. Add select_remove extension which adds Dataset#select_remove for remo…

    …ving columns/expressions from a dataset selection
    I don't think this will be used often enough to go into core
    Sequel, and it also has some corner cases that can't be handled
    correctly.  However, some people have been asking for it, and it's
    not the simplest thing to get correct by hand even for the cases
    it does handle correctly, so I think shipping this extension with
    Sequel makes sense.
  2. Add static_cache plugin, for staticly caching all model instances, us…

    …eful for model tables that don't change
    This plugin provides a major speedup for models whose underlying
    dataset is static.  It's designed to work well with the the
    recently committed many_to_one_pk_lookup plugin.
Commits on Mar 22, 2012
  1. Add many_to_one_pk_lookup plugin, for using a simple primary key look…

    …up for many_to_one associations (great with caching)
    This can be a major speed boost to models that have many_to_one
    associations to associated models that use caching, because it
    will generally use a cached lookup first.
Commits on Mar 15, 2012
  1. Add null_dataset extension, for creating a dataset that never issues …

    …a database query
    This is another feature that ActiveRecord will be adding in 4.0.
    Basically, it's the null object pattern for datasets, so you can
    create a dataset that never returns any rows (or issues other
    This is easily implemented as an extension, where Dataset#nullify
    just extends the cloned dataset with a module.
    Note that there may be corner cases on some adapters when using
    non-standard dataset methods.  Those can be dealt with on a
    case by case basis.
Commits on Mar 14, 2012
  1. Add schema_caching extension, to speed up loading a large number of m…

    …odels by loading cached schema information from a file
    This idea is taken from ActiveRecord, which will be adding the
    feature in 4.0.  Basically, when loading a large number of
    models, there may be significant time spent loading the table
    schema for each table from the database, especially in high
    latency situations.
    To work around this, you can cheat by caching the information to
    a file, and then loading the cached file instead of querying the
    database for each table/model, which is what this extension does.
    To make it easy to generate the cached schema files, an -S option
    is being added to bin/sequel that creates the cached schema dump
    file.  It's up to the application to use load_schema_cache to
    preload the schema cache.
Commits on Mar 13, 2012
  1. Add pg_hstore_ops extension, for easily calling PostgreSQL hstore fun…

    …ctions and operators
    Same idea here as pg_array_ops, but this is for hstore operators
    and functions instead of array operators and functions.
Commits on Mar 12, 2012
  1. Add pg_hstore extension, for dealing with the PostgreSQL hstore (key/…

    …value table) type
    hstore is an extension that ships with PostgreSQL that allows you
    to store a key/value table inside a single column, where keys and
    values are both strings (well, values can be NULL).
    The implementation is similar to the pg_array extension, using a
    DelegateClass approach, with a hash used for backing.  Since
    hstore only uses string keys and values, we need to override a lot
    of methods to force input keys/values to strings appropriately.
    Just like pg_array, add a DatasetMethods module for handling
    schema parsing/typecasting, and bound argument support in the
    native adapter.
    Thanks to pvh's sequel-hstore for the idea behind the parser,
    though I significantly changed the implementation.
Commits on Mar 6, 2012
  1. Remove sequel_fast_columns link from plugins page

    The columns_introspection plugin that ships with Sequel does pretty
    much the same thing, and is much better at handling corner cases
    like aliased tables and unaliased expressions.
Something went wrong with that request. Please try again.