# ANN: Sequel 0.1.5 Released

**URL:** <https://www.ruby-forum.com/t/ann-sequel-0-1-5-released/105157>\
**Category:** Ruby\
**Created:** [May 26, 2007, 10:51am UTC](https://www.ruby-forum.com/t/ann-sequel-0-1-5-released/105157 "2007-05-26T10:51:41Z")\
**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:** [May 26, 2007, 10:51am UTC](https://www.ruby-forum.com/t/ann-sequel-0-1-5-released/105157/1 "2007-05-26T10:51:41Z")

</div>

Sequel version 0.1.5 has just been released. This release adds support  
for multiple joins (thanks Farrel L.) and now supports left outer,  
right outer, full outer and inner joins.

# Multiple joins

Datasets now support multiple joins. Note that join conditions can be  
in the form of a hash of correlating fields between the two tables, or  
a field name on the joined table that is correlated to the id field in  
the first table.

DB[:a].join(:b, :a\_id).join(:c, :b\_id).sql #=\>  
“SELECT \* FROM a LEFT OUTER JOIN b ON (b.a\_id = a.id) LEFT OUTER JOIN  
c ON (c.b\_id = b.id)”

# Join types

Datasets now contain support for left outer, right outer, full outer  
and inner joins. You can specify the join type by using either the  
Dataset#join\_table method:

DB[:a].join\_table(:inner, :b, :a\_id)

Or by using one of the specific join methods:

DB[:a].left\_outer\_join(:b, :a\_id)  
DB[:a].right\_outer\_join(:b, :a\_id)  
DB[:a].full\_outer\_join(:b, :a\_id)  
DB[:a].inner\_join(:b, :a\_id)

Also note that Dataset#join is an alias for Dataset#left\_outer\_join,  
which is probably the most common join type.

======================

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
