1 package make_dbictest_db;
7 eval { require DBD::SQLite };
8 my $class = $@ ? 'SQLite2' : 'SQLite';
10 my $fn = './t/dbictest.db';
14 my $dbh = DBI->connect("dbi:$class:dbname=./t/dbictest.db");
18 fooid INTEGER PRIMARY KEY,
22 barid INTEGER PRIMARY KEY,
23 fooref INTEGER REFERENCES foo(fooid)
25 q|INSERT INTO foo VALUES (1,'Foo text for number 1')|,
26 q|INSERT INTO foo VALUES (2,'This is the text of the only Foo record associated with the Bar with barid 3')|,
27 q|INSERT INTO foo VALUES (3,'Foo text for number 3')|,
28 q|INSERT INTO foo VALUES (4,'Foo text for number 4')|,
29 q|INSERT INTO bar VALUES (1,4)|,
30 q|INSERT INTO bar VALUES (2,3)|,
31 q|INSERT INTO bar VALUES (3,2)|,
32 q|INSERT INTO bar VALUES (4,1)|,