Skip to content

Commit

Permalink
feat: add typing for groupby-only queries
Browse files Browse the repository at this point in the history
This commit adds typing to the groupby only queries.
  • Loading branch information
serramatutu committed Nov 12, 2024
1 parent b583741 commit bacafba
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 0 deletions.
18 changes: 18 additions & 0 deletions dbtsl/api/graphql/client/asyncio.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,15 @@ class AsyncGraphQLClient:
read_cache: bool = True,
) -> str: ...
@overload
async def compile_sql(
self,
group_by: List[str],
limit: Optional[int] = None,
order_by: Optional[List[Union[str, OrderByGroupBy]]] = None,
where: Optional[List[str]] = None,
read_cache: bool = True,
) -> str: ...
@overload
async def compile_sql(
self,
saved_query: str,
Expand All @@ -78,6 +87,15 @@ class AsyncGraphQLClient:
read_cache: bool = True,
) -> "pa.Table": ...
@overload
async def query(
self,
group_by: List[str],
limit: Optional[int] = None,
order_by: Optional[List[Union[str, OrderByGroupBy]]] = None,
where: Optional[List[str]] = None,
read_cache: bool = True,
) -> "pa.Table": ...
@overload
async def query(
self,
saved_query: str,
Expand Down
18 changes: 18 additions & 0 deletions dbtsl/api/graphql/client/sync.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,15 @@ class SyncGraphQLClient:
read_cache: bool = True,
) -> str: ...
@overload
def compile_sql(
self,
group_by: List[str],
limit: Optional[int] = None,
order_by: Optional[List[Union[str, OrderByGroupBy]]] = None,
where: Optional[List[str]] = None,
read_cache: bool = True,
) -> str: ...
@overload
def compile_sql(
self,
saved_query: str,
Expand All @@ -78,6 +87,15 @@ class SyncGraphQLClient:
read_cache: bool = True,
) -> "pa.Table": ...
@overload
def query(
self,
group_by: List[str],
limit: Optional[int] = None,
order_by: Optional[List[Union[str, OrderByGroupBy]]] = None,
where: Optional[List[str]] = None,
read_cache: bool = True,
) -> "pa.Table": ...
@overload
def query(
self,
saved_query: str,
Expand Down
18 changes: 18 additions & 0 deletions dbtsl/client/asyncio.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ class AsyncSemanticLayerClient:
read_cache: bool = True,
) -> str: ...
@overload
async def compile_sql(
self,
group_by: List[str],
limit: Optional[int] = None,
order_by: Optional[List[Union[str, OrderByGroupBy]]] = None,
where: Optional[List[str]] = None,
read_cache: bool = True,
) -> str: ...
@overload
async def compile_sql(
self,
saved_query: str,
Expand All @@ -48,6 +57,15 @@ class AsyncSemanticLayerClient:
read_cache: bool = True,
) -> "pa.Table": ...
@overload
async def query(
self,
group_by: List[str],
limit: Optional[int] = None,
order_by: Optional[List[Union[str, OrderByGroupBy]]] = None,
where: Optional[List[str]] = None,
read_cache: bool = True,
) -> "pa.Table": ...
@overload
async def query(
self,
saved_query: str,
Expand Down
18 changes: 18 additions & 0 deletions dbtsl/client/sync.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ class SyncSemanticLayerClient:
read_cache: bool = True,
) -> str: ...
@overload
def compile_sql(
self,
group_by: List[str],
limit: Optional[int] = None,
order_by: Optional[List[Union[str, OrderByGroupBy]]] = None,
where: Optional[List[str]] = None,
read_cache: bool = True,
) -> str: ...
@overload
def compile_sql(
self,
saved_query: str,
Expand All @@ -48,6 +57,15 @@ class SyncSemanticLayerClient:
read_cache: bool = True,
) -> "pa.Table": ...
@overload
def query(
self,
group_by: List[str],
limit: Optional[int] = None,
order_by: Optional[List[Union[str, OrderByGroupBy]]] = None,
where: Optional[List[str]] = None,
read_cache: bool = True,
) -> "pa.Table": ...
@overload
def query(
self,
saved_query: str,
Expand Down

0 comments on commit bacafba

Please sign in to comment.