ralsei.jinja.wrapper
¶
Module Contents¶
Classes¶
Layer on top of |
API¶
- class ralsei.jinja.wrapper.SqlEnvironmentWrapper(env: ralsei.jinja.environment.SqlEnvironment, locals: dict[str, Any])¶
Layer on top of
ralsei.jinja.SqlEnvironment
with extra local variables- Parameters:¶
Initialization
- property adapter : ralsei.jinja.adapter.SqlAdapter¶
Type adapter that turns values in braces (like
{{value}}
) into SQL strings
- property dialect_info : ralsei.dialect.DialectInfo¶
Dialect-specific settings
-
from_string(source: str | jinja2.nodes.Template, globals: collections.abc.MutableMapping[str, Any] | None =
None
, template_class: None =None
) ralsei.jinja.environment.SqlTemplate ¶ See
jinja2.Environment.from_string()
By default, the template class will be
SqlTemplate
- render(source: str, /, *args: Any, **kwargs: Any) str ¶
Render template once, shorthand for
self.from_string().render()
- render_sql(source: str, /, *args: Any, **kwargs: Any) sqlalchemy.sql.elements.TextClause ¶
Render and wrap with
sqlalchemy.sql.expression.text()
- render_split(source: str, /, *args: Any, **kwargs: Any) list[str] ¶
Render as multiple statements, splitting on
{%split%}
tag
- render_sql_split(source: str, /, *args: Any, **kwargs: Any) list[sqlalchemy.sql.elements.TextClause] ¶
Render as multiple statements, splitting on
{%split%}
tag, wrap withsqlalchemy.sql.expression.text()
- property base : ralsei.jinja.environment.SqlEnvironment¶
The base environment