arrayField
const arrayField: (input) => DrizzleRqbFieldSpec;Defined in: filters/drizzle-rqb.ts:136
Allow-list a public field as an array filter over a Postgres array column, named by its
Drizzle schema property key ("tags"). The ops map 1:1 to RQB’s arrayContains/
arrayContained/arrayOverlaps.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
input |
{ column: string; } |
input.column |
string |
Returns
Section titled “Returns”Example
Section titled “Example”import { arrayField, buildWhere } from "@xtandard/lib/filters/drizzle-rqb";
const { where } = buildWhere({ spec: { tags: arrayField({ column: "tags" }) }, filters: [{ field: "tags", filter: { kind: "array", operator: "arrayOverlaps", values: ["ts", "js"] } }],});// where → { tags: { arrayOverlaps: ["ts", "js"] } }