[ANN] SQLite/Ruby 2.0.2 Beta

http://sqlite-ruby.rubyforge.org
http://sqlite-ruby.rubyforge.org/faq.html

Another beta release in the 2.0.x series. This one adds explicit transaction support, and follows Carl Youngblood's suggestion (thanks, Carl!) that Statement#execute immediately execute its query (instead of waiting until the result set's #next method is invoked). This makes Statement#execute safe to use for DDL statements (and other statements that don't return rows).

I also changed the name of the gem file to "sqlite-ruby", instead of merely "sqlite" (hope that doesn't cause anyone any grief...).

Transactions look like this:

   database.transaction do |db|
     database.execute( "insert..." )
   end
   # implicit commit, or rollback if exception occurs...

or

   database.transaction
   database.execute( "insert..." )
   database.commit # or database.rollback

I also changed "Database#execute_all" to "Database#execute_batch".

There is an issue with the callbacks for custom functions. If they raise an exception, or if they use FunctionProxy#set_error to report an error, memory gets corrupted and results in nondeterministic behavior (often segfaults). Not sure why, yet.

Lastly--I know there are a lot of you that are interested in SQLite that aren't on SQLite's mailing lists... so I'm announcing the betas to Ruby-Talk. If that is a breach of etiquette, please tell me! Thanks...

- Jamis

···

--
Jamis Buck
jgb3@email.byu.edu
http://www.jamisbuck.org/jamis

"I use octal until I get to 8, and then I switch to decimal."