MCPcopy Create free account
hub / github.com/MemTensor/MemOS / countChunksByTask

Method countChunksByTask

packages/memos-core/src/storage/sqlite.ts:1678–1681  ·  view source on GitHub ↗
(taskId: string)

Source from the content-addressed store, hash-verified

1676 }
1677
1678 countChunksByTask(taskId: string): number {
1679 const row = this.db.prepare("SELECT COUNT(*) as c FROM chunks WHERE task_id = ?").get(taskId) as { c: number };
1680 return row.c;
1681 }
1682
1683 setChunkTaskId(chunkId: string, taskId: string): void {
1684 this.db.prepare("UPDATE chunks SET task_id = ?, updated_at = ? WHERE id = ?").run(taskId, Date.now(), chunkId);

Callers 2

serveTasksMethod · 0.45
serveTaskSearchMethod · 0.45

Calls 2

prepareMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected