Created Queries and Execute endpoint

This commit is contained in:
2025-02-24 12:15:01 +03:00
parent cabcf837f9
commit 836ce1dc82
14 changed files with 635 additions and 50 deletions

View File

@@ -17,3 +17,33 @@ class UserNotFound(HTTPException):
headers=None,
):
super().__init__(status_code, detail, headers)
class QueryValidationError(ValueError):
def __init__(self, loc: list[str], msg: str):
self.loc = loc
self.msg = msg
super().__init__(msg)
class QueryNotFound(HTTPException):
def __init__(self, status_code=404, detail = {
'message': "The referenced query was not found.",
"code": 'query-not-found'
}, headers = None):
super().__init__(status_code, detail, headers)
class ConnectionNotFound(HTTPException):
def __init__(self, status_code=404, detail = {
'message': "The referenced connection was not found.",
"code": 'connection-not-found'
}, headers = None):
super().__init__(status_code, detail, headers)
class PoolNotFound(HTTPException):
def __init__(self, status_code=404, detail = {
'message': "We didn't find a running Pool for the referenced connection.",
"code": 'pool-not-found'
}, headers = None):
super().__init__(status_code, detail, headers)