pub fn template_sql(
sql: &str,
config: &TemplateConfig,
) -> Result<String, TemplateError>Expand description
Renders a SQL template according to the specified configuration.
This is the main entry point for template preprocessing. It dispatches to the appropriate renderer based on the configured mode.
§Arguments
sql- The SQL template string to renderconfig- Configuration specifying the mode and context variables
§Returns
The rendered SQL string, or an error if rendering fails.
§Errors
TemplateError::SyntaxError- Invalid template syntaxTemplateError::UndefinedVariable- Undefined variable in Jinja modeTemplateError::RenderError- Other rendering failures