altcodepro-polydb-python 2.5.8__py3-none-any.whl → 2.5.10__py3-none-any.whl

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: altcodepro-polydb-python
3
- Version: 2.5.8
3
+ Version: 2.5.10
4
4
  Summary: Production-ready multi-cloud database abstraction layer with connection pooling, retry logic, and thread safety
5
5
  Author: AltCodePro
6
6
  Project-URL: Homepage, https://github.com/altcodepro/polydb-python
@@ -1,6 +1,6 @@
1
- altcodepro_polydb_python-2.5.8.dist-info/licenses/LICENSE,sha256=9X8GLocsBwy-5aR5JGOt2SAMDDPs9Qv-YnqmHBHOXrw,1067
1
+ altcodepro_polydb_python-2.5.10.dist-info/licenses/LICENSE,sha256=9X8GLocsBwy-5aR5JGOt2SAMDDPs9Qv-YnqmHBHOXrw,1067
2
2
  polydb/PolyDB.py,sha256=MG7-nV59zDvrUQwXNEgV4eetHCeW9TYY9DQqtxu_r7k,23543
3
- polydb/__init__.py,sha256=-0SpPirj1inBIC0gIZZJUIUIwioLokARRD0AmPxgAeA,1535
3
+ polydb/__init__.py,sha256=fCBBtF0JMYynCf4uRWqU9dWEXT6sqmnCmos-SQn15xI,1536
4
4
  polydb/advanced_query.py,sha256=JZUQr4wyC9ydrcO9VbZiH2ueiQiC4dxOX9hzG_JaFhs,6931
5
5
  polydb/batch.py,sha256=_DjWZa1ZXYSk6MLKqFe0eT7SYVRZtYNqZb9bI8Y2sao,4566
6
6
  polydb/cache.py,sha256=9UUHhiCVSWHQ-x-Ac_kIHYAadj0AQeqE4x8dwtyYFII,11781
@@ -26,7 +26,7 @@ polydb/adapters/AzureBlobStorageAdapter.py,sha256=4vD55Z8DBTzBK66jIJbo5bNMY-AQ61
26
26
  polydb/adapters/AzureFileStorageAdapter.py,sha256=VZNprqlBXCuWUgtqClNT-NrQmRf-XFYEiRA2BLbf-Sc,7046
27
27
  polydb/adapters/AzureKeyVaultAdapter.py,sha256=7Nizs9qGh6cytbZNgV78f-odOO4Z6sUlwm_HQYqt-pc,2339
28
28
  polydb/adapters/AzureQueueAdapter.py,sha256=15w0QQMBM53NIg10MZqdoweJyYtYdgR-SbZVwFqx3BI,13660
29
- polydb/adapters/AzureTableStorageAdapter.py,sha256=rifBIUCQ65K2q8JL6hiBwRPoBDX1MWtZSg-XZN7uVRw,30218
29
+ polydb/adapters/AzureTableStorageAdapter.py,sha256=2MjuRLQ1QXpYUvb5o-16bOUtAOcrwrQ0HyaDPdQnlz4,33341
30
30
  polydb/adapters/BlockchainBlobAdapter.py,sha256=D01Yua9mkKfaQrxKYApblIyI6DSP0dtNAh4Tav51HJ4,3299
31
31
  polydb/adapters/BlockchainFileAdapter.py,sha256=G749xOVpG20HuKS8zCgi6PMjoJNu-YXK7zitygjLdzM,8335
32
32
  polydb/adapters/BlockchainKVAdapter.py,sha256=UFYHyTgvdW-sZUBqyHEG3Cdx6wSTiF2QowEVWL3XPTg,4564
@@ -67,7 +67,7 @@ polydb/observability/logging.py,sha256=gv1SshNjaSkmR98Uv7Qbwq3gkeQUzVCA4ichqHKL6
67
67
  polydb/services/__init__.py,sha256=nMolMXzmhejRSm7f42kU9fCHF0GIpqpejN2kywuBsUQ,241
68
68
  polydb/services/compliance_service.py,sha256=-0ncX7PrXy4-NuyWXIv65cLUsqz0jXzb3LtsD8rlrXE,4983
69
69
  polydb/services/security_service.py,sha256=q7GzK6sbMnBBsc4fuL4oXTd-ui2b-MYQyrWTBvdVNSk,5062
70
- altcodepro_polydb_python-2.5.8.dist-info/METADATA,sha256=YN_Wx0CydP-r1TUSRLzmHmbquKp-jXg77THrIbRiHcQ,15598
71
- altcodepro_polydb_python-2.5.8.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
72
- altcodepro_polydb_python-2.5.8.dist-info/top_level.txt,sha256=WgLFWJoYjUhwvyPxJFl6jYLrVFuBJDX3OABf4ocwk_E,7
73
- altcodepro_polydb_python-2.5.8.dist-info/RECORD,,
70
+ altcodepro_polydb_python-2.5.10.dist-info/METADATA,sha256=Y9UsNA5a_hJVbkBIEghMYF0xQ9Ij2zFLXn71h8qQJI4,15599
71
+ altcodepro_polydb_python-2.5.10.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
72
+ altcodepro_polydb_python-2.5.10.dist-info/top_level.txt,sha256=WgLFWJoYjUhwvyPxJFl6jYLrVFuBJDX3OABf4ocwk_E,7
73
+ altcodepro_polydb_python-2.5.10.dist-info/RECORD,,
polydb/__init__.py CHANGED
@@ -4,7 +4,7 @@ PolyDB - Enterprise Cloud-Independent Database Abstraction
4
4
  Full LINQ support, field-level audit, cache, soft delete, overflow storage
5
5
  """
6
6
 
7
- __version__ = "2.5.8"
7
+ __version__ = "2.5.10"
8
8
 
9
9
  from .cloudDatabaseFactory import CloudDatabaseFactory
10
10
  from .databaseFactory import DatabaseFactory
@@ -493,6 +493,33 @@ class AzureTableStorageAdapter(NoSQLKVAdapter):
493
493
  table_client = self._get_table_client(model)
494
494
  safe_pk = self._sanitize_pk_rk(pk)
495
495
  safe_rk = self._sanitize_pk_rk(rk)
496
+ # Persist "id" as a REAL, queryable property whenever the
497
+ # caller's own data didn't already supply one -- not just
498
+ # synthesized onto this call's own return value below
499
+ # (`restored["id"] = safe_rk`), which only ever helped the
500
+ # ONE caller holding that return value. _query_raw already
501
+ # does the equivalent synthesis on the READ side (`out["id"]
502
+ # = ent_dict["RowKey"]` when absent) for a query's own
503
+ # results, but that can't fix a *filtered* read: a later
504
+ # `read_one(model, {"id": X, ...})` -- the ordinary
505
+ # id-addressed lookup every `update()`/`patch()` call makes
506
+ # for its own "before" read -- builds a real OData `id eq
507
+ # 'X'` filter against whatever property is actually named
508
+ # "id" on the stored entity. When the original create's own
509
+ # data never included one (true for essentially any model
510
+ # whose caller doesn't explicitly generate an id, default
511
+ # pk_field/rk_field or a custom mapping alike), that property
512
+ # never existed, so the filter matched nothing -- `before`
513
+ # came back None, and DatabaseFactory.update()'s own pk/rk
514
+ # recovery (see this file's own 2.5.7 changelog entry for the
515
+ # closely related bug) had nothing to recover from, falling
516
+ # through to a literal `str(None) == "None"` PartitionKey.
517
+ # Reproduced directly before this fix, not assumed: a create
518
+ # with no "id" in its own payload, followed by
519
+ # read_one(model, {"id": <the id the create call itself
520
+ # returned>}), always returned None.
521
+ if "id" not in data:
522
+ data = {**data, "id": safe_rk}
496
523
  entity = self._pack_entity(model, safe_pk, safe_rk, data)
497
524
  MAX_PROPERTY_CHARS = 30 * 1024
498
525
 
@@ -539,7 +566,26 @@ class AzureTableStorageAdapter(NoSQLKVAdapter):
539
566
  table_client.upsert_entity(reference_entity)
540
567
 
541
568
  restored = self._unpack_entity(model, entity)
542
- restored["id"] = safe_rk
569
+ # Mirror the write-side condition above (line ~521): only
570
+ # synthesize "id" onto the return value when the caller's own
571
+ # data didn't already supply one. Unconditionally overwriting
572
+ # it with safe_rk here was a real, reproduced bug -- whenever
573
+ # the caller's own id needed RowKey sanitization (contains a
574
+ # character Azure forbids in a RowKey: ':', ' ', '#', '?',
575
+ # '/', '\'), the PERSISTED "id" property kept the caller's
576
+ # original, unsanitized value (data["id"], written untouched
577
+ # via reference_entity above) while this return value handed
578
+ # back the sanitized safe_rk instead -- two different strings
579
+ # for the same row. Any caller holding onto that return
580
+ # value's own "id" (e.g. building a follow-up
581
+ # read_one(model, {"id": ...}) call, or an id.map() over a
582
+ # create_many result) would then filter for a value that
583
+ # never matches any real stored "id" property, silently
584
+ # getting nothing back. Reproduced directly before this fix:
585
+ # data={"id": "a:b"} on a model with a rk_field whose value
586
+ # contains ":" persisted "id"="a:b" but returned "id"="a_b".
587
+ if "id" not in data:
588
+ restored["id"] = safe_rk
543
589
 
544
590
  return restored
545
591