refactor(db)!: clean up business SQL access

- make realtime replacement and analysis result writes transactional\n- consolidate SCADA repositories and remove process-global project state\n- validate SCADA batches and use indexed GIS-backed business queries\n\nBREAKING CHANGE: remove the public analysis result writer and the pipeline-health network_name query parameter.
This commit is contained in:
2026-08-28 11:37:36 +08:00
parent b74799a39d
commit 9b095c7439
34 changed files with 859 additions and 921 deletions
+4 -4
View File
@@ -94,13 +94,13 @@ def test_realtime_node_and_link_replacement_share_outer_transaction(monkeypatch)
calls: list[str] = []
monkeypatch.setattr(
RealtimeRepository,
"insert_nodes_batch_sync",
lambda _conn, _data: calls.append("nodes"),
"_copy_nodes_sync",
lambda _cur, _data, _time: calls.append("nodes"),
)
monkeypatch.setattr(
RealtimeRepository,
"insert_links_batch_sync",
lambda _conn, _data: calls.append("links"),
"_copy_links_sync",
lambda _cur, _data, _time: calls.append("links"),
)
RealtimeRepository.store_realtime_simulation_result_sync(