Is there a way to add the ONLY keyword to a postgres query? I'm able to do it without a Model and using knex with .from(knex.raw(ONLY parent)) directly but I was wondering if it were possible to modify a query to add ONLY. For example, I'm trying to perform a query involving inherited tables like so.
SELECT * FROM ONLY parent NATURAL FULL JOIN child;
with .joinRaw, I can add the NATURAL FULL JOIN.
I tried messing around with modifiers but couldn't seem to get it to work.
Is there a way to add the
ONLY
keyword to a postgres query? I'm able to do it without a Model and using knex with.from(knex.raw(ONLY parent))
directly but I was wondering if it were possible to modify a query to addONLY
. For example, I'm trying to perform a query involving inherited tables like so.SELECT * FROM ONLY parent NATURAL FULL JOIN child;
with .joinRaw, I can add the
NATURAL FULL JOIN
.I tried messing around with modifiers but couldn't seem to get it to work.