EngineManager#
- class safir.database.EngineManager(connect_args)#
Bases:
objectBase class for database engine management.
This class should be created via
engine_manager, not directly.- Parameters:
connect_args (
dict[str,Any] |None) – Additional connection arguments to pass directly to the underlying database driver.
Methods Summary
aclose()Close the engine and all associated resources.
Create a new database engine.
Methods Documentation
- abstractmethod async create_engine()#
Create a new database engine.
Prefer using this class as a context manager instead where possible. If this method is used, the caller must call
acloseon this object when the engine is no longer needed rather than calling thedisposemethod directly.- Returns:
Newly-created database engine.
- Return type: