8 my $schema = DBICTest->init_schema();
12 # figure out if we've got a version of sqlite that is older than 3.2.6, in
13 # which case COUNT(DISTINCT()) doesn't work
14 my $is_broken_sqlite = 0;
15 my ($sqlite_major_ver,$sqlite_minor_ver,$sqlite_patch_ver) =
16 split /\./, $schema->storage->dbh->get_info(18);
17 if( $schema->storage->dbh->get_info(17) eq 'SQLite' &&
18 ( ($sqlite_major_ver < 3) ||
19 ($sqlite_major_ver == 3 && $sqlite_minor_ver < 2) ||
20 ($sqlite_major_ver == 3 && $sqlite_minor_ver == 2 && $sqlite_patch_ver < 6) ) ) {
21 $is_broken_sqlite = 1;
27 my $new = $schema->resultset("Artist")->new({
30 name=>'JohnNapiorkowski',
33 $new->update_or_insert;
35 my $resultset = $schema->resultset("Artist")->find({artistid=>25});
37 is($resultset->id, 25, 'Testing New ID');
38 is($resultset->name, 'JohnNapiorkowski', 'Testing New Name');