import { kysely } from "https://dotland.deno.dev/x/kysely_postgrs_js_dialect@v0.27.4/deps.ts";
const { MatchedThenableMergeQueryBuilder } = kysely;
Performs the delete
action.
To perform the do nothing
action, see {@link thenDoNothing}.
To perform the update
action, see {@link thenUpdate} or {@link 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>