MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / doc_section_diagram_kind

Function doc_section_diagram_kind

tests/test_pipeline.c:22624–22641  ·  view source on GitHub ↗

The diagram_kind of the Diagram a section (its QN contains heading) * DEFINES, "" without one. */

Source from the content-addressed store, hash-verified

22622/* The diagram_kind of the Diagram a section (its QN contains heading)
22623 * DEFINES, "" without one. */
22624static void doc_section_diagram_kind(cbm_store_t *s, const char *heading, char *out,
22625 size_t out_sz) {
22626 sqlite3_stmt *st = NULL;
22627 out[0] = '\0';
22628 if (sqlite3_prepare_v2(cbm_store_get_db(s),
22629 "SELECT json_extract(d.properties, '$.diagram_kind') FROM edges e "
22630 "JOIN nodes a ON a.id = e.source_id JOIN nodes d ON d.id = e.target_id "
22631 "WHERE e.type = 'DEFINES' AND a.label = 'Section' "
22632 "AND d.label = 'Diagram' AND instr(a.qualified_name, ?1) > 0",
22633 -1, &st, NULL) != SQLITE_OK) {
22634 return;
22635 }
22636 sqlite3_bind_text(st, 1, heading, -1, SQLITE_TRANSIENT);
22637 if (sqlite3_step(st) == SQLITE_ROW && sqlite3_column_text(st, 0)) {
22638 snprintf(out, out_sz, "%s", (const char *)sqlite3_column_text(st, 0));
22639 }
22640 sqlite3_finalize(st);
22641}
22642
22643/* A Markdown section that embeds a diagram takes its diagram family's judged
22644 * curve (DIAG-C): a sequence diagram is structural, a flowchart is prose; a

Callers 1

test_pipeline.cFile · 0.85

Calls 1

cbm_store_get_dbFunction · 0.85

Tested by

no test coverage detected