Skip to content

Commit ecb51c4

Browse files
chore: regenerate client from OpenAPI spec
1 parent 402efbc commit ecb51c4

3 files changed

Lines changed: 18 additions & 2 deletions

File tree

docs/QueryRequest.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ Name | Type | Description | Notes
88
------------ | ------------- | ------------- | -------------
99
**var_async** | **bool** | When true, execute the query asynchronously and return a query run ID for polling via GET /query-runs/{id}. The query results can be retrieved via GET /results/{id} once the query run status is \"succeeded\". | [optional]
1010
**async_after_ms** | **int** | If set with async=true, wait up to this many milliseconds for the query to complete synchronously before returning an async response. Minimum 1000ms. Ignored if async is false. | [optional]
11+
**default_catalog** | **str** | Catalog that unqualified table references resolve against. Only honored inside an `X-Database-Id` scope; sending it without that header is a 400. Must name a catalog visible in the database (`default`, an attached catalog alias, or a system catalog). Defaults to `default` when omitted. | [optional]
12+
**default_schema** | **str** | Schema that unqualified table references resolve against. Only honored inside an `X-Database-Id` scope; sending it without that header is a 400. Defaults to `main` when omitted. Existence is not validated up front — an unknown schema surfaces as a \"table not found\" error at planning time. | [optional]
1113
**sql** | **str** | |
1214

1315
## Example

hotdata/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def __init__(
9191
self.default_headers[header_name] = header_value
9292
self.cookie = cookie
9393
# Set default User-Agent.
94-
self.user_agent = 'OpenAPI-Generator/0.2.3/python'
94+
self.user_agent = 'OpenAPI-Generator/0.2.5/python'
9595
self.client_side_validation = configuration.client_side_validation
9696

9797
def __enter__(self):

hotdata/models/query_request.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@ class QueryRequest(BaseModel):
3030
""" # noqa: E501
3131
var_async: Optional[StrictBool] = Field(default=None, description="When true, execute the query asynchronously and return a query run ID for polling via GET /query-runs/{id}. The query results can be retrieved via GET /results/{id} once the query run status is \"succeeded\".", alias="async")
3232
async_after_ms: Optional[Annotated[int, Field(strict=True, ge=1000)]] = Field(default=None, description="If set with async=true, wait up to this many milliseconds for the query to complete synchronously before returning an async response. Minimum 1000ms. Ignored if async is false.")
33+
default_catalog: Optional[StrictStr] = Field(default=None, description="Catalog that unqualified table references resolve against. Only honored inside an `X-Database-Id` scope; sending it without that header is a 400. Must name a catalog visible in the database (`default`, an attached catalog alias, or a system catalog). Defaults to `default` when omitted.")
34+
default_schema: Optional[StrictStr] = Field(default=None, description="Schema that unqualified table references resolve against. Only honored inside an `X-Database-Id` scope; sending it without that header is a 400. Defaults to `main` when omitted. Existence is not validated up front — an unknown schema surfaces as a \"table not found\" error at planning time.")
3335
sql: StrictStr
34-
__properties: ClassVar[List[str]] = ["async", "async_after_ms", "sql"]
36+
__properties: ClassVar[List[str]] = ["async", "async_after_ms", "default_catalog", "default_schema", "sql"]
3537

3638
model_config = ConfigDict(
3739
populate_by_name=True,
@@ -77,6 +79,16 @@ def to_dict(self) -> Dict[str, Any]:
7779
if self.async_after_ms is None and "async_after_ms" in self.model_fields_set:
7880
_dict['async_after_ms'] = None
7981

82+
# set to None if default_catalog (nullable) is None
83+
# and model_fields_set contains the field
84+
if self.default_catalog is None and "default_catalog" in self.model_fields_set:
85+
_dict['default_catalog'] = None
86+
87+
# set to None if default_schema (nullable) is None
88+
# and model_fields_set contains the field
89+
if self.default_schema is None and "default_schema" in self.model_fields_set:
90+
_dict['default_schema'] = None
91+
8092
return _dict
8193

8294
@classmethod
@@ -91,6 +103,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
91103
_obj = cls.model_validate({
92104
"async": obj.get("async"),
93105
"async_after_ms": obj.get("async_after_ms"),
106+
"default_catalog": obj.get("default_catalog"),
107+
"default_schema": obj.get("default_schema"),
94108
"sql": obj.get("sql")
95109
})
96110
return _obj

0 commit comments

Comments
 (0)