Ent API: exists() by Expression
Ent.exists(vc, { field: "...", ... }): boolean
const [exists1, exists2] = await Promise.all([
EntTopic.exists(vc, { creator_id: "123" }),
EntTopic.exists(vc, { updated_at: { $gt: new Date("2024-01-01") } }),
]);SET enable_seqscan=off;
SELECT EXISTS (SELECT true FROM topics WHERE creator_id='123')
UNION ALL
SELECT EXISTS (SELECT true FROM topics WHERE created_at>'...')Last updated