sdmxlib 0.25.0__tar.gz → 0.26.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.
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/PKG-INFO +1 -1
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/pyproject.toml +1 -1
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/sql.py +16 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/README.md +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/__init__.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/api/__init__.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/api/client.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/api/federated.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/api/filters.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/api/policy.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/api/providers.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/api/query.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/api/registry.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/api/session.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/catalog.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/data_store.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/formats/__init__.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/formats/sdmx_csv/__init__.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/formats/sdmx_csv/reader.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/formats/sdmx_csv/writer.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/formats/sdmx_json/__init__.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/formats/sdmx_json/metadata.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/formats/sdmx_json/reader.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/formats/sdmx_json/writer.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/formats/sdmx_ml21/__init__.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/formats/sdmx_ml21/namespaces.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/formats/sdmx_ml21/reader.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/formats/sdmx_ml21/writer.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/formats/sdmx_ml30/__init__.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/formats/sdmx_ml30/metadata.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/formats/sdmx_ml30/namespaces.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/formats/sdmx_ml30/reader.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/formats/sdmx_ml30/writer.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/local/__init__.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/local/_data_store.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/local/_registry.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/model/__init__.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/model/annotations.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/model/base.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/model/binding.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/model/category.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/model/code_query.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/model/codelist.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/model/collections.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/model/concept.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/model/constraint.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/model/convert.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/model/dataflow.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/model/dataset.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/model/datastructure.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/model/expr.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/model/hierarchy.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/model/hierarchy_query.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/model/in_memory_registry.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/model/istring.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/model/mapping.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/model/message.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/model/metadataflow.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/model/metadataset.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/model/metadatastructure.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/model/organisation.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/model/provision.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/model/ref.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/model/registry.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/model/representation.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/model/urn.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/model/validation.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/polars.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/py.typed +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/rest.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/storage/__init__.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/storage/lazy.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/storage/readers.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/storage/schema.py +0 -0
- {sdmxlib-0.25.0 → sdmxlib-0.26.0}/src/sdmxlib/storage/writers.py +0 -0
|
@@ -99,11 +99,27 @@ class CompileContext:
|
|
|
99
99
|
join_sqls: list[str] = field(default_factory=list)
|
|
100
100
|
join_params: list[object] = field(default_factory=list)
|
|
101
101
|
schemas: dict[str, str] = field(default_factory=dict)
|
|
102
|
+
_alias_counter: int = 0
|
|
102
103
|
|
|
103
104
|
def schema(self, logical: str) -> str:
|
|
104
105
|
"""Resolve a logical schema name to its physical SQL identifier."""
|
|
105
106
|
return self.schemas.get(logical, logical)
|
|
106
107
|
|
|
108
|
+
def next_alias(self, prefix: str = "f") -> str:
|
|
109
|
+
"""Generate a unique SQL alias for use in a subquery or join.
|
|
110
|
+
|
|
111
|
+
Each call returns a fresh ``{prefix}{n}`` identifier. Predicate
|
|
112
|
+
compilers use this to give correlated subqueries unique table
|
|
113
|
+
aliases when multiple predicates would otherwise collide.
|
|
114
|
+
|
|
115
|
+
The counter is per-context (per-compilation-pass), so aliases are
|
|
116
|
+
deterministic within a query and naturally re-numbered for the
|
|
117
|
+
next compilation. Use a prefix like ``"ef"`` (exists filter) or
|
|
118
|
+
``"j"`` (join) to make the generated SQL self-documenting.
|
|
119
|
+
"""
|
|
120
|
+
self._alias_counter += 1
|
|
121
|
+
return f"{prefix}{self._alias_counter}"
|
|
122
|
+
|
|
107
123
|
|
|
108
124
|
@runtime_checkable
|
|
109
125
|
class Predicate(Protocol):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|