Skip to content

booleanField

const booleanField: (input) => DrizzleRqbFieldSpec;

Defined in: filters/drizzle-rqb.ts:119

Allow-list a public field as a boolean filter (eq/ne/null checks) over a column named by its Drizzle schema property key ("done").

Parameter Type
input { column: string; }
input.column string

DrizzleRqbFieldSpec

import { booleanField, buildWhere } from "@xtandard/lib/filters/drizzle-rqb";
const { where } = buildWhere({
spec: { done: booleanField({ column: "done" }) },
filters: [{ field: "done", filter: { kind: "boolean", operator: "eq", value: false } }],
});
// where → { done: { eq: false } }