mainsequence-metatable 0.1.2.dev3__py3-none-any.whl → 0.1.2.dev4__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.
- api/backend/operations/import_relations.py +1 -3
- api/backend/persistence/projections.py +8 -1
- {mainsequence_metatable-0.1.2.dev3.dist-info → mainsequence_metatable-0.1.2.dev4.dist-info}/METADATA +1 -1
- {mainsequence_metatable-0.1.2.dev3.dist-info → mainsequence_metatable-0.1.2.dev4.dist-info}/RECORD +8 -8
- {mainsequence_metatable-0.1.2.dev3.dist-info → mainsequence_metatable-0.1.2.dev4.dist-info}/WHEEL +0 -0
- {mainsequence_metatable-0.1.2.dev3.dist-info → mainsequence_metatable-0.1.2.dev4.dist-info}/entry_points.txt +0 -0
- {mainsequence_metatable-0.1.2.dev3.dist-info → mainsequence_metatable-0.1.2.dev4.dist-info}/licenses/LICENSE +0 -0
- {mainsequence_metatable-0.1.2.dev3.dist-info → mainsequence_metatable-0.1.2.dev4.dist-info}/top_level.txt +0 -0
|
@@ -335,9 +335,7 @@ def replace_projection(session, row, value):
|
|
|
335
335
|
session,
|
|
336
336
|
table=row,
|
|
337
337
|
contract=value,
|
|
338
|
-
foreign_key_targets=
|
|
339
|
-
session, data_source_uid=row.data_source_uid, contract=value
|
|
340
|
-
),
|
|
338
|
+
foreign_key_targets=None,
|
|
341
339
|
)
|
|
342
340
|
|
|
343
341
|
|
|
@@ -99,7 +99,7 @@ def resolved_foreign_key_targets(
|
|
|
99
99
|
|
|
100
100
|
|
|
101
101
|
def materialize_contract_projection(
|
|
102
|
-
session: Session, *, table: MetaTable, contract: dict, foreign_key_targets: list[UUID]
|
|
102
|
+
session: Session, *, table: MetaTable, contract: dict, foreign_key_targets: list[UUID] | None
|
|
103
103
|
) -> None:
|
|
104
104
|
"""Insert projections with the table in its caller-owned transaction."""
|
|
105
105
|
for column in contract["columns"]:
|
|
@@ -131,6 +131,13 @@ def materialize_contract_projection(
|
|
|
131
131
|
contract_fragment=index,
|
|
132
132
|
)
|
|
133
133
|
)
|
|
134
|
+
# A replacement must expose its new keys inside this transaction before
|
|
135
|
+
# validating references to itself, including newly reflected composite keys.
|
|
136
|
+
session.flush()
|
|
137
|
+
if foreign_key_targets is None:
|
|
138
|
+
foreign_key_targets = resolved_foreign_key_targets(
|
|
139
|
+
session, data_source_uid=table.data_source_uid, contract=contract
|
|
140
|
+
)
|
|
134
141
|
for foreign_key, target_uid in zip(contract["foreign_keys"], foreign_key_targets, strict=True):
|
|
135
142
|
session.add(
|
|
136
143
|
MetaTableForeignKey(
|
{mainsequence_metatable-0.1.2.dev3.dist-info → mainsequence_metatable-0.1.2.dev4.dist-info}/RECORD
RENAMED
|
@@ -130,7 +130,7 @@ api/backend/operations/bootstrap_migrations.py,sha256=8ms04zilbLoRiKwQw6jhId94l_
|
|
|
130
130
|
api/backend/operations/catalog_schema.py,sha256=zO1bw7eof_Yw4P76X34Sg5-YohNfLVV-d-uoEkoVERY,2907
|
|
131
131
|
api/backend/operations/create_table.py,sha256=vwn4IIakilMtxfBfrr1D9Tb6DSk-P3hxpSXvfCexXbQ,7143
|
|
132
132
|
api/backend/operations/finalize_managed.py,sha256=dquIqS3TRhfV83ZEBCLst4C5ngLURyrBP3qF0Y-v7Qo,4814
|
|
133
|
-
api/backend/operations/import_relations.py,sha256=
|
|
133
|
+
api/backend/operations/import_relations.py,sha256=jueKIRFS-lqbqxnZnozQ5MWT4HUGKGNm4UyUTgfOiac,18040
|
|
134
134
|
api/backend/operations/introspect_table.py,sha256=duyaTYavbMll_flAkYT8Cg2KX5PkKCuxW-yiOhDZ-nU,3585
|
|
135
135
|
api/backend/operations/read_time_index.py,sha256=TXPtvD0pkcEQu7gyA9w8X721nIpsOdmPQDrW1KqbxOQ,3160
|
|
136
136
|
api/backend/operations/register_catalog.py,sha256=rJUm0Rw5lIduzW7yctdbL7mOHiv49f79PVbou06I0hE,10811
|
|
@@ -144,7 +144,7 @@ api/backend/persistence/labels.py,sha256=vv6u5U6WTjx8g23GyO1daFjxaWxF9yr1hyS8aGo
|
|
|
144
144
|
api/backend/persistence/locking.py,sha256=XihRoPCyCoJbLUt97NP3NhOki4ATTgPWY7SVOID-fcE,298
|
|
145
145
|
api/backend/persistence/models.py,sha256=-YRABvcRdzOgFLDBjULMRcpFDWjhzLIGd6n_Zc9T8fY,27408
|
|
146
146
|
api/backend/persistence/physical_operations.py,sha256=6UGa8rwjF0djs340toddAocMF55cZejgWTYFU3V0WPc,6631
|
|
147
|
-
api/backend/persistence/projections.py,sha256=
|
|
147
|
+
api/backend/persistence/projections.py,sha256=MmapOF25QKIWva4GR0-AIr1URCsTJ4rhoQtrNvDkDJg,5552
|
|
148
148
|
api/backend/persistence/run_graphs.py,sha256=1NXYJqBierusZwqG6Vq9gfAn5bFTIean-O6klhERcZA,15103
|
|
149
149
|
api/backend/persistence/schema_graph.py,sha256=GdiukQ9k0yeKDwV7UOqkyRcw4UtSCSV1-HeM3E_hWNo,5552
|
|
150
150
|
api/backend/persistence/sqlite_types.py,sha256=OaiW6gMYNKoezuknZU0SAqW1kOttP_vBaR5xEccQRpM,1098
|
|
@@ -189,7 +189,7 @@ examples/tutorial/migrations/script.py.mako,sha256=04kgeBtNMa4cCnG8CfQcKt6P6rnlo
|
|
|
189
189
|
examples/tutorial/migrations/versions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
190
190
|
examples/tutorial/migrations/versions/metatables_market_tutorial/0001_create_market_tutorial_tables.py,sha256=oqTMsce2V67aNl4sHzBhvGirUVCyF__QvwnZsZP3E6U,2962
|
|
191
191
|
examples/tutorial/migrations/versions/metatables_market_tutorial/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
192
|
-
mainsequence_metatable-0.1.2.
|
|
192
|
+
mainsequence_metatable-0.1.2.dev4.dist-info/licenses/LICENSE,sha256=b6Ecsk8wjsEby3lbSzdljR6hHiFGHBizt9iWV2p1c_I,1074
|
|
193
193
|
metatables/__init__.py,sha256=yPJzlwh1GP3ylwB5iUdx5ascFniUO_Upg80O2i62qgE,7480
|
|
194
194
|
metatables/_api_workflow.yaml,sha256=nG-b5xDqkjGbZeLww55_WJyr27alBKG7zkeIoo5XFEY,233
|
|
195
195
|
metatables/_skill_bundle.py,sha256=OFGYzfAycS5g1DOcdnQzfux_ucFZ0jpqhb1WobEw1Vw,2250
|
|
@@ -426,8 +426,8 @@ metatables/updaters/namespacing.py,sha256=obJfMnjLgOyl2iNRIK67vd1dIDETgQ8hj8gWDU
|
|
|
426
426
|
metatables/updaters/runner.py,sha256=2O7NNIM4QKnxNc9wd2yhYbafupwOAs8G26yJFgOmLKg,37796
|
|
427
427
|
metatables/updaters/updaters.py,sha256=7_EKAb5oYiCJoT4Go6syZKQ3wm_XhQN5xhEt4QrOztk,31242
|
|
428
428
|
metatables/updaters/utils.py,sha256=O1iKp2tzCkqxyCblI6MKxez6XV180w87VszxDO9OfAE,621
|
|
429
|
-
mainsequence_metatable-0.1.2.
|
|
430
|
-
mainsequence_metatable-0.1.2.
|
|
431
|
-
mainsequence_metatable-0.1.2.
|
|
432
|
-
mainsequence_metatable-0.1.2.
|
|
433
|
-
mainsequence_metatable-0.1.2.
|
|
429
|
+
mainsequence_metatable-0.1.2.dev4.dist-info/METADATA,sha256=yR9wY_ethr7uYDKY71m9JRNra6rDWgWCL7BUoTG-waY,6037
|
|
430
|
+
mainsequence_metatable-0.1.2.dev4.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
|
|
431
|
+
mainsequence_metatable-0.1.2.dev4.dist-info/entry_points.txt,sha256=wGFA4TfimgF5GCBt64c06SvYYiFrM_C1g-Ctdsk-eZM,54
|
|
432
|
+
mainsequence_metatable-0.1.2.dev4.dist-info/top_level.txt,sha256=4bLsmCxL8d3Nqo2v-4Fqmak16M_QPM1XQRLR2OMdt1g,24
|
|
433
|
+
mainsequence_metatable-0.1.2.dev4.dist-info/RECORD,,
|
{mainsequence_metatable-0.1.2.dev3.dist-info → mainsequence_metatable-0.1.2.dev4.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|