23 lines
577 B
Python
23 lines
577 B
Python
"""
|
|
Database session management (wrapper over shared module)
|
|
Uses unified module from shared/database/session.py
|
|
"""
|
|
from shared.database.session import (
|
|
init_db,
|
|
get_async_session_local,
|
|
get_engine
|
|
)
|
|
|
|
# For backward compatibility - get session factory
|
|
def get_AsyncSessionLocal():
|
|
"""Get session factory (for backward compatibility)"""
|
|
return get_async_session_local()
|
|
|
|
# Create object for backward compatibility
|
|
AsyncSessionLocal = get_async_session_local()
|
|
engine = get_engine()
|
|
|
|
# Export functions
|
|
__all__ = ['init_db', 'AsyncSessionLocal', 'engine']
|
|
|