Skip to content

Connection Manager

amsdal_glue.ConnectionManager

Bases: ABC

register_connection_pool abstractmethod

register_connection_pool(connection, schema_name=None)

Registers a connection pool for a specific schema.

Parameters:

Name Type Description Default
connection ConnectionPoolBase

The connection pool to register.

required
schema_name str | None

The schema name for the connection pool.

None

has_multiple_models_connections abstractmethod

has_multiple_models_connections(connection_alias)

Checks if there are multiple model connections for the given alias.

Parameters:

Name Type Description Default
connection_alias ConnectionAlias

The connection alias to check.

required

Returns:

Name Type Description
bool bool

True if there are multiple model connections, False otherwise.

get_connection_pool abstractmethod

get_connection_pool(schema_name)

Retrieves the connection pool for a specific schema.

Parameters:

Name Type Description Default
schema_name str

The schema name for the connection pool.

required

Returns:

Name Type Description
ConnectionPoolBase ConnectionPoolBase

The connection pool instance.

disconnect_all abstractmethod

disconnect_all()

Disconnects all registered connection pools.