nexusLIMS.db.engine#
Database engine and session management for NexusLIMS.
This module provides a centralized SQLModel engine and session factory for database operations, replacing the manual sqlite3 connection management.
Module Contents#
Functions#
Get the database engine, creating it lazily on first access. |
API#
- nexusLIMS.db.engine.get_engine() Engine[source]#
Get the database engine, creating it lazily on first access.
- Returns:
The SQLAlchemy/SQLModel engine for the NexusLIMS database.
- Return type:
Examples:
>>> from nexusLIMS.db.engine import get_engine >>> engine = get_engine() >>> # Use engine for advanced operations