# ANN: Sequel 3.7.0 Released

**URL:** <https://www.ruby-forum.com/t/ann-sequel-3-7-0-released/179678>\
**Category:** Ruby\
**Created:** [December 1, 2009, 6:00pm UTC](https://www.ruby-forum.com/t/ann-sequel-3-7-0-released/179678 "2009-12-01T18:00:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nerdmaster](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/c68b51/32.png) [@nerdmaster](https://www.ruby-forum.com/u/nerdmaster)\
**Post date:** [December 1, 2009, 6:00pm UTC](https://www.ruby-forum.com/t/ann-sequel-3-7-0-released/179678/1 "2009-12-01T18:00:02Z")

</div>

Sequel is a lightweight database access toolkit for Ruby.

- Sequel provides thread safety, connection pooling and a concise DSL  
for constructing database queries and table schemas.
- Sequel also includes a lightweight but comprehensive ORM layer for  
mapping records to Ruby objects and handling associated records.
- Sequel supports advanced database features such as prepared  
statements, bound variables, stored procedures, master/slave  
configurations, and database sharding.
- Sequel makes it easy to deal with multiple records without having  
to break your teeth on SQL.
- Sequel currently has adapters for ADO, Amalgalite, DataObjects,  
DB2, DBI, Firebird, Informix, JDBC, MySQL, ODBC, OpenBase, Oracle,  
PostgreSQL and SQLite3.

Sequel 3.7.0 has been released and should be available on the gem  
mirrors.

## New Features

- Sequel now has support for deleting and updating joined datasets  
on MySQL and PostgreSQL. Previously, Sequel only supported this to  
a limited extent on Microsoft SQL Server, and support there has been  
improved as well.

- Dataset #select\_map, #select\_order\_map, and #select\_hash  
convenience methods were added for quickly creating arrays and  
hashes from a dataset.

- The NULL, NOTNULL, TRUE, SQLTRUE, FALSE, and SQLFALSE constants  
were added to Sequel::SQL::Constants. This allows you to do:

- The validates\_unique method in the validation\_helpers plugin now  
supports an :only\_if\_modified option, which should speed up the  
common case where the unique attribute is not modified for an  
existing record. It’s not on by default, since it’s possible the  
database could be changed between retrieving the model object and  
updating it.

- The Dataset #union, #intersect, and #except methods now accept an  
:alias option which is used as the alias for the returned dataset.

- Model#destroy now supports a :transaction option, similar to  
Model#save.

- The shared Oracle adapter now supports Dataset#sequence for  
returning autogenerated primary key values on insert from a  
related sequence.

## Other Improvements

- In Model #save and #destroy when using transactions and when  
raise\_on\_save\_failure is false, ensure that transactions are rolled  
back if a before hook returns false.

- Dataset#group\_and\_count now handles arguments other than Symbols.  
A previous change to the method raised an exception if a Symbol was  
not provided. It also handles AliasedExpressions natively, so the  
following works correctly:

- Sequel no longer uses native autoreconnection in the mysql adapter.  
Native autoreconnection has problems with prepared statements,  
where a new native connection is used behind Sequel’s back, so  
Sequel thinks the prepared statement has already been defined on  
the connection, when it fact it hasn’t. Any other changes that  
affect the state of the connection will be lost when native  
autoreconnection is used as well.

- The schema\_dumper plugin now specifies the :type option for primary  
key if it isn’t Integer.

- On PostgreSQL, the bigserial type is used if :type=\>Bignum is  
given as an option to primary key. This makes it operate more  
similarly to other adapters that support autoincrementing 64-bit  
integer primary keys.

- The native mysql adapter will now attempt to load options in the  
[client] section of the my.cnf file.

- The rake spec tasks for the project now work correctly with RSpec  
1.2.9.

## Backwards Compatibility

- Dataset::GET\_ERROR\_MSG and Dataset::MAP\_ERROR\_MSG constants were  
removed. Both were replaced with Dataset::ARG\_BLOCK\_ERROR\_MSG.

- The behavior of the Model#save\_failure private instance method was  
modified. It now always raises an exception, and validation  
failures no longer call it.

- The internals of how autogenerated primary key metadata is stored  
when creating tables on PostgreSQL has been modified.

- The native MySQL adapter no longer sets the OPT\_LOCAL\_INFILE option  
to “client” on the native connection.

Thanks,  
Jeremy

- {Website}[[http://sequel.rubyforge.org](http://sequel.rubyforge.org)]
- {Source code}[[GitHub - jeremyevans/sequel: Sequel: The Database Toolkit for Ruby](http://github.com/jeremyevans/sequel)]
- {Bug tracking}[[Google Code Archive - Long-term storage for Google Code Project Hosting.](http://code.google.com/p/ruby-sequel/issues/list)]
- {Google group}[[http://groups.google.com/group/sequel-talk](http://groups.google.com/group/sequel-talk)]
- {RDoc}[[http://sequel.rubyforge.org/rdoc](http://sequel.rubyforge.org/rdoc)]

---

<div class="post-metadata">

**Author:** ![nerdmaster](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/c68b51/32.png) [@nerdmaster](https://www.ruby-forum.com/u/nerdmaster)\
**Post date:** [December 1, 2009, 6:17pm UTC](https://www.ruby-forum.com/t/ann-sequel-3-7-0-released/179678/2 "2009-12-01T18:17:57Z")

</div>

Jeremy E. wrote:

> Sequel is a lightweight database access toolkit for Ruby.
> 
> - Sequel currently has adapters for ADO, Amalgalite, DataObjects,  
> DB2, DBI, Firebird, Informix, JDBC, MySQL, ODBC, OpenBase, Oracle,  
> PostgreSQL and SQLite3.

I don’t know much about adapters. Is there a chance of getting Sybase  
support in there? If not… Why ?

---

<div class="post-metadata">

**Author:** ![nerdmaster](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/c68b51/32.png) [@nerdmaster](https://www.ruby-forum.com/u/nerdmaster)\
**Post date:** [December 1, 2009, 6:29pm UTC](https://www.ruby-forum.com/t/ann-sequel-3-7-0-released/179678/3 "2009-12-01T18:29:46Z")

</div>

On Dec 1, 2009, at 11:17 AM, Aldric G. wrote:

> Jeremy E. wrote:
> 
> > Sequel is a lightweight database access toolkit for Ruby.
> > 
> > - Sequel currently has adapters for ADO, Amalgalite, DataObjects,  
> > DB2, DBI, Firebird, Informix, JDBC, MySQL, ODBC, OpenBase, Oracle,  
> > PostgreSQL and SQLite3.
> 
> I don’t know much about adapters. Is there a chance of getting Sybase  
> support in there? If not… Why ?

It’s certainly possible if someone is willing to do the work and  
submit a patch. Jeremy has been very open to receiving patches for new  
adapters.

cr

---

<div class="post-metadata">

**Author:** ![nerdmaster](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/c68b51/32.png) [@nerdmaster](https://www.ruby-forum.com/u/nerdmaster)\
**Post date:** [December 1, 2009, 6:43pm UTC](https://www.ruby-forum.com/t/ann-sequel-3-7-0-released/179678/4 "2009-12-01T18:43:15Z")

</div>

Aldric G. wrote:

> Jeremy E. wrote:
> 
> > Sequel is a lightweight database access toolkit for Ruby.
> > 
> > - Sequel currently has adapters for ADO, Amalgalite, DataObjects,  
> > DB2, DBI, Firebird, Informix, JDBC, MySQL, ODBC, OpenBase, Oracle,  
> > PostgreSQL and SQLite3.
> 
> I don’t know much about adapters. Is there a chance of getting Sybase  
> support in there? If not… Why ?

As Chuck mentioned, the only reason there isn’t one already is that no  
one has written it. I don’t have access to a Sybase server, so I don’t  
plan on writing an adapter myself.

Minimal adapter support isn’t difficult to write if you have access to  
the native driver API. I’m happy to review and give suggestions on an  
adapter someone else writes, and including it with Sequel when it is  
working.

Also, if Sybase has a JDBC driver, it’s possible you can already connect  
to it via Sequel’s JDBC adapter (same for ODBC or DBI).

Jeremy
