Help for this page

Select Code to Download


  1. or download this
     
    use v5.22.0;
    use Mojo::Pg;
    ...
    say $pg->db->query('select ?::json as foo', {json => {bar => 'baz'}})
      ->expand->hash->{foo}{bar};
    
  2. or download this
    -- 1 up
    create table if not exists posts (
    ...
    -- 1 down
    drop table if exists posts;