# ANN: Sequel 0.3.1 Released

**URL:** <https://www.ruby-forum.com/t/ann-sequel-0-3-1-released/118701>\
**Category:** Ruby\
**Created:** [October 30, 2007, 8:11am UTC](https://www.ruby-forum.com/t/ann-sequel-0-3-1-released/118701 "2007-10-30T08:11:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ciconia](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/71c47a/32.png) [@ciconia](https://www.ruby-forum.com/u/ciconia)\
**Post date:** [October 30, 2007, 8:11am UTC](https://www.ruby-forum.com/t/ann-sequel-0-3-1-released/118701/1 "2007-10-30T08:11:36Z")

</div>

Sequel version 0.3.1 has just been released. This release includes an  
experimental Oracle adapter, better Database#fetch functionality, and  
other minor bug fixes and improvements.

Following is a discussion of the changes:

=== Preliminary Oracle adapter

Sequel now includes an Oracle adapter, based on the ‘oci8’ library. To  
connect to an Oracle adapter you can supply a URL:

require ‘sequel/oracle’  
DB = Sequel(‘oracle://user:password@my\_db’)

# or

DB = Sequel(‘oracle://user:password@server1/my\_db’)

Or use the Sequel.oracle method:

require ‘sequel/oracle’  
DB = Sequel.oracle(‘my\_db’, :user =\> ‘user’, :password =\> ‘\*\*\*\*\*\*’)

Please note that this adapter was not tested (since I do not have  
access to an Oracle database) and may require some patching before it  
is actually usable. So if anyone is willing to do the testing that  
would help tremendously.

=== A better Database#fetch

Sequel 0.3 introduced a new way to fetch records using arbitrary SQL,  
using Database#fetch (and the shortcut using DB#[]). Instead of  
returning an enumerator, this method now returns a dataset modified to  
always execute the same SQL statement, letting you treat it just like  
a normal Dataset instance:

DB[‘SELECT \* FROM items’].print  
DB[‘SELECT \* FROM items’].all  
DB[‘SELECT \* FROM items’].map(:id)  
DB[‘SELECT \* FROM items’].to\_hash(:id, :name)

=== Other improvements and bug fixes

- More documentation for Sequel models.

- Deprecated Model#pkey. Implemented better Model#pk method.

- foreign\_key definitions now accept :key option for specifying the  
remote key (#73).

- Sequel now requires ParseTree version 2.0.0 or later (#74).

- Fixed string literalization in mysql adapter for strings with  
comment backslashes in them (#75).

- Changed postgres adapter to use the ruby-postgres library’s type  
conversion if available (#76).

- Fixed Model#method\_missing to not raise error for columns not in the  
table but for which a value exists (#77).

- Fixed YAML serialization (#78).

- Fixed miscellaneous typos.

=== More info

Sequel project page:  
[http://code.google.com/p/ruby-sequel](http://code.google.com/p/ruby-sequel)

Sequel documentation:  
[http://sequel.rubyforge.org](http://sequel.rubyforge.org)

Join the Sequel-talk group:  
[http://groups.google.com/group/sequel-talk](http://groups.google.com/group/sequel-talk)

Install the gem:  
sudo gem install sequel

Or check out the source and install manually:  
svn co [http://ruby-sequel.googlecode.com/svn/trunk](http://ruby-sequel.googlecode.com/svn/trunk) sequel  
cd sequel  
rake install
