limit dialect to C<FIRST X SKIP X> and provides preliminary
L<DBIx::Class::InflateColumn::DateTime> support.
+You need to use either the
+L<disable_sth_caching|DBIx::Class::Storage::DBI/disable_sth_caching> option or
+L</connect_call_use_softcommit> (see L</CAVEATS>) for your code to function
+correctly with this driver.
+
For ODBC support, see L<DBIx::Class::Storage::DBI::ODBC::Firebird>.
To turn on L<DBIx::Class::InflateColumn::DateTime> support, see
}
}
-# softcommit makes savepoints work
-sub _run_connection_actions {
+=head2 connect_call_use_softcommit
+
+Used as:
+
+ on_connect_call => 'use_softcommit'
+
+In L<connect_info|DBIx::Class::Storage::DBI/connect_info> to set the
+L<DBD::InterBase> C<ib_softcommit> option.
+
+You need either this option or C<< disable_sth_caching => 1 >> for
+L<DBIx::Class> code to function correctly.
+
+The downside of using this option is that your process will B<NOT> see UPDATEs,
+INSERTs and DELETEs from other processes for already open statements.
+
+=cut
+
+sub connect_call_use_softcommit {
my $self = shift;
$self->_dbh->{ib_softcommit} = 1;
-
- $self->next::method(@_);
}
=head2 connect_call_datetime_setup
=item *
+with L</connect_call_use_softcommit>, you will not be able to see changes made
+to data in other processes. If this is an issue, use
+L<disable_sth_caching|DBIx::Class::Storage::DBI/disable_sth_caching>, this of
+course adversely affects performance.
+
+=item *
+
C<last_insert_id> support only works for Firebird versions 2 or greater. To
work with earlier versions, we'll need to figure out how to retrieve the bodies
of C<BEFORE INSERT> triggers and parse them for the C<GENERATOR> name.
next unless $dsn;
$schema = DBICTest::Schema->connect($dsn, $user, $pass, {
- auto_savepoint => 1,
- quote_char => q["],
- name_sep => q[.],
+ auto_savepoint => 1,
+ quote_char => q["],
+ name_sep => q[.],
+ on_connect_call => 'use_softcommit',
});
my $dbh = $schema->storage->dbh;
lives_and {
$ars->search({ name => 'foo' })->update({ rank => 4 });
- is $ars->search({ name => 'foo' })->first->rank, 4;
+ is eval { $ars->search({ name => 'foo' })->first->rank }, 4;
} 'Can update a column';
my ($updated) = $schema->resultset('Artist')->search({name => 'foo'});
- is $updated->rank, 4, 'and the update made it to the database';
+ is eval { $updated->rank }, 4, 'and the update made it to the database';
# test LIMIT support
# test iterator
$lim->reset;
- is( $lim->next->artistid, 101, "iterator->next ok" );
- is( $lim->next->artistid, 102, "iterator->next ok" );
+ is( eval { $lim->next->artistid }, 101, "iterator->next ok" );
+ is( eval { $lim->next->artistid }, 102, "iterator->next ok" );
is( $lim->next, undef, "next past end of resultset ok" );
# test multiple executing cursors