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