Module

x/kysely_postgrs_js_dialect/mod.ts>kysely.CaseWhenBuilder#when

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

Adds a when clause to the case statement.

A when call must be followed by a {@link CaseThenBuilder.then} call.

Parameters

lhs: unknown extends W ? RE : KyselyTypeError<"when(lhs, op, rhs) is not supported when using case(value)">
rhs: VE

Parameters

expression: Expression<W>

Parameters

value: unknown extends W ? KyselyTypeError<"when(value) is only supported when using case(value)"> : W