You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I see that Knex supports whereExists and whereNotExists, but I don't see how to use EXISTS as a select column expression. For example, something like the following:
select *,
exists (select * from order where order.person_id = people.id) as has_orders
from people;
Perhaps the usage would look something like this (modeled after count and whereExists).
Environment
Knex version: 2.4.2
Database + version: Postgres 14.7
OS: macOS
Feature discussion / request
I see that Knex supports whereExists and whereNotExists, but I don't see how to use EXISTS as a select column expression. For example, something like the following:
Perhaps the usage would look something like this (modeled after
count
andwhereExists
).Alternatively, it could take its alias_name as the first parameter, as window functions like row_number do.
The text was updated successfully, but these errors were encountered: