Skip to main content

Module query

Module query 

Source
Expand description

Query template parsing and parameter resolution for SQL components.

This module provides parsing of Camel-style SQL templates with parameter placeholders and resolution of those parameters from an Exchange.

TODO(SQL-006): Named parameters using :name-style syntax (e.g. SELECT * FROM users WHERE name = :name) are not yet supported in downstream SQL execution. The query template parser supports :#name (Camel-style :# prefix) and positional #, but the underlying database driver binding currently only supports positional $1, $2, ... params.

Structs§

PreparedQuery
A fully resolved query ready for execution.
QueryTemplate
A parsed query template with fragments and parameter slots.

Enums§

ParamSlot
A parsed parameter slot in a query template.

Functions§

is_select_query
Returns true if SQL should run through select path.
parse_query_template
Parses a Camel-style SQL template into fragments and parameter slots.
resolve_params
Resolves parameter values from the exchange and builds the final SQL.
resolve_params_default