ub new {
my $self = shift->SUPER::new(@_);
# -json op
push @{$self->{unary_ops}}, {
regex => qr/^json$/,
handler => sub { '?', {json => $_[2]} }
};
return $self;
}
sub _insert_r
ostgreSQL features used by L<Mojo::Pg>.
=head2 JSON
In many places (as supported by L<SQL::Abstract>) you can use the C<-json> unary op to encode JSON from Perl data
structures.
# "UPDATE some_ta
('some_table', {foo => {-json => [1, 2, 3]}}, {bar => 23});
# "SELECT * FROM some_table WHERE foo = '[1,2,3]'"
$abstract->select('some_table', '*', {foo => {'=' => {-json => [1, 2, 3]}}});
=head