# ANN: Sequel 3.3.0 Released

**URL:** <https://www.ruby-forum.com/t/ann-sequel-3-3-0-released/173130>\
**Category:** Ruby\
**Created:** [August 3, 2009, 6:41pm UTC](https://www.ruby-forum.com/t/ann-sequel-3-3-0-released/173130 "2009-08-03T18:41:56Z")\
**Posts on this page:** 1\
**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:** [August 3, 2009, 6:41pm UTC](https://www.ruby-forum.com/t/ann-sequel-3-3-0-released/173130/1 "2009-08-03T18:41:56Z")

</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.2.0 has been released and should be available on the gem  
mirrors. The 3.2.0 release adds numerous improvements:

## New Features

- An association\_proxies plugin has been added. This is not a  
full-blown proxy implementation, but it allows you to write code  
such as:

- The add\ __/remove\__ /remove\_all\_\* association methods now take  
additional arguments that are passed down to the  
_add__/remove_/_remove\_all_\* methods. One of the things this  
allows you to do is update additional columns in join tables for  
many\_to\_many associations:

- The JDBC adapter now accepts a :convert\_types option to turn off  
Java type conversion. The option is true by default for  
backwards compatibility and correctness, but can be set to false  
to double performance. The option can be set at the database  
and dataset levels:

- Dataset#from\_self now takes an option hash and respects an  
:alias option, giving the table alias to use.

- Dataset#unlimited was added, similar to unfiltered and unordered.

- SQL::WindowFunction is now a subclass of SQL::GenericExpression,  
so you can alias it and treat it like any other SQL::Function.

## Other Improvements

- Microsoft SQL Server support is much, much better in Sequel 3.3.0  
than in previous versions. Support is pretty good with the ODBC,  
ADO, and JDBC adapters, close to the level of support for  
PostreSQL, MySQL, SQLite, and H2. Improvements are too numerous  
to list, but here are some highlights:

- The ADO and ODBC adapters both work much better now. The ADO  
adapter no longer attempts to use transactions, since I’ve found  
that ADO does not give a stable native connection (and hence  
transactions weren’t possible). I strongly recommend against  
using the ADO adapter in production.

- The H2 JDBC subadapter now supports rename\_column, set\_column\_null,  
set\_column\_type, and add\_foreign\_key.

- Altering a columns type, null status, or default is now supported  
on SQLite. You can also add primary keys and unique columns.

- Both the ADO and ODBC adapters now catch the native exception  
classes and raise Sequel::DatabaseErrors.

- Model classes now default to associating to other classes in the  
same scope. This makes it easier to use namespaced models.

- The schema parser and schema dumper now support the following  
types: nchar, nvarchar, ntext, smalldatetime, smallmoney, binary,  
and varbinary.

- You can now specify the null status for a column using :allow\_null  
in addition to :null. This is to make it easier to use the  
table creation methods with the results of the schema parser.

- Renaming a NOT NULL column without a default now works on MySQL.

- Model class initialization now raises an exception if there is a  
problem connecting to the database.

- Connection pool performance has been increased slightly.

- The literal\_time method in the ODBC adapter has been fixed.

- An unlikely but potential bug in the MySQL adapter has been fixed.

## Backwards Compatibility

- The convert\_tinyint\_to\_bool setting moved from the main Sequel  
module to the Sequel::MySQL module. The native MySQL adapter is  
the only adapter that converted tinyint columns to booleans when  
the rows are returned, so you can only use the setting with the  
native MySQL adapter.

- Model classes now default to associating to other classes in the  
same scope. It’s highly unlikely anyone was relying on the  
previous behavior, but if you have a model inside a module that  
you are associating to a model outside of a module, you now need  
to specify the associated class using the :class option.

- Model#save no longer includes the primary key fields in the SET  
clause of the UPDATE query, only in the WHERE clause. I’m not  
sure if this affects backwards compatibility of production code,  
but it can break tests that expect specific SQL.

- Behavior to handle empty identifiers has now been standardized.  
If any database adapter returns an empty identifier, Sequel will  
use ‘untitled’ as the identifier. This can break backwards  
compatibility if the adapter previously used another default and  
you were relying on that default. This was necessary to fix any  
possible “interning empty string” exceptions.

- On MSSQL, Sequel now uses the datetime type instead of the  
timestamp type for generic DateTimes. It now uses bit for the  
TrueClass and FalseClass generic types, and image for the File  
generic type.

- Sequel now unescapes URL parts:

- The columns\_for private SQLite Database method has been removed.

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)]
