| DBIx-Connector documentation | Contained in the DBIx-Connector distribution. |
DBIx::Connector::Driver::SQLite - SQLite-specific connection interface
This subclass of DBIx::Connector::Driver provides SQLite-specific implementations of the following methods:
savepointreleaserollback_toNote that they only work with SQLite 3.6.8 or higher; older versions of SQLite will fallback on the exception-throwing implementation of these methods in DBIx::Connector::Driver.
This module was written and is maintained by:
Copyright (c) 2009-2010 David E. Wheeler. Some Rights Reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| DBIx-Connector documentation | Contained in the DBIx-Connector distribution. |
package DBIx::Connector::Driver::SQLite; use strict; use warnings; use base 'DBIx::Connector::Driver'; our $VERSION = '0.45'; BEGIN { # Only install support for savepoints if SQLite supports them. my ($x, $y, $z) = split /[.]/ => $DBD::SQLite::sqlite_version || 0; return unless $x >= 3 && $y >= 6 && $z >= 8; eval q{ sub savepoint { my ($self, $dbh, $name) = @_; $dbh->do("SAVEPOINT $name"); } sub release { my ($self, $dbh, $name) = @_; $dbh->do("RELEASE SAVEPOINT $name"); } sub rollback_to { my ($self, $dbh, $name) = @_; $dbh->do("ROLLBACK TO SAVEPOINT $name"); } }; die $@ if $@; } 1; __END__