Hello,
is there a way to do LEFT JOIN LATERAL in PHQL?
Like in this example:
https://sqlfiddle.com/#!15/06dfe/6
https://stackoverflow.com/questions/30628950/postgresql-left-outer-join-on-json-array
by using some kind of dialect extension?
I can replace "->>" by postgresql function and update dialect similar to this:
$dialect = new \Phalcon\Db\Dialect\Postgresql();
$dialect->registerCustomFunction(
'jsonb_exists',
function($dialect, $expression) {
$arguments = $expression['arguments'];
return sprintf(
"jsonb_exists(%s, %s)",
$dialect->getSqlExpression($arguments[0]),
$dialect->getSqlExpression($arguments[1])
);
}
);
but how can I extend dialect to recognize LEFT JOIN LATERAL?