23 lines
968 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# pbl_kdb_ext 模块技能(自动生成骨架 + 人工补充)
## 定位
KDB 只读桩与匿名聚合M7零写入
## 挂载
`from pbl_kdb_ext.init import load_pbl_kdb_ext``load_pbl_kdb_ext()`(应用 app/pbls.py init() 中按序调用)
## 数据表2 张)
- `pbl_kdb_item`KDB 条目建表不写入is_write_locked 恒 1
- `pbl_kdb_query_log`KDB 检索日志(只读侧留痕)
## 契约接口3 个,路径 `/pbl_kdb_ext/api/<name>.dspy`
- `pbl_kdb_search`
- `pbl_kdb_get`
- `pbl_research_aggregate`
## 陷阱
- 库名一律 `ServerEnv().get_module_dbname('pbl_kdb_ext')`,禁止硬编码 DBNAME。
- sqlor 只有 `C/U/D/R/I/sqlExe`;查询走 pbl_common.api 的 q_all/q_one已适配
- 所有读写强制带 `tenant_id`pbl_common.api.tenant_id()),缺失即 fail-closed 报错。
- 新增契约需同步三处api.py 定义 + __init__.py 导出 + init.py env 注册 + scripts/load_path.py 路径。