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

Function rec_write

internal/cbm/sqlite_writer.c:455–461  ·  view source on GitHub ↗

Write the record (header_len + header + body) at dst; returns its length.

Source from the content-addressed store, hash-verified

453
454// Write the record (header_len + header + body) at dst; returns its length.
455static int rec_write(const RecordBuilder *r, uint8_t *dst) {
456 int pos = put_varint(dst, rec_total_header(r));
457 memcpy(dst + pos, r->header.data, r->header.len);
458 pos += r->header.len;
459 memcpy(dst + pos, r->body.data, r->body.len);
460 return pos + r->body.len;
461}
462
463static uint8_t *rec_finalize(RecordBuilder *r, int *out_len) {
464 *out_len = 0;

Callers 3

rec_finalizeFunction · 0.85
rec_finalize_index_cellFunction · 0.85

Calls 2

put_varintFunction · 0.85
rec_total_headerFunction · 0.85

Tested by

no test coverage detected