3 use dbixcsl_common_tests;
4 use dbixcsl_firebird_extra_tests;
6 my $dsn = $ENV{DBICTEST_FIREBIRD_DSN} || '';
7 my $user = $ENV{DBICTEST_FIREBIRD_USER} || '';
8 my $password = $ENV{DBICTEST_FIREBIRD_PASS} || '';
10 my $tester = dbixcsl_common_tests->new(
12 auto_inc_pk => 'INTEGER NOT NULL PRIMARY KEY',
14 my ($table, $col) = @_;
16 qq{ CREATE GENERATOR gen_${table}_${col} },
18 CREATE TRIGGER ${table}_bi FOR $table
19 ACTIVE BEFORE INSERT POSITION 0
22 IF (NEW.$col IS NULL) THEN
23 NEW.$col = GEN_ID(gen_${table}_${col},1);
28 auto_inc_drop_cb => sub {
29 my ($table, $col) = @_;
31 qq{ DROP TRIGGER ${table}_bi },
32 qq{ DROP GENERATOR gen_${table}_${col} },
36 loader_options => { unquoted_ddl => 1 },
37 extra => dbixcsl_firebird_extra_tests->extra,
40 password => $password,
41 connect_info_opts => { on_connect_call => 'use_softcommit' },
45 $tester->skip_tests('You need to set the DBICTEST_FIREBIRD_DSN, _USER, and _PASS environment variables');
48 # get rid of stupid warning from InterBase/GetInfo.pm
50 local $SIG{__WARN__} = sub {};
51 require DBD::InterBase;
52 require DBD::InterBase::GetInfo;