use DBIx::Class::Optional::Dependencies ();
use lib qw(t/lib);
use DBICTest;
+use SQL::Abstract 'is_literal_value';
plan skip_all => 'Test needs ' . DBIx::Class::Optional::Dependencies->req_missing_for ('test_rdbms_pg')
unless DBIx::Class::Optional::Dependencies->req_ok_for ('test_rdbms_pg');
lives_ok {
is_deeply (
$arr_rs->search({ arrayfield => { '=' => { -value => [3,4] }} })->first->arrayfield,
- [3,4],,
+ [3,4],
'Array value matches explicit equal'
);
} 'searching by arrayref (explicit equal sign)';
} 'find by arrayref (equal)';
# test inferred condition for creation
- TODO: for my $cond (
+ for my $cond (
{ -value => [3,4] },
\[ '= ?' => [arrayfield => [3, 4]] ],
) {
- local $TODO = 'No introspection of complex conditions :(';
+ local $TODO = 'No introspection of complex literal conditions :('
+ if is_literal_value $cond;
+
+
my $arr_rs_cond = $arr_rs->search({ arrayfield => $cond });
my $row = $arr_rs_cond->create({});