1use warnings; 2use strict; 3use lib '.'; 4use DBIx::Perlish qw/:all/; 5use Test::More; 6use t::test_utils; 7 8my $someid = 42; 9$main::flavor = "pg"; 10test_select_sql { 11 tbl->id <- tablefunc($someid); 12} "Pg: tablefunc IN subselect", 13"select * from tbl t01 where t01.id in (select tablefunc(?))", 14[42]; 15test_select_sql { 16 !tbl->id <- tablefunc($someid); 17} "Pg: tablefunc NOT IN subselect", 18"select * from tbl t01 where t01.id not in (select tablefunc(?))", 19[42]; 20test_select_sql { 21 my $p : table = tablefunc($someid); 22 return $p; 23} "Pg: tableop", 24"select t01.* from tablefunc(?) t01", 25[42]; 26 27my $two = 2; 28test_select_sql { return $two**5 } "supported exponent", 29"select (pow(?, 5))", [2]; 30 31done_testing; 32