StaticHasChecks whether SQL contains composition tokens. Convenience wrapper for callers that need a fast guard.
StaticResolveResolves only the composition step — for callers that need composition without the full pipeline (e.g., save-time token analysis).
Wraps QueryCompositionEngine.ResolveComposition to maintain the existing public API while the internal implementation may change.
OptionalouterParams: Record<string, string>OptionalinlineDependencies: QueryDependencySpec[]StaticRunRuns the full rendering pipeline: composition → Nunjucks → paging.
Raw SQL with potential composition tokens and template expressions
Pipeline context (platform, user, parameters, paging, etc.)
Final SQL, applied parameters, composition metadata, and diagnostic trace
RenderPipeline wraps the existing composition → template → paging calls into a single entry point with enforced ordering and diagnostic tracing.
Pipeline order (this is a data dependency, not a convention):
{{query:"..."}}tokens into CTEs. Must run BEFORE Nunjucks because pass-through parameters rename{{ innerParam }}to{{ outerParam }}— Nunjucks needs those tokens intact.{{ param | filter }}and{% if/for %}blocks. Must run AFTER composition and BEFORE paging.{% if SortField %} ORDER BY ... {% endif %}resolved to an actual ORDER BY or not — that depends on runtime parameter values.The
Tracefield on the result captures the SQL state after each pass, enabling diagnosis when SQL Server rejects the output.