refactor(db)!: adopt project-routed pooled databases

Reorganize WNDB by responsibility and remove legacy scheme endpoints.\n\nRoute analysis and time-series access through project pools, preserve transactional realtime replacement, and refresh GIS materialized views after writes.\n\nAdd database architecture documentation, live pooling coverage, API contract updates, and executable container verification.\n\nBREAKING CHANGE: legacy scheme APIs and flat app.native.wndb module imports are removed.
This commit is contained in:
2026-08-25 18:35:05 +08:00
parent fdbcc5c033
commit fa188af0b1
181 changed files with 8446 additions and 33546 deletions
+50
View File
@@ -0,0 +1,50 @@
TITLE = 'TITLE'
JUNCTIONS = 'JUNCTIONS'
RESERVOIRS = 'RESERVOIRS'
TANKS = 'TANKS'
PIPES = 'PIPES'
PUMPS = 'PUMPS'
VALVES = 'VALVES'
TAGS = 'TAGS'
DEMANDS = 'DEMANDS'
STATUS = 'STATUS'
PATTERNS = 'PATTERNS'
CURVES = 'CURVES'
CONTROLS = 'CONTROLS'
RULES = 'RULES'
ENERGY = 'ENERGY'
EMITTERS = 'EMITTERS'
QUALITY = 'QUALITY'
SOURCES = 'SOURCES'
REACTIONS = 'REACTIONS'
MIXING = 'MIXING'
TIMES = 'TIMES'
REPORT = 'REPORT'
OPTIONS = 'OPTIONS'
COORDINATES = 'COORDINATES'
VERTICES = 'VERTICES'
REGION='REGION'
BOUND='BOUND'
REGION_NODES='DATA_NODE_OF_REGION'
LABELS = 'LABELS'
BACKDROP = 'BACKDROP'
END = 'END'
section_name = [TITLE, JUNCTIONS, RESERVOIRS, TANKS, PIPES,
PUMPS, VALVES, TAGS, DEMANDS, STATUS,
PATTERNS, CURVES, CONTROLS, RULES, ENERGY,
EMITTERS, QUALITY, SOURCES, REACTIONS, MIXING,
TIMES, REPORT, OPTIONS, COORDINATES, VERTICES,
REGION, BOUND, REGION_NODES, LABELS, BACKDROP, END]
# DingZQ, 2025-02-04
# 我们在从服务器调用run_project的时候
# 会将 database的project内容dump成 epanet v2 的inp文件,然后调用 runepanet.exe 去计算结果
# 其中上面的 SECTION REGION, BOUND, REGION_NODES 在 epanet v2 中没有,是我们自己定制的
# 所以需要将这些 section 从 section_name 中移除
section_names_for_epanetv2 = [TITLE, JUNCTIONS, RESERVOIRS, TANKS, PIPES,
PUMPS, VALVES, TAGS, DEMANDS, STATUS,
PATTERNS, CURVES, CONTROLS, RULES, ENERGY,
EMITTERS, QUALITY, SOURCES, REACTIONS, MIXING,
TIMES, REPORT, OPTIONS, COORDINATES, VERTICES,
LABELS, BACKDROP, END]