ANN: Sequel 0.3.3 Released

Sequel version 0.3.3 has just been released. This release includes
extensions for easily specifying relative time stamps and a simple
worker thread implementation for asynchronous processing.

Sequel is a lightweight ORM library for Ruby. Sequel provides thread
safety, connection pooling and a simple and expressive API for
constructing database queries and table schemas.

Following is a discussion of the changes:

=== Numeric Extensions

Sequel now includes extensions to the Numeric class to make it easier
to specify time units and relative time stamps. This feature is based
on the functionality provided in Rails. These extensions are disabled
by default. To enable numeric extensions, include the following in
your code:


You can easily specify time in minute, hour, day and week units:

  1.minute #=> 60
  2.hours #=> 7200
  3.days #=> 3 * 86400
  1.week #=> 7 * 86400

You can also specify time relative to the current time using #from_now
and #ago:


And also time relative to a given time stamp:


=== Worker threads

Sequel now includes a worker thread implementation, which can be
useful in cases where you need to perform database operations while
iterating over records. Jobs are added to the worker by calling
Worker#add with a block:

  worker =
  Item.filter(:active => true).each do |i|
    worker.add {i.set(:name =>}

You can also have the worker wrap all its jobs with a transaction by
specifying a database when creating a new worker:

  worker = #transaction is begun
  Item.filter(:active => true).each do |i|
    worker.add {i.set(:name =>}
  worker.join # transaction is commited

=== More info

Sequel project page:

Sequel documentation:

Join the Sequel-talk group:

Install the gem:
  sudo gem install sequel

Or check out the source and install manually:
  svn co sequel
  cd sequel
  rake install