Module

x/kysely_postgrs_js_dialect/mod.ts>kysely.MatchedThenableMergeQueryBuilder#thenDoNothing

Kysely dialect for PostgreSQL using the Postgres.js client.
Latest
method kysely.MatchedThenableMergeQueryBuilder.prototype.thenDoNothing
import { kysely } from "https://dotland.deno.dev/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 {@link thenDelete}.

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()
  .thenDoNothing()
  .execute()

The generated SQL (PostgreSQL):

merge into "person"
using "pet" on "person"."id" = "pet"."owner_id"
when matched then
  do nothing