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

Function gd_encoding

src/store/store_graph_digest.c:344–359  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

342}
343
344static bool gd_encoding(gd_context_t *g) {
345 if (!gd_prepare(g, "PRAGMA main.encoding;")) {
346 return false;
347 }
348 if (sqlite3_column_count(g->stmt) != 1 || gd_step(g) != SQLITE_ROW) {
349 return gd_fail(g, CBM_STORE_GRAPH_DIGEST_SCHEMA);
350 }
351 gd_text_t encoding;
352 if (!gd_read_text(g, 0, &encoding)) {
353 return false;
354 }
355 if (!gd_text_eq(encoding, "UTF-8") || gd_step(g) != SQLITE_DONE) {
356 return gd_fail(g, CBM_STORE_GRAPH_DIGEST_SCHEMA);
357 }
358 return gd_finalize(g);
359}
360
361static bool gd_table_kinds(gd_context_t *g, bool present[GD_TABLE_COUNT]) {
362 if (!gd_prepare(g, "PRAGMA main.table_list;")) {

Callers 1

cbm_store_graph_digestFunction · 0.85

Calls 6

gd_prepareFunction · 0.85
gd_stepFunction · 0.85
gd_failFunction · 0.85
gd_read_textFunction · 0.85
gd_text_eqFunction · 0.85
gd_finalizeFunction · 0.85

Tested by

no test coverage detected