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

Method getHubMemoryById

packages/memos-core/src/storage/sqlite.ts:2626–2629  ·  view source on GitHub ↗
(memoryId: string)

Source from the content-addressed store, hash-verified

2624 }
2625
2626 getHubMemoryById(memoryId: string): HubMemoryRecord | null {
2627 const row = this.db.prepare('SELECT * FROM hub_memories WHERE id = ?').get(memoryId) as HubMemoryRow | undefined;
2628 return row ? rowToHubMemory(row) : null;
2629 }
2630
2631 deleteHubMemoryBySource(sourceUserId: string, sourceChunkId: string): void {
2632 this.db.prepare('DELETE FROM hub_memories WHERE source_user_id = ? AND source_chunk_id = ?').run(sourceUserId, sourceChunkId);

Callers 2

searchMethod · 0.45
handleMethod · 0.45

Calls 3

prepareMethod · 0.80
rowToHubMemoryFunction · 0.70
getMethod · 0.65

Tested by

no test coverage detected