sdmxlib 0.35.1__tar.gz → 0.35.2__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.35.1 → sdmxlib-0.35.2}/PKG-INFO +1 -1
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/pyproject.toml +1 -1
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/storage/writers.py +25 -10
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/README.md +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/__init__.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/_duckdb.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/api/__init__.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/api/client.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/api/federated.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/api/filters.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/api/policy.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/api/providers.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/api/query.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/api/registry.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/api/session.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/catalog.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/data_store.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/formats/__init__.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/formats/sdmx_csv/__init__.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/formats/sdmx_csv/reader.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/formats/sdmx_csv/writer.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/formats/sdmx_json/__init__.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/formats/sdmx_json/metadata.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/formats/sdmx_json/reader.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/formats/sdmx_json/writer.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/formats/sdmx_ml/__init__.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/formats/sdmx_ml/_common.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/formats/sdmx_ml21/__init__.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/formats/sdmx_ml21/namespaces.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/formats/sdmx_ml21/reader.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/formats/sdmx_ml21/writer.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/formats/sdmx_ml30/__init__.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/formats/sdmx_ml30/metadata.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/formats/sdmx_ml30/namespaces.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/formats/sdmx_ml30/reader.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/formats/sdmx_ml30/writer.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/formats/sdmx_ml31/__init__.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/formats/sdmx_ml31/namespaces.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/formats/sdmx_ml31/reader.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/formats/sdmx_ml31/writer.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/local/__init__.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/local/data_store.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/local/registry.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/model/__init__.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/model/annotations.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/model/base.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/model/binding.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/model/category.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/model/code_query.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/model/codelist.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/model/collections.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/model/concept.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/model/constraint.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/model/convert.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/model/dataflow.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/model/dataset.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/model/datastructure.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/model/expr.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/model/hierarchy.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/model/hierarchy_query.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/model/in_memory_registry.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/model/istring.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/model/mapping.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/model/message.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/model/metadataflow.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/model/metadataset.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/model/metadatastructure.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/model/organisation.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/model/provision.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/model/ref.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/model/registry.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/model/representation.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/model/urn.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/model/validation.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/polars.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/py.typed +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/rest.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/sql.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/storage/__init__.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/storage/_kinds.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/storage/lazy.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/storage/readers.py +0 -0
- {sdmxlib-0.35.1 → sdmxlib-0.35.2}/src/sdmxlib/storage/schema.py +0 -0
|
@@ -294,16 +294,31 @@ def _put_refs(
|
|
|
294
294
|
"""
|
|
295
295
|
if not refs:
|
|
296
296
|
return
|
|
297
|
-
#
|
|
298
|
-
#
|
|
299
|
-
#
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
297
|
+
# Arrow columnar bulk insert. The 0.35.0 executemany rewrite assumed
|
|
298
|
+
# DuckDB would amortise the ON CONFLICT PK lookup across the batch;
|
|
299
|
+
# the v0.35.1 instrumentation showed it doesn't — per-row cost on a
|
|
300
|
+
# 295k-edge hierarchy was 11.5 ms (issue #146 / #140). The Arrow
|
|
301
|
+
# path inserts the whole batch in one SELECT and never pays the
|
|
302
|
+
# per-row index lookup.
|
|
303
|
+
#
|
|
304
|
+
# ON CONFLICT is dropped: within one ``_put_refs`` call, source_urn
|
|
305
|
+
# is constant (one artefact's outgoing edges) and
|
|
306
|
+
# ``_delete_artefact_cascade`` has already cleared this artefact's
|
|
307
|
+
# prior rows, so no PK collision is possible across calls. Intra-
|
|
308
|
+
# call duplicates (a DSD referencing the same Codelist via two
|
|
309
|
+
# dimensions) are dedup'd here in Python, keeping the first ordinal
|
|
310
|
+
# seen — same set-semantics behaviour the ON CONFLICT clause used to
|
|
311
|
+
# give. The ordinal on this table is only a positional hint; the
|
|
312
|
+
# canonical per-dimension position lives in ``dsd_component``.
|
|
313
|
+
seen: dict[tuple[str, str, str], int | None] = {}
|
|
314
|
+
for src, tgt, role, ordinal in refs:
|
|
315
|
+
seen.setdefault((src, tgt, role), ordinal)
|
|
316
|
+
rows: list[list[Any]] = [[src, tgt, role, ordinal] for (src, tgt, role), ordinal in seen.items()]
|
|
317
|
+
_execute_bulk_insert(
|
|
318
|
+
conn,
|
|
319
|
+
"artefact_ref",
|
|
320
|
+
["source_urn", "target_urn", "role", "ordinal"],
|
|
321
|
+
rows,
|
|
307
322
|
)
|
|
308
323
|
|
|
309
324
|
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|