Generates an = ANY(?) condition. Unlike inArray, the array is bound
as a single parameter, producing a consistent query shape for query metrics.
Returns FALSE when the values array is empty.
The values to check membership against
A SQLFragment representing the = ANY condition
Generates a BETWEEN min AND max condition (inclusive on both ends).
A SQLFragment representing the BETWEEN condition
Generates an equality condition (= value).
Automatically converts null/undefined to IS NULL.
The value to compare against
A SQLFragment representing the equality condition
Get a debug representation of the query with values inline WARNING: This is for debugging only. Never execute the returned string directly.
Get bindings in the format expected by Knex. Knex expects a flat array where both identifiers and values are mixed in order.
function that resolves an entity field name to its database column name
Generates a greater-than condition (> value).
The value to compare against
A SQLFragment representing the condition
Generates a greater-than-or-equal-to condition (>= value).
The value to compare against
A SQLFragment representing the condition
Generates a case-insensitive ILIKE condition (PostgreSQL-specific).
The LIKE pattern (use % for wildcards, _ for single character)
A SQLFragment representing the ILIKE condition
Generates an IN (...) condition. Each array element becomes a separate
bound parameter (IN (?, ?, ?)).
Returns FALSE when the values array is empty.
The values to check membership against
A SQLFragment representing the IN condition
Generates an IS NOT NULL condition.
A SQLFragment representing the IS NOT NULL check
Generates an IS NULL condition.
A SQLFragment representing the IS NULL check
Generates a case-sensitive LIKE condition for pattern matching.
The LIKE pattern (use % for wildcards, _ for single character)
A SQLFragment representing the LIKE condition
Generates a less-than condition (< value).
The value to compare against
A SQLFragment representing the condition
Generates a less-than-or-equal-to condition (<= value).
The value to compare against
A SQLFragment representing the condition
Generates an inequality condition (!= value).
Automatically converts null/undefined to IS NOT NULL.
The value to compare against
A SQLFragment representing the inequality condition
Generates a NOT BETWEEN min AND max condition.
A SQLFragment representing the NOT BETWEEN condition
Generates a case-insensitive NOT ILIKE condition (PostgreSQL-specific).
The LIKE pattern (use % for wildcards, _ for single character)
A SQLFragment representing the NOT ILIKE condition
Generates a NOT IN (...) condition. Each array element becomes a separate
bound parameter.
Returns TRUE when the values array is empty.
The values to check non-membership against
A SQLFragment representing the NOT IN condition
Generates a case-sensitive NOT LIKE condition.
The LIKE pattern (use % for wildcards, _ for single character)
A SQLFragment representing the NOT LIKE condition
StaticconcatConcatenate multiple SQL fragments with space separator. Useful for combining SQL clauses like WHERE, ORDER BY, etc.
StaticjoinJoin multiple SQL fragments with a comma separator. Useful for combining column lists, value lists, etc.
Array of SQL fragments to join
An SQL expression that supports fluent comparison methods. Extends SQLFragment so it can be used anywhere a SQLFragment is accepted. The fluent methods return plain SQLFragment instances since they produce complete conditions, not further chainable expressions.