ralsei.jinja.interface
¶
Module Contents¶
Classes¶
Interface describing a |
API¶
- class ralsei.jinja.interface.ISqlEnvironment¶
Bases:
typing.Protocol
Interface describing a
ralsei.jinja.SqlEnvironment
like object(including
ralsei.jinja.SqlEnvironmentWrapper
)- 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