Expand description
Structs§
- Compiled
Like Pattern - A LIKE/ILIKE pattern compiled once for repeated evaluation.
- Eval
Context
Enums§
Constants§
- NAMED_
ARG_ FUNCTION - Marker function the compiler wraps
name => valuecall arguments in (NamedArgExprhas no dedicated AST node). - TO_
HEX_ INT4_ FUNCTION - Physical scalar built-ins selected after
PostgreSQLoverload resolution has preserved the declared integer width. - TO_
HEX_ INT8_ FUNCTION
Traits§
- Engine
Hook - Engine-side hook that scalar function evaluation calls for stateful
sequence and user-defined functions. Query-valued expressions are not
accepted here: lowering assigns them physical query-plan slots executed by
uqa-execution::ScalarSubqueryRunner. - RowLookup
- Read-only row interface used by the expression evaluator. Most callers
use a materialised
ResultRow, while hot execution paths can expose a projected value slice without rebuilding a string-keyed map for every row.
Functions§
- array_
dimensions - Return every dimension of a rectangular array value.
- array_
value_ to_ string - builtin_
scalar_ function_ strictness - Return the
PostgreSQL18 strictness contract for a built-in scalar call when its implemented overload is known. - cast_
value - Cast a value to the named SQL type, mirroring
CAST(expr AS ty). Types outside the engine’s coercion surface returnSQLError::Unsupported. - cast_
value_ from - Cast a value while preserving an explicitly declared source type when the runtime carrier erases it.
PostgreSQL18 integer-to-bytea/oidcasts andxidcast rejection require the source’s declared identity. - eval
- Evaluate a value-producing expression. Function calls are not
dispatched here; the compiler routes them through the function
registry instead. Calling
evalon aFuncexpr returnsUnsupportedso latent function-in-projection bugs surface loudly. - eval_
binary_ values - Apply a binary SQL operator to values that have already been evaluated. Execution engines use this when a hot path compiles expression traversal ahead of time but must retain the evaluator’s exact comparison, numeric promotion, NULL, overflow, and division-by-zero semantics.
- eval_
binary_ values_ with_ integer_ width - Evaluate an operator while retaining the integer type selected by SQL
operator resolution. The dynamic
Valuecarrier stores all integers asi64, so expression plans pass this width alongside the operands. - eval_
comparison_ truth - Compare two values without allocating an intermediate
Value::Bool. - eval_
function_ call - Execute a scalar function after its argument expressions have already been evaluated.
- evaluate_
call_ args - Evaluate a call’s argument list, unwrapping
name => valuemarkers into(Some(name), value)pairs. - integer_
width_ for_ literal - integer_
width_ for_ type - negate_
value - Apply
PostgreSQLprefix-while retaining the operand’s declared type. - parse_
pg_ array_ literal - Parse a
PostgreSQLarray literal ({1,2,3},{"a b",NULL},{{1,2},{3,4}}) into nested lists of string/NULL values; the caller casts elements. - quote_
ident quote_ident: double-quote unless the identifier is a safe lower-case name that is not a keyword.- truthy
NULLis falsy; otherwise truthy iff the value coerces to a non-zero boolean / number / non-empty string.- unknown_
function_ error function name(arg types) does not exist- the errorPostgreSQLraises when call resolution fails (SQLSTATE 42883).- value_
to_ json_ text - Render an engine value as
PostgreSQLJSON input text without losing the lexical representation of values already typed asjsonorjsonb. - value_
to_ string - value_
to_ tensor - Coerce a
Valueinto a tensor: an array of homogeneous numeric vectors. Used byTENSOR(N)columns to store chunk embeddings for one row while still indexing each vector element. - value_
to_ vector - Coerce a
Valueinto aVec<f32>if it is a homogeneous numeric list (used to read vector literals fromARRAY[...]or$NVector params). - value_
type_ name PostgreSQL-style type name used in function-resolution errors.