import { kysely } from "https://dotland.deno.dev/x/kysely_postgrs_js_dialect@v0.27.3/mod.ts";
const { CaseBuilder } = kysely;
Methods
when<RE extends ReferenceExpression<DB, TB>, VE extends OperandValueExpressionOrList<DB, TB, RE>>(): CaseThenBuilder<DB, TB, W, O>
lhs: unknown extends W ? RE : KyselyTypeError<"when(lhs, op, rhs) is not supported when using case(value)">,
rhs: VE,
Adds a when
clause to the case statement.
A when
call must be followed by a {@link CaseThenBuilder.then} call.
when(expression: Expression<W>): CaseThenBuilder<DB, TB, W, O>