Do you have any plans to support SQL “with” statements?
ex:
with tempTable as (select….)
select *
from tablleA
inner join tempTable on…
Hello,
I’ve verified WITH clause on postgres database and it perform listing, search, sort, paging correctly.
Sample: https://gist.github.com/52cf1e394dd2fe159185f3944365d669
Example:
with item as (select stco, ststyl, stssfx from ststyl00)
select * from pdpick00
inner join item on stco = pdco and pdstyl = ststyl and pdssfx = stssfx
Generates error:
Couldn’t execute query. Keyword AS not expected. Valid tokens: FULL LEFT CROSS INNER RIGHT EXCEPTION. SQLCODE=-199 – SELECT count(*) as c FROM (with item as (select stco, ststyl, stssfx from ststyl00) select * from pdpick00 inner join item on stco = pdco and pdstyl = ststyl and pdssfx = stssfx WHERE 1=1) pg_tmp
I’ve updated same demo code, you can set custom count query if grid is not generating correct, by this:
https://gist.github.com/gridphp/52cf1e394dd2fe159185f3944365d669#file-db-layer-pgsql-php-L40