Group
Extension

Matches 1

SQL-Abstract-Pg ( S/SR/SRI/SQL-Abstract-Pg-1.0.tar.gz, SRI, 2021; MetaCPAN )
SQL-Abstract-Pg/lib/SQL/Abstract/Pg.pm ( view source; MetaCPAN )
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

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.