booleanField
const booleanField: (input) => KyselyFieldSpec;Defined in: filters/kysely.ts:125
Allow-list a public field as a boolean filter (eq/ne/null checks) over a column given
as a Kysely reference string ("tasks.done") or a raw expression.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
input |
{ column: KyselyTarget; } |
input.column |
KyselyTarget |
Returns
Section titled “Returns”Example
Section titled “Example”import { booleanField, buildWhere } from "@xtandard/lib/filters/kysely";
const { where } = buildWhere({ spec: { done: booleanField({ column: "tasks.done" }) }, filters: [{ field: "done", filter: { kind: "boolean", operator: "eq", value: false } }],});const { sql, parameters } = where!.compile(db); // db: your Kysely instance// sql → '"tasks"."done" = $1', parameters → [false]