my $password = $ENV{DBICTEST_SYBASE_PASS} || '';
my $tester = dbixcsl_common_tests->new(
- vendor => 'Sybase',
+ vendor => 'sybase',
auto_inc_pk => 'INTEGER IDENTITY NOT NULL PRIMARY KEY',
dsn => $dsn,
user => $user,
password => $password,
+# This is necessary because there are too many cursors open for transactions on
+# insert to work.
+ connect_info_opts => { on_connect_call => 'unsafe_insert' }
);
if( !$dsn || !$user ) {
$self->create();
- my @connect_info = ( $self->{dsn}, $self->{user}, $self->{password} );
+ my @connect_info = (
+ $self->{dsn},
+ $self->{user},
+ $self->{password},
+ $self->{connect_info_opts},
+ );
# First, with in-memory classes
my $schema_class = $self->setup_schema(@connect_info);
use Test::More;
+my $vendor = 'mssql';
+
+sub vendor {
+ shift;
+ $vendor = shift;
+}
+
sub extra { +{
create => [
qq{
- CREATE TABLE [mssql_loader_test1.dot] (
+ CREATE TABLE [${vendor}_loader_test1.dot] (
id INT IDENTITY NOT NULL PRIMARY KEY,
dat VARCHAR(8)
)
},
],
- drop => [ qw/ [mssql_loader_test1.dot] / ],
+ drop => [ "[${vendor}_loader_test1.dot]" ],
count => 4,
run => sub {
my ($schema, $monikers, $classes) = @_;
- ok((my $rs = eval { $schema->resultset('MssqlLoaderTest1Dot') }),
+ my $vendor_titlecased = "\u\L$vendor";
+
+ ok((my $rs = eval {
+ $schema->resultset("${vendor_titlecased}LoaderTest1Dot") }),
'got a resultset');
ok((my $from = eval { $rs->result_source->from }),
is ref($from), 'SCALAR', '->table is a scalar ref';
- is eval { $$from }, '[mssql_loader_test1.dot]',
+ is eval { $$from }, "[${vendor}_loader_test1.dot]",
'->table name is correct';
},
}}