Documentation
¶
Overview ¶
Package render evaluates the template tree into (SQL, args). Under the explicit model it removes nothing implicitly: text is emitted verbatim, directives are evaluated in place, and the author anchors clauses (1=1 / trailing id) so no connector is ever left dangling.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Evaluator expr.Evaluator
Placeholder dialect.Placeholder
Literal dialect.Literal
}
Config carries everything the renderer needs beyond the tree and the scope.
type Result ¶
Result is the rendered statement: the executable placeholder form (SQL) and its bind Args. ArgSpans[i] is the [start,end) byte range in SQL of the placeholder for Args[i] (they are appended together, so the slices stay aligned); callers splice literals into those ranges to build the values-embedded review form lazily, without a second render.