8 my ($dsn, $user, $pass) = @ENV{map { "DBICTEST_MSSQL_${_}" } qw/DSN USER PASS/};
10 #warn "$dsn $user $pass";
12 plan skip_all => 'Set $ENV{DBICTEST_MSSQL_DSN}, _USER and _PASS to run this test'
17 DBICTest::Schema->compose_connection( 'MSSQLTest' => $dsn, $user, $pass );
19 my $dbh = MSSQLTest->schema->storage->dbh;
21 $dbh->do("IF OBJECT_ID('artist', 'U') IS NOT NULL
24 $dbh->do("CREATE TABLE artist (artistid INT IDENTITY PRIMARY KEY, name VARCHAR(255));");
26 MSSQLTest::Artist->load_components('PK::Auto::MSSQL');
29 my $new = MSSQLTest::Artist->create( { name => 'foo' } );
30 ok($new->artistid, "Auto-PK worked");
34 MSSQLTest::Artist->create( { name => 'Artist ' . $_ } );
37 my $it = MSSQLTest::Artist->search( { },
40 order_by => 'artistid'
44 is( $it->count, 3, "LIMIT count ok" );
45 ok( $it->next->name, "iterator->next ok" );
48 is( $it->next, undef, "next past end of resultset ok" );