ralsei.connection.ext

Module Contents

Classes

ConnectionExt

Extends sqlalchemy’s Connection with additional utility methods

API

class ralsei.connection.ext.ConnectionExt(engine: sqlalchemy.engine.base.Engine, connection: sqlalchemy.pool.PoolProxiedConnection | None = None, _has_events: bool | None = None, _allow_revalidate: bool = True, _allow_autobegin: bool = True)

Bases: sqlalchemy.engine.Connection

Extends sqlalchemy’s Connection with additional utility methods

Initialization

Construct a new Connection.

execute_text(statement: str, parameters: sqlalchemy.engine.interfaces._CoreAnyExecuteParams | None = None) sqlalchemy.engine.CursorResult[Any]

Execute a sql string

executescript(statements: collections.abc.Iterable[sqlalchemy.sql.expression.Executable], parameters: collections.abc.Mapping[str, Any] | None = None)

Execute a series of statements, similar to sqlite’s executescript

executescript_text(statements: collections.abc.Iterable[str], parameters: collections.abc.Mapping[str, Any] | None = None)

Execute a series of string statements, similar to sqlite’s executescript

__enter__() Self