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

Function fts_match_count

tests/test_store_search.c:1848–1859  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1846 * a four-column INSERT still "works", it just silently indexes no prose. */
1847
1848static int fts_match_count(cbm_store_t *s, const char *match) {
1849 sqlite3 *db = cbm_store_get_db(s);
1850 sqlite3_stmt *st = NULL;
1851 if (sqlite3_prepare_v2(db, "SELECT COUNT(*) FROM nodes_fts WHERE nodes_fts MATCH ?1", -1, &st,
1852 NULL) != SQLITE_OK) {
1853 return -1;
1854 }
1855 sqlite3_bind_text(st, 1, match, -1, SQLITE_TRANSIENT);
1856 int n = sqlite3_step(st) == SQLITE_ROW ? sqlite3_column_int(st, 0) : -1;
1857 sqlite3_finalize(st);
1858 return n;
1859}
1860
1861/* One Section carrying prose, one Function carrying none. */
1862static void seed_prose_nodes(cbm_store_t *s) {

Callers 1

Calls 1

cbm_store_get_dbFunction · 0.85

Tested by

no test coverage detected