ANN: Sequel 0.4.5 Released

Sequel version 0.4.5 has just been released. Sequel is a lightweight
database access and ORM library for Ruby. Sequel provides thread
safety, connection pooling and a simple and expressive API for
constructing database queries and table schemas.

This release includes new model validations and a few minor bug fixes
and improvements. Here are the changes:

=== New model validations

Sequel now includes support for validations in models. The validations
functionality is based on the Validatable gem (http://, which needs to be installed if validations
are to be used. Validations can be defined in two forms. First there
is the validates method, which takes a block:

class User < Sequel::Model(:users)
validates do
format_of :email, :with => /somewhackyregexp/
presence_of :name


You can also invoke all the validate_xxx methods supported by
validatable directly:

class User < Sequel::Model(:users)
validates_format_of :email, :with => /somewhackyregexp/
validates_presence_of :name

To check if an instance is valid you can call the #valid? method:


To check if a model class has defined validations you can invoke


=== Other changes

  • Fixed update_sql with array sub-item keys (#110).
  • Added Model#update as alias to #set.
  • Added Database#set_column_default method (thanks Jim M…)
  • Added rdoc for new alter_table functionality (#109).
  • Refactored model specs.
  • Removed warning on uninitialized @transform value (thanks Jim

=== 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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs