Skip to content

firebird.driver.hooks

This module contains firebird-driver hooks. Uses hook mechanism from firebird-base package.

Imports from firebird.base.hooks: register_class, get_callbacks, add_hook and hook_manager.

Enums

firebird.driver.hooks.APIHook

Bases: Enum

Hooks related to the loading and initialization of the underlying Firebird client API.

Source code in firebird/driver/hooks.py
class APIHook(Enum):
    """Hooks related to the loading and initialization of the underlying Firebird client API.
    """
    LOADED = auto()
    "Called after the Firebird client library has been successfully loaded and basic interfaces obtained."

LOADED class-attribute instance-attribute

Called after the Firebird client library has been successfully loaded and basic interfaces obtained.

firebird.driver.hooks.ConnectionHook

Bases: Enum

Hooks related to the lifecycle of a database connection (attachment, detachment, dropping).

Source code in firebird/driver/hooks.py
class ConnectionHook(Enum):
    """Hooks related to the lifecycle of a database connection (attachment, detachment, dropping).
    """
    ATTACH_REQUEST = auto()
    "Called before attempting to attach to a database, allows interception or modification."
    ATTACHED = auto()
    "Called after a database connection (attachment) has been successfully established."
    DETACH_REQUEST = auto()
    "Called before attempting to detach from a database, allows cancellation."
    CLOSED = auto()
    "Called after a database connection has been successfully closed (detached)."
    DROPPED = auto()
    "Called after a database has been successfully dropped."

ATTACHED class-attribute instance-attribute

Called after a database connection (attachment) has been successfully established.

ATTACH_REQUEST class-attribute instance-attribute

Called before attempting to attach to a database, allows interception or modification.

CLOSED class-attribute instance-attribute

Called after a database connection has been successfully closed (detached).

DETACH_REQUEST class-attribute instance-attribute

Called before attempting to detach from a database, allows cancellation.

DROPPED class-attribute instance-attribute

Called after a database has been successfully dropped.

firebird.driver.hooks.ServerHook

Bases: Enum

Hooks related to the lifecycle of a service manager connection.

Source code in firebird/driver/hooks.py
class ServerHook(Enum):
    """Hooks related to the lifecycle of a service manager connection.
    """
    ATTACHED = auto()
    "Called after connecting to the Firebird service manager."

ATTACHED class-attribute instance-attribute

Called after connecting to the Firebird service manager.