Module

x/kysely_postgrs_js_dialect/mod.ts>kysely.OnConflictBuilder#doNothing

Kysely dialect for PostgreSQL using the Postgres.js client.
Latest
method kysely.OnConflictBuilder.prototype.doNothing
import { kysely } from "https://dotland.deno.dev/x/kysely_postgrs_js_dialect@v0.27.4/mod.ts";
const { OnConflictBuilder } = kysely;

Adds the "do nothing" conflict action.

Examples

await db
  .insertInto('person')
  .values({ first_name, pic })
  .onConflict((oc) => oc
    .column('pic')
    .doNothing()
  )

The generated SQL (PostgreSQL):

insert into "person" ("first_name", "pic")
values ($1, $2)
on conflict ("pic") do nothing