Skip to main content

reload_table_rows

Function reload_table_rows 

Source
pub fn reload_table_rows(
    root: &Path,
    conf_path: &Path,
    authority_uri: &str,
    table: &str,
    dict: &EnvDict,
) -> KnowledgeResult<Vec<RowData>>
Expand description

重载权威库中的单表并返回其全部行(供 refresh 服务与宿主启动装载共用)。

语义与启动装载一致:解析 conf_path(KnowDB V2)→ 打开/创建 authority_uri(sqlite 文件)→ 对该表执行 create/clean/insert(重读 CSV) → SELECT <columns.by_header> FROM <table> 返回原生行。列类型由表目录的 create.sql DDL 决定(引擎侧消费方在边界按自己的行契约转换,见 wfusion baseline 设计 §11 M3b)。

要求:table 在 conf 中启用,且 columns.by_header 非空(refresh 投影 需要可名列;纯 by_index 表请先补 columns.by_header)。