Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
[ANN] Ruby/Informix 0.7.0
Gerardo Santana Gómez Garrido
4/1/2008 5:17:00 AM
I'm pleased to announce another release of Ruby/Informix, a Ruby
library for connecting to IBM Informix.
In this release you'll find support for the INTERVAL data type, more
handy methods and more and better documentation with examples, along
with a new web site.
Web site:
http://ruby-informix.ruby...
Documentation:
http://ruby-informix.ruby...
doc/
Some examples:
Connecting to a database:
db = Informix.connect('stores')
Inserting records
stmt = db.prepare('insert into state values(?, ?)')
stmt.execute('CA', 'California')
Iterating over a table using a hash (shortcut):
db.each_hash('select * from customers') do |cust|
puts "#{cust['firstname']} #{cust['lastname']}"
end
Changelog follows:
0.7.0 03/31/2008
------------------
New features:
* Experimental support for the INTERVAL data type:
- year_to_month, day_to_fraction, from_months and from_seconds class
methods for creating an Interval object
- +@ and -@ unary operators
- +, * and / operations available with Integer, Rational, Date, Time
and DateTime objects
- methods for returning the respective fields of an Interval object
individually (years, months, days, hours, minutes and seconds)
- to_a method for returning the fields of an Interval object as an array
- methods for converting the Interval object to the given unit, where
apply (to_years, to_months, to_days, to_hours, to_minutes and
to_seconds)
- to_s method for displaying an Interval object as an string according
to ANSI SQL standards
- includes Comparable
* Database#version returns a struct with version information of the database
server.
* Database#each and Database#each_hash shortcut methods for declaring and
opening a cursor in a single step.
Contributed by Reid Morrison <reidmo at gmail>
* Database#execute is not an alias for Database#immediate any more.
It has become a shortcut for preparing and executing a statement in a
single step.
* SequentialCursor includes Enumerable
* Ruby 1.9 compatible
* More and better documentation
Bugs fixed:
* The documentation for class Error was not being recognized by rdoc
Remarks:
* Database.new deprecated in favor of Database.open
* Database#do was removed
* A lot of C code has been reimplemented in Ruby
* Modules and classes have been reorganized
* Database#execute still behaves the same, except that it can also accept
input parameters and return at most one record. Database#immediate is
more efficient though.
--
Gerardo Santana
1 Answer
Venu9955
4/1/2008 7:06:00 AM
0
Thanks for the information,
Venu 9955
On Apr 1, 10:16 am, Gerardo Santana Gómez Garrido
<gerardo.sant...@gmail.com> wrote:
> I'm pleased to announce another release of Ruby/Informix, a Ruby
> library for connecting to IBM Informix.
>
> In this release you'll find support for the INTERVAL data type, more
> handy methods and more and better documentation with examples, along
> with a new web site.
>
> Web site:
http://ruby-informix.ruby...
> Documentation:
http://ruby-informix.ruby...
doc/
>
> Some examples:
>
> Connecting to a database:
>
> db = Informix.connect('stores')
>
> Inserting records
>
> stmt = db.prepare('insert into state values(?, ?)')
> stmt.execute('CA', 'California')
>
> Iterating over a table using a hash (shortcut):
>
> db.each_hash('select * from customers') do |cust|
> puts "#{cust['firstname']} #{cust['lastname']}"
> end
>
> Changelog follows:
>
> 0.7.0 03/31/2008
> ------------------
> New features:
> * Experimental support for the INTERVAL data type:
> - year_to_month, day_to_fraction, from_months and from_seconds class
> methods for creating an Interval object
> - +@ and -@ unary operators
> - +, * and / operations available with Integer, Rational, Date, Time
> and DateTime objects
> - methods for returning the respective fields of an Interval object
> individually (years, months, days, hours, minutes and seconds)
> - to_a method for returning the fields of an Interval object as an array
> - methods for converting the Interval object to the given unit, where
> apply (to_years, to_months, to_days, to_hours, to_minutes and
> to_seconds)
> - to_s method for displaying an Interval object as an string according
> to ANSI SQL standards
> - includes Comparable
> * Database#version returns a struct with version information of the database
> server.
> * Database#each and Database#each_hash shortcut methods for declaring and
> opening a cursor in a single step.
> Contributed by Reid Morrison <reidmo at gmail>
>
> * Database#execute is not an alias for Database#immediate any more.
> It has become a shortcut for preparing and executing a statement in a
> single step.
> * SequentialCursor includes Enumerable
> * Ruby 1.9 compatible
> * More and better documentation
>
> Bugs fixed:
> * The documentation for class Error was not being recognized by rdoc
>
> Remarks:
> * Database.new deprecated in favor of Database.open
> * Database#do was removed
> * A lot of C code has been reimplemented in Ruby
> * Modules and classes have been reorganized
> * Database#execute still behaves the same, except that it can also accept
> input parameters and return at most one record. Database#immediate is
> more efficient though.
> --
> Gerardo Santana
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
[ANN] Ruby/Informix 0.7.0
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