# ANN: Sequel 3.35.0 Released

**URL:** <https://www.ruby-forum.com/t/ann-sequel-3-35-0-released/219387>\
**Category:** Ruby\
**Created:** [May 1, 2012, 5:58pm UTC](https://www.ruby-forum.com/t/ann-sequel-3-35-0-released/219387 "2012-05-01T17:58:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gurdipe\_D](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/b77776/32.png) [@Gurdipe\_D](https://www.ruby-forum.com/u/Gurdipe_D)\
**Post date:** [May 1, 2012, 5:58pm UTC](https://www.ruby-forum.com/t/ann-sequel-3-35-0-released/219387/1 "2012-05-01T17:58:22Z")

</div>

Sequel is a lightweight database access toolkit for Ruby.

- Sequel provides thread safety, connection pooling and a concise  
DSL for constructing SQL queries and table schemas.
- Sequel includes a 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, savepoints,  
two-phase commit, transaction isolation, master/slave  
configurations, and database sharding.
- Sequel currently has adapters for ADO, Amalgalite, DataObjects,  
DB2, DBI, Firebird, IBM\_DB, Informix, JDBC, MySQL, Mysql2, ODBC,  
OpenBase, Oracle, PostgreSQL, SQLite3, Swift, and TinyTDS.

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

= New Features

- A dirty plugin has been added, which saves the initial value of  
the column when the column is changed, similar to  
ActiveModel::Dirty:

- Database#create\_table now respects an :as option to create a  
database based on the results of a query. The :as option value  
should either be an SQL string or a dataset.

- The json\_serializer and xml\_serializer plugins can now serialize  
arbitrary arrays of model objects by passing an :array option  
to the to\_json class method. This works around an issue in  
ruby’s JSON library where Array#to\_json does not pass arguments  
given to it to the members of the array.

- You can now use the % (modulus) operator in the same way you  
can use the bitwise operators in Sequel:

- On PostgreSQL, you can now provide :only, :cascade, and :restart  
options to Dataset#truncate to use ONLY, CASCADE, and  
RESTART IDENTITY. Additionally, you can now truncate multiple  
tables at the same time:

- The :index option when creating columns in the schema generator  
can now take a hash of index options:

- A Database#cache\_schema accessor has been added, it can be set  
to false to have the Database never cache schema results. This  
can be useful in Rails development mode, so that you don’t need to  
restart a running server to have models pick up the new schema.

- Database#log\_exception has been added for easier instrumentation.  
It is called with the exception and SQL query string for all  
queries that raise an exception.

- The Sequel.migration DSL now has a transaction method that forces  
transaction use for the given migration.

= Other Improvements

- Many theoretical thread-safety issues have been fixed for ruby  
implementations that don’t use a global interpreter lock.  
Previously, Sequel relied on MRI’s global interpreter lock for  
part of its thread safety, now it does manually locking in more  
places to avoid thread-safety issues on JRuby (and other ruby  
implementations without a global interpreter lock).

- Sequel.single\_threaded = true now disables the mutex  
synchronization that enforces thread safety for additional  
performance in single threaded mode.

- Sequel’s migrators now only attempt to use transactions by  
default if the underlying database supports transactional DDL.  
SQLite does support transactional DDL, but Sequel will not  
use transactions for SQLite migrations as it causes issues  
when emulating alter\_table operations for tables with foreign  
keys.

- Errors that occur when rolling back database transactions are  
now handled correctly. Previously, the underlying exception was  
raised, it wasn’t correctly wrapped in a Sequel::DatabaseError,  
and if it was due to a database disconnection, the connection  
wasn’t removed from the pool.

- Sequel no longer sets ruby instance variables on java objects,  
fixing warnings on JRuby 1.7 and attempting to be forward  
compatible with JRuby 2.0.

- Sequel now uses date and timestamp formats that are multilanguage  
and not DATEFORMAT dependent on Microsoft SQL Server.

- Sequel now correctly escapes blackslash-carriage return-line feed  
on Microsoft SQL Server.

- Parsing the column default values in the oracle adapter no longer  
requires database superuser privileges.

- Sequel now correctly handles parsing schema for tables in other  
databases on MySQL. Previously, it would always look in the  
current database.

- Sequel no longer doubles backslashes in strings by default. It  
now only does so on MySQL, since that is the only database that  
appears to use backslashes for escaping. This fixes issues with  
backslashes being doubled on some of the less commonly used  
adapters.

- The pg\_auto\_parameterize extension now works correctly when  
using cursors.

- Dataset#truncate now raises an Error if you attempt to do so  
on a dataset that uses HAVING. Previously, it only checked for  
WHERE.

- The schema dumper now recognized the identity type.

= Backwards Compatibility

- Association reflections now store cached information in a  
separate subhash due to the thread-safety changes. Any code  
accessing an association reflection should always call the  
related method to get the cached data instead of checking  
for a specific location in the hash.

- Association reflection internals for many\_through\_many associations  
changed significantly, any code that accesses the edge information  
in the reflection will need to be changed to use the new methods  
instead of accessing the old values directly.

- The features deprecated in 3.34.0 have now 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)]
- {Blog}[[http://sequel.heroku.com](http://sequel.heroku.com)]
- {Bug tracking}[[Issues · jeremyevans/sequel · GitHub](http://github.com/jeremyevans/sequel/issues)]
- {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)]
