Skip to content

booleanField

const booleanField: (input) => PostgrestFieldSpec;

Defined in: filters/postgrest.ts:117

Allow-list a public field as a boolean filter (eq/ne/null checks) over a PostgREST column.

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

PostgrestFieldSpec

import { booleanField, buildParams } from "@xtandard/lib/filters/postgrest";
const { params } = buildParams({
spec: { done: booleanField({ column: "done" }) },
filters: [{ field: "done", filter: { kind: "boolean", operator: "eq", value: false } }],
});
// params → [["done", "eq.false"]]