import { kysely } from "https://deno.land/x/kysely_postgrs_js_dialect@v0.27.4/mod.ts";
const { MatchedThenableMergeQueryBuilder } = kysely;
Performs the delete
action.
To perform the do nothing
action, see thenDoNothing.
To perform the update
action, see thenUpdate or thenUpdateSet.
Examples
const result = await db.mergeInto('person')
.using('pet', 'person.id', 'pet.owner_id')
.whenMatched()
.thenDelete()
.execute()
The generated SQL (PostgreSQL):
merge into "person"
using "pet" on "person"."id" = "pet"."owner_id"
when matched then
delete
Returns
WheneableMergeQueryBuilder<DB, TT, ST, O>