thanaen
thanaen
DTDrizzle Team
Created by koshchei on 8/29/2023 in #help
Select EXISTS
I've done this, but Typescript isn't satisfied:
const rowExists = (
await db.execute(
sql`select exists (select 1 from ${myTable} where ${myTable.id} = ${someId})`,
)
).rows[0].exists;
const rowExists = (
await db.execute(
sql`select exists (select 1 from ${myTable} where ${myTable.id} = ${someId})`,
)
).rows[0].exists;
6 replies