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

Function cbm_store_read_batch_begin

src/store/store.c:248–258  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

246enum { ST_READ_BATCH_MS = 100 };
247
248bool cbm_store_read_batch_begin(cbm_store_t *s) {
249 if (!s || !s->db || s->read_batch || !sqlite3_get_autocommit(s->db)) {
250 return false;
251 }
252 if (sqlite3_exec(s->db, "BEGIN DEFERRED;", NULL, NULL, NULL) != SQLITE_OK) {
253 return false;
254 }
255 s->read_batch = true;
256 s->read_batch_started_ms = cbm_now_ms();
257 return true;
258}
259
260void cbm_store_read_batch_end(cbm_store_t *s) {
261 if (!s || !s->read_batch) {

Callers 3

read_batch_renewFunction · 0.85
resolve_storeFunction · 0.85

Calls 1

cbm_now_msFunction · 0.85

Tested by

no test coverage detected