query-cache-common 1.6.0__tar.gz → 1.7.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {query_cache_common-1.6.0 → query_cache_common-1.7.0}/PKG-INFO +1 -1
- {query_cache_common-1.6.0 → query_cache_common-1.7.0}/src/query_cache_common/models/services/execution_service_models.py +30 -0
- {query_cache_common-1.6.0 → query_cache_common-1.7.0}/.gitignore +0 -0
- {query_cache_common-1.6.0 → query_cache_common-1.7.0}/pyproject.toml +0 -0
- {query_cache_common-1.6.0 → query_cache_common-1.7.0}/src/query_cache_common/__init__.py +0 -0
- {query_cache_common-1.6.0 → query_cache_common-1.7.0}/src/query_cache_common/auth.py +0 -0
- {query_cache_common-1.6.0 → query_cache_common-1.7.0}/src/query_cache_common/constants.py +0 -0
- {query_cache_common-1.6.0 → query_cache_common-1.7.0}/src/query_cache_common/decorators.py +0 -0
- {query_cache_common-1.6.0 → query_cache_common-1.7.0}/src/query_cache_common/models/__init__.py +0 -0
- {query_cache_common-1.6.0 → query_cache_common-1.7.0}/src/query_cache_common/models/_typing.py +0 -0
- {query_cache_common-1.6.0 → query_cache_common-1.7.0}/src/query_cache_common/models/base.py +0 -0
- {query_cache_common-1.6.0 → query_cache_common-1.7.0}/src/query_cache_common/models/converters.py +0 -0
- {query_cache_common-1.6.0 → query_cache_common-1.7.0}/src/query_cache_common/models/fields.py +0 -0
- {query_cache_common-1.6.0 → query_cache_common-1.7.0}/src/query_cache_common/models/services/__init__.py +0 -0
- {query_cache_common-1.6.0 → query_cache_common-1.7.0}/src/query_cache_common/models/services/client_telemetry_service_models.py +0 -0
- {query_cache_common-1.6.0 → query_cache_common-1.7.0}/src/query_cache_common/models/services/client_validation_service_models.py +0 -0
- {query_cache_common-1.6.0 → query_cache_common-1.7.0}/src/query_cache_common/models/services/clone_service_models.py +0 -0
- {query_cache_common-1.6.0 → query_cache_common-1.7.0}/src/query_cache_common/models/services/explain_service_models.py +0 -0
- {query_cache_common-1.6.0 → query_cache_common-1.7.0}/src/query_cache_common/models/services/sql_service_models.py +0 -0
- {query_cache_common-1.6.0 → query_cache_common-1.7.0}/src/query_cache_common/models/shared_models.py +0 -0
- {query_cache_common-1.6.0 → query_cache_common-1.7.0}/src/query_cache_common/utils.py +0 -0
|
@@ -5,6 +5,7 @@ from dataclasses import field
|
|
|
5
5
|
|
|
6
6
|
from query_cache_common.decorators import proto_dataclass
|
|
7
7
|
from query_cache_common.models import shared_models
|
|
8
|
+
from query_cache_common.models.services import sql_service_models
|
|
8
9
|
from query_cache_common.models.base import BaseSerDeModel
|
|
9
10
|
from query_cache_common.models.converters import dict_to_struct, struct_to_dict
|
|
10
11
|
from query_cache_protobuf.query_cache.services import execution_service_pb2
|
|
@@ -47,6 +48,22 @@ class SQLExecution(BaseSerDeModel):
|
|
|
47
48
|
semantic_extras: t.Dict[str, str] = field(default_factory=dict)
|
|
48
49
|
labels: t.Dict[str, str] = field(default_factory=dict)
|
|
49
50
|
|
|
51
|
+
@classmethod
|
|
52
|
+
def from_submit_sql_request(
|
|
53
|
+
cls, req: sql_service_models.SubmitEnrichedSQLRequest
|
|
54
|
+
) -> SQLExecution:
|
|
55
|
+
return cls(
|
|
56
|
+
target_table=req.target_table,
|
|
57
|
+
dialect=req.dialect,
|
|
58
|
+
default_catalog=req.default_catalog,
|
|
59
|
+
execution_type=req.execution_type,
|
|
60
|
+
sql=req.sql,
|
|
61
|
+
tables=req.tables,
|
|
62
|
+
query_dependencies=req.query_dependencies,
|
|
63
|
+
semantic_extras=req.semantic_extras,
|
|
64
|
+
labels=req.labels,
|
|
65
|
+
)
|
|
66
|
+
|
|
50
67
|
|
|
51
68
|
@proto_dataclass(execution_service_pb2.ValuesExecution)
|
|
52
69
|
class ValuesExecution(BaseSerDeModel):
|
|
@@ -57,6 +74,19 @@ class ValuesExecution(BaseSerDeModel):
|
|
|
57
74
|
semantic_extras: t.Dict[str, str] = field(default_factory=dict)
|
|
58
75
|
labels: t.Dict[str, str] = field(default_factory=dict)
|
|
59
76
|
|
|
77
|
+
@classmethod
|
|
78
|
+
def from_submit_values_request(
|
|
79
|
+
cls, req: sql_service_models.SubmitValuesRequest
|
|
80
|
+
) -> ValuesExecution:
|
|
81
|
+
return cls(
|
|
82
|
+
target_table=req.target_table,
|
|
83
|
+
dialect=req.dialect,
|
|
84
|
+
default_catalog=req.default_catalog,
|
|
85
|
+
values_hash=req.values_hash,
|
|
86
|
+
semantic_extras=req.semantic_extras,
|
|
87
|
+
labels=req.labels,
|
|
88
|
+
)
|
|
89
|
+
|
|
60
90
|
|
|
61
91
|
@proto_dataclass(execution_service_pb2.ExecutionOutcome)
|
|
62
92
|
class ExecutionOutcome(BaseSerDeModel):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{query_cache_common-1.6.0 → query_cache_common-1.7.0}/src/query_cache_common/models/__init__.py
RENAMED
|
File without changes
|
{query_cache_common-1.6.0 → query_cache_common-1.7.0}/src/query_cache_common/models/_typing.py
RENAMED
|
File without changes
|
|
File without changes
|
{query_cache_common-1.6.0 → query_cache_common-1.7.0}/src/query_cache_common/models/converters.py
RENAMED
|
File without changes
|
{query_cache_common-1.6.0 → query_cache_common-1.7.0}/src/query_cache_common/models/fields.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{query_cache_common-1.6.0 → query_cache_common-1.7.0}/src/query_cache_common/models/shared_models.py
RENAMED
|
File without changes
|
|
File without changes
|