- add som descriptions
This commit is contained in:
@@ -4,6 +4,12 @@ from sqlalchemy.ext.asyncio import AsyncSession, create_async_engine, async_sess
|
|||||||
from sqlalchemy.pool import NullPool
|
from sqlalchemy.pool import NullPool
|
||||||
|
|
||||||
class DbConnector:
|
class DbConnector:
|
||||||
|
"""
|
||||||
|
Must create instance of singleton and then must be initialized using method init.
|
||||||
|
Right place for init db is for example in main before uvicorn.run
|
||||||
|
|
||||||
|
:raises SQLAlchemyError, IntegrityError, OperationalError, ...
|
||||||
|
"""
|
||||||
_instances = {}
|
_instances = {}
|
||||||
|
|
||||||
def __new__(cls, db_id="default"):
|
def __new__(cls, db_id="default"):
|
||||||
|
|||||||
Reference in New Issue
Block a user