}
},
+], unary_ops => [
+ # unary op from Mojo::Pg
+ {regex => qr/^json$/i,
+ handler => sub { '?', { json => $_[2] } }
+ },
]);
my @tests = (
bind => [],
},
+ #3
+ { where => { foo => { -json => { bar => 'baz' } } },
+ stmt => "WHERE foo = ?",
+ bind => [ { json => { bar => 'baz' } } ],
+ },
+
+ #4
+ { where => { foo => { '@>' => { -json => { bar => 'baz' } } } },
+ stmt => "WHERE foo @> ?",
+ bind => [ { json => { bar => 'baz' } } ],
+ },
+
);
for (@tests) {