CloudSqlEngineManager#
- class safir.database.CloudSqlEngineManager(config, connect_args)#
Bases:
EngineManagerManages a Cloud SQL database engine and its associated resources.
This class should be created via
engine_manager, not directly.- Parameters:
config (
CloudSqlConfig) – Connection configuration for the Cloud SQL database.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
- async aclose()#
Close the engine and all associated resources.
- Return type:
- Overrides:
- 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:
- Overrides: