Manager
Database module to handle SQLAlchemy connections and interactions.
- exception ConnectionError[source]
Exception raised when connection fails.
- exception DatabaseError[source]
Base exception for database errors.
- class DatabaseManager(config, echo=False)[source]
Class to handle database operations using SQLAlchemy.
Initialize database connection.
- Parameters:
database (Path) – Path to the SQLite database file
echo (bool) – Enable SQL query logging if True
- _create_engine(echo)[source]
Create SQLAlchemy engine with proper settings.
- Return type:
- Parameters:
echo (bool) – Enable SQL query logging if True
- Returns:
Configured SQLAlchemy engine
- Return type:
Engine
- Raises:
ConnectionError – When invalid database settings are provided
- exception QueryError[source]
Exception raised when query fails.