Optionalinit: Partial<QueryExecutionSpec>OptionalDependenciesInline dependency queries for composition resolution. Recursive — each dependency can itself declare further dependencies. When resolving {{query:"CategoryPath/QueryName"}}, the engine checks this map first, then falls back to Metadata.Provider.Queries.
OptionalMaxMax rows to return. Default: unlimited for saved queries, 100 for test queries.
OptionalParameterParameter definitions for validation. For saved queries, populated from QueryInfo.Parameters. For transient queries, optional — if omitted, parameters are passed through without validation.
OptionalParametersParameter values for Nunjucks template substitution
The raw SQL — may contain {{query:"..."}} and {{ param }} tokens
OptionalUsesWhether this query uses Nunjucks template syntax
StaticFromCreates a QueryExecutionSpec from a persisted QueryInfo object. This is the bridge between the upper layer (saved queries) and the lower layer (spec execution).
The saved query metadata
Target database platform for SQL resolution
Optionalparameters: Record<string, string>Optional parameter values for Nunjucks template substitution
A fully populated QueryExecutionSpec ready for the lower-layer pipeline
Fully describes a query for execution without requiring database persistence. Used as the common execution interface for both saved queries (via RunQuery) and transient test queries (via TestQuerySQL).
This is the "lower layer" data structure in the two-layer execution architecture: