Module

x/kysely_postgrs_js_dialect/deps.ts>kysely.CaseBuilder#when

Kysely dialect for PostgreSQL using the Postgres.js client.
method kysely.CaseBuilder.prototype.when
import { kysely } from "https://dotland.deno.dev/x/kysely_postgrs_js_dialect@v0.27.3/deps.ts";
const { CaseBuilder } = 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