Initial release: async repository layer over SQLModel

This commit is contained in:
2026-08-13 22:25:59 +03:00
commit 3d85c2b5dd
26 changed files with 2252 additions and 0 deletions

17
metaorm/exceptions.py Normal file
View File

@@ -0,0 +1,17 @@
class DatabaseException(Exception):
pass
class NotFoundError(DatabaseException):
def __init__(self, detail: str = "Not found"):
super().__init__(detail)
class HaveNoSessionError(DatabaseException):
def __init__(self):
super().__init__("Have no actual session")
class AlreadyExistsError(DatabaseException):
def __init__(self, detail: str = "Record already exists"):
super().__init__(detail)