Const= ANY() clause helper. Binds the array as a single parameter instead of expanding it. Semantically equivalent to IN for most cases, but retains a consistent query shape for query metrics.
BETWEEN helper.
SQL type cast helper (::type). Casts an expression or field to a PostgreSQL type. Returns an SQLChainableFragment so that fluent comparison methods can be chained.
Equality operator. Automatically converts null/undefined to IS NULL.
Greater-than comparison operator.
Greater-than-or-equal-to comparison operator.
ILIKE helper for case-insensitive matching (PostgreSQL-specific).
IN clause helper.
IS NOT NULL check helper.
IS NULL check helper.
JSON contained by operator (<@).
JSON contains operator (@>).
JSON deep path extraction helper (#>). Extracts a JSON sub-object at the specified key path, returning jsonb. Returns an SQLChainableFragment so that fluent comparison methods can be chained.
JSON deep path text extraction helper (#>>). Extracts a JSON sub-object at the specified key path as text. Returns an SQLChainableFragment so that fluent comparison methods can be chained.
JSON path extraction helper (->). Returns an SQLChainableFragment so that fluent comparison methods can be chained.
JSON path text extraction helper (->>). Returns an SQLChainableFragment so that fluent comparison methods can be chained.
LIKE helper for case-sensitive pattern matching.
LOWER helper Converts a string expression to lowercase. Returns an SQLChainableFragment so that fluent comparison methods can be chained.
Less-than comparison operator.
Less-than-or-equal-to comparison operator.
Inequality operator. Automatically converts null/undefined to IS NOT NULL.
NOT BETWEEN helper.
NOT ILIKE helper for case-insensitive non-matching (PostgreSQL-specific).
NOT IN clause helper.
NOT LIKE helper.
TRIM helper Removes leading and trailing whitespace from a string expression. Returns an SQLChainableFragment so that fluent comparison methods can be chained.
UPPER helper Converts a string expression to uppercase. Returns an SQLChainableFragment so that fluent comparison methods can be chained.
Logical AND of multiple fragments
COALESCE helper. Returns the first non-null value from the given expressions/values. Returns an SQLChainableFragment so that fluent comparison methods can be chained.
Parentheses helper for grouping conditions
Logical NOT of a fragment
Logical OR of multiple fragments
Common SQL helper functions for building queries.
All methods accept either a field name (string) or a SQLFragment/SQLChainableFragment as the first argument. When a SQLChainableFragment with a known TValue is passed (e.g. from trim, lower), value parameters are type-checked against that TValue.