ralsei.jinja.adapter

Module Contents

Classes

SqlAdapter

Transform values into their SQL representation

API

class ralsei.jinja.adapter.SqlAdapter

Transform values into their SQL representation

Initialization

register_type(type_: type[ralsei.jinja.adapter.SqlAdapter.register_type.T], to_sql: collections.abc.Callable[[ralsei.jinja.adapter.SqlAdapter.register_type.T], str])

Register SQL renderer function for a type

to_sql(value: Any) str

Get SQL representation of a value

format(source: str, /, *args, **kwargs) str

Similar to str.format(), but applies to_sql() to each parameter