Skip to main content
Module

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

Kysely dialect for PostgreSQL using the deno-postgres client.
Latest
method kysely.CaseWhenBuilder.prototype.when
import { kysely } from "https://deno.land/x/kysely_deno_postgres_dialect@v0.27.1/mod.ts";
const { CaseWhenBuilder } = kysely;

Adds a when clause to the case statement.

A when call must be followed by a 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