Documentation
¶
Overview ¶
Package query parses named DML query files (sqlc-style annotations) and maps each query to a pluginv1.Query IR node.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Infer ¶
Infer mutates q by:
- Walking the AST to collect ParameterRef nodes → QueryParameter entries.
- Attempting shallow type inference for parameters by examining operator operands — if a param appears beside a resolved ColumnRef, the param inherits the column's type.
- For SELECT queries, resolving SelectTarget nodes to QueryColumn entries.
Unresolvable items produce a diagnostic but never a panic.
func ParseQueries ¶
ParseQueries scans sql for named query blocks, parses each, and returns the resulting []*pluginv1.Query.
A query block begins with a header comment:
-- name: QueryName :command
and extends until the next header (or EOF). If a body fails to parse it is silently skipped; the caller may emit a diagnostic.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.