Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
ANN: Sequel 0.3.1 Released
Sharon Rosner
10/30/2007 7:11:00 AM
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 documentation:
<
http://sequel.rubyfor...
Join the Sequel-talk group:
<
http://groups.google.com/group/seque...
Install the gem:
sudo gem install sequel
Or check out the source and install manually:
svn co
http://ruby-sequel.googlecode.com...
sequel
cd sequel
rake install
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
ANN: Sequel 0.3.1 Released
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password