from sqlmodel import Session, select
from config.Database import Database

class UserDatabase(Database):
    def __init__(self) -> None:
        super(UserDatabase, self).__init__()

    async def get_by_params(self, object: object, email: str):
        with Session(self._engine) as session:
            statement = select(object).where(object.email == email)

            return session.exec(statement).first()
sqlmodel.Session sqlmodel.select
[((259, 280), 'sqlmodel.Session', 'Session', (['self._engine'], {}), '(self._engine)\n', (266, 280), False, 'from sqlmodel import Session, select\n'), ((317, 331), 'sqlmodel.select', 'select', (['object'], {}), '(object)\n', (323, 331), False, 'from sqlmodel import Session, select\n')]