knexify
knexify(
builder,where):QueryBuilder
Defined in: knexify.ts:95
Translates a structured where clause (with query operators) into Knex query builder calls.
Supported operators:
Comparison : $lt, $lte, $gt, $gte
Equality : $ne, $in, $nin
Logical : $or, $and
Pattern : $like, $notlike, $ilike (all clients — Knex compiles LIKE/ILIKE per dialect)
Containment: $contains — jsonb @> (PostgreSQL) or JSON_CONTAINS (MySQL) only
Null : field: null → IS NULL
field: { $ne: null } → IS NOT NULL
Dot-path field names ("metadata.owner.name") address nested JSON fields on PostgreSQL,
MySQL, SQLite, and MSSQL, for equality, $lt/$lte/$gt/$gte/$ne/$like/$notlike ($ilike on
PostgreSQL only — it isn’t standard SQL, unlike the others). $in/$nin/null-checks on a
dot-path field, and $contains combined with a dot-path field on a client outside
CONTAINS_FAMILIES, throw a clear BadRequest rather than emitting wrong or broken SQL.
Parameters
Section titled “Parameters”builder
Section titled “builder”QueryBuilder
Returns
Section titled “Returns”QueryBuilder