use strict;
-use warnings;
+use warnings;
use Test::More;
use Test::Exception;
$it->next;
is( $it->next, undef, "next past end of resultset ok" );
+# Limit with select-lock
+lives_ok {
+ $schema->txn_do (sub {
+ isa_ok (
+ $schema->resultset('Artist')->find({artistid => 1}, {for => 'update', rows => 1}),
+ 'DBICTest::Schema::Artist',
+ );
+ });
+} 'Limited FOR UPDATE select works';
+
my $test_type_info = {
'artistid' => {
'data_type' => 'INT',
# check for proper grouped counts
{
- my $ansi_schema = DBICTest::Schema->connect ($dsn, $user, $pass, { on_connect_call => 'set_strict_mode' });
+ my $ansi_schema = DBICTest::Schema->connect ($dsn, $user, $pass, {
+ on_connect_call => 'set_strict_mode',
+ quote_char => '`',
+ });
my $rs = $ansi_schema->resultset('CD');
my $years;
'grouped count correct',
);
}, 'Grouped count does not throw');
+
+ lives_ok( sub {
+ $ansi_schema->resultset('Owners')->search({}, {
+ join => 'books', group_by => [ 'me.id', 'books.id' ]
+ })->count();
+ }, 'count on grouped columns with the same name does not throw');
+
+
}
ZEROINSEARCH: {
my $schema2 = DBICTest::Schema->connect($dsn, $user, $pass);
$schema2->resultset("Artist")->find(4);
-isa_ok($schema2->storage->sql_maker, 'DBIx::Class::SQLAHacks::MySQL');
+isa_ok($schema2->storage->sql_maker, 'DBIx::Class::SQLMaker::MySQL');
done_testing;