__PACKAGE__->sql_maker_class('DBIx::Class::SQLMaker::SQLite');
__PACKAGE__->sql_limit_dialect ('LimitOffset');
+__PACKAGE__->sql_quote_char ('"');
+__PACKAGE__->datetime_parser_type ('DateTime::Format::SQLite');
sub backup {
return $backupfile;
}
+sub _exec_svp_begin {
+ my ($self, $name) = @_;
+
+ $self->_dbh->do("SAVEPOINT $name");
+}
+
+sub _exec_svp_release {
+ my ($self, $name) = @_;
+
+ $self->_dbh->do("RELEASE SAVEPOINT $name");
+}
+
+sub _exec_svp_rollback {
+ my ($self, $name) = @_;
+
+ # For some reason this statement changes the value of $dbh->{AutoCommit}, so
+ # we localize it here to preserve the original value.
+ local $self->_dbh->{AutoCommit} = $self->_dbh->{AutoCommit};
+
+ $self->_dbh->do("ROLLBACK TRANSACTION TO SAVEPOINT $name");
+}
+
sub deployment_statements {
my $self = shift;
my ($schema, $type, $version, $dir, $sqltargs, @rest) = @_;
$self->next::method($schema, $type, $version, $dir, $sqltargs, @rest);
}
-sub datetime_parser_type { return "DateTime::Format::SQLite"; }
+sub bind_attribute_by_data_type {
+ $_[1] =~ /^ (?: int(?:eger)? | (?:tiny|small|medium|big)int ) $/ix
+ ? do { require DBI; DBI::SQL_INTEGER() }
+ : undef
+ ;
+}
=head2 connect_call_use_foreign_keys