Home > sqlite_savepoints

sqlite_savepoints

Sqlite_savepoints is a project mainly written in Ruby, based on the MIT license.

rails plugin that enables sqlite adapter to use savepoints

== Description

This plugin enables Rails to use savepoints when using sqlite3.

== install

from rails root:

git clone git://github.com/ordinaryzelig/sqlite_savepoints.git vendor/plugins/sqlite_savepoints

== Example

http://guides.rubyonrails.org/2_3_release_notes.html#nested-transactions.

== Implementation

Rails 2.3.5 does not implement the following methods for ActiveRecord::ConnectionAdapters::SQLite3Adapter:

  • create_savepoint
  • release_savepoint
  • rollback_to_savepoint
  • supports_savepoints? SQLite DOES support savepoints just like MySQL (http://www.sqlite.org/lang_savepoint.html; see version below). So i just copied the mysql adapter code.

== Version

This plugin was tested with Rails 2.3.5 and SQLite version 3.6.12.

== Testing Bug

The tests pass individually, but not when run altogether. The same SQLite savepoint statements seem to be executing. But if you change the test names, different tests will pass and fail. That's my only clue to what's going on.

Previous:Leir