MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / parse_native_graph_stats

Function parse_native_graph_stats

nodedb-client/src/native/client/graph.rs:144–149  ·  view source on GitHub ↗

Parse a multi-row response from `SHOW GRAPH STATS` into a vec of `GraphStats`. Empty rows produce an empty vec. Column-shape mismatches are surfaced as errors — no silent fallbacks.

(
    columns: &[String],
    rows: &[Vec<nodedb_types::value::Value>],
)

Source from the content-addressed store, hash-verified

142/// `GraphStats`. Empty rows produce an empty vec. Column-shape mismatches
143/// are surfaced as errors — no silent fallbacks.
144pub(crate) fn parse_native_graph_stats(
145 columns: &[String],
146 rows: &[Vec<nodedb_types::value::Value>],
147) -> NodeDbResult<Vec<GraphStats>> {
148 GraphStats::parse_show_stats_response(columns, rows)
149}
150
151#[cfg(test)]
152mod tests {

Calls

no outgoing calls