ORIONIS API REFERENCE

THE ORIONIS API

Build with clarity.

Explore the building blocks of an async-first Python framework. Every module, class, and method — connected, searchable, and ready to build with.

class documentation

class ConnectionResolver: (source)

View In Hierarchy

Static bridge between the ORM and the database connection manager.

The database service provider installs the manager here during boot; models and query builders resolve their connections through this class without ever touching the container or the SQL engine.

Class Method clear Remove the installed manager, mainly for test isolation.
Class Method connection Resolve a database connection by name.
Class Method manager Return the installed connection manager.
Class Method setManager Install the connection manager used by every model.
Class Variable _manager Connection manager used to resolve database services.
def clear(cls): (source)

Remove the installed manager, mainly for test isolation.

Returns
NoneNo return value.
def connection(cls, name: str | None = None) -> IConnection: (source)

Resolve a database connection by name.

Parameters
name:str or None, optionalConnection name, or None for the default connection.
Returns
orionis.database.contracts.IConnectionResolved connection.
Raises
orionis.orm.exceptions.OrmConfigurationExceptionIf no manager has been installed yet.
orionis.database.ConnectionNotFoundExceptionIf the connection is not declared in the configuration.
def manager(cls) -> IConnectionManager: (source)

Return the installed connection manager.

Returns
orionis.database.contracts.IConnectionManagerManager resolving named database connections.
Raises
orionis.orm.exceptions.OrmConfigurationExceptionIf no manager has been installed yet.
def setManager(cls, manager: IConnectionManager): (source)

Install the connection manager used by every model.

Parameters
manager:orionis.database.contracts.IConnectionManagerManager resolving named database connections.
Returns
NoneNo return value.
_manager: ClassVar[IConnectionManager | None] = (source)

Connection manager used to resolve database services.