unless ($dsn && $user && $pass);
-plan tests => 35;
+plan tests => 36;
DBICTest::Schema->load_classes( 'Casecheck', 'ArrayTest' );
my $schema = DBICTest::Schema->connect($dsn, $user, $pass);
'columns_info_for - column data types');
SKIP: {
- skip "SQL::Abstract < 1.50 does not pass through arrayrefs", 2 if $SQL::Abstract::VERSION < 1.50;
+ skip "SQL::Abstract < 1.50 does not pass through arrayrefs", 3
+ if $SQL::Abstract::VERSION < 1.50;
lives_ok {
$schema->resultset('ArrayTest')->create({
arrayfield => [3, 4],
});
} 'updating arrayref as pg array data';
+
+ $schema->resultset('ArrayTest')->create({
+ arrayfield => [5, 6],
+ });
+
+ my $count;
+ lives_ok {
+ $count = $schema->resultset('ArrayTest')->search({
+ arrayfield => \[ '= ?' => [3, 4] ], #TODO anything less ugly than this?
+ })->count;
+ } 'comparing arrayref to pg array data does not blow up';
+ is($count, 1, 'comparing arrayref to pg array data gives correct result');
}