[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

ANN: Sequel 0.0.19 Released and Sequel discussion list

Sharon Rosner

4/16/2007 9:49:00 AM

== Sequel 0.0.19 Released

Sequel: Concise ORM for Ruby. Sequel provides thread safety,
connection pooling and a concise DSL for constructing database queries
and table schemas. Version 0.0.19 fixes a bunch of minor bugs has
improved code coverage (rcov reports 74.5% coverage!)

Sequel currently supports SQLite, PostgreSQL and MySQL databases.

== Sequel by Example

require 'sequel/sqlite'
DB = Sequel.open 'sqlite:/:memory:'

DB.create_table :posts
column :title, :text
column :category, :text
end

posts = DB[:posts]

posts << {:title => 'first', :category => 'ruby'}
posts << {:title => 'second', :category => 'orm'}

posts.count #=> 2
posts.sql #=> 'SELECT * FROM posts'
posts.filter(:category => 'orm').count #=> 1
posts.filter(:category => 'orm').sql #=> "SELECT * FROM posts WHERE
(category = 'orm')"
posts.order(:category).print # pretty-prints the table ordered by
category

== Installing Sequel

sudo gem install sequel

You can also check out the trunk and install locally:

svn co http://ruby-sequel.googlecode.com... sequel
cd sequel
rake install

== Changes in 0.0.19

* More specs for Dataset.
* Fixed Dataset#invert_order to work correctly with strings.
* Fixed Model#== to check equality of values.
* Added Model#exclude and Model#order.
* Fixed Dataset#order and Dataset#group to behave correctly when
supplied with qualified field name symbols.
* Removed Database#literal. Shouldn't have been there.
* Added SQLite::Dataset#explain. Returns an array of opcode hashes.
* Specs for ConnectionPool.

== Sequel Discussion List

I've created a google group dedicated to Sequel. Youcan find it here:
http://groups.google.com/group/s...

== Sequel RDoc

http://sequel.rub...