Changed and added comments in the database files

This commit is contained in:
2022-11-10 18:45:10 +03:00
parent c2280e8bc2
commit 21bd01c3ed
5 changed files with 12 additions and 4 deletions

View File

@ -5,7 +5,8 @@ from . import models
def get_master_pass(engine: Engine, user_id: int) -> tuple[bytes, bytes] | None:
"""Gets master pass. Returns tuple of salt and password"""
"""Gets master pass. Returns tuple of salt and password
or None if it wasn't found"""
statement = sqlmodel.select(models.MasterPass).where(
models.MasterPass.user_id == user_id
)
@ -27,7 +28,8 @@ def get_accounts(engine: Engine, user_id: int) -> list[str]:
def get_account_info(
engine: Engine, user_id: int, name: str
) -> tuple[bytes, bytes, bytes]:
"""Gets account info. Returns tuple of salt, login and password"""
"""Gets account info. Returns tuple of salt, login and password
or None if it wasn't found"""
statement = sqlmodel.select(models.Account).where(
models.Account.user_id == user_id, models.Account.name == name
)