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

Method getHubMemoryBySource

packages/memos-core/src/storage/sqlite.ts:2621–2624  ·  view source on GitHub ↗
(sourceUserId: string, sourceChunkId: string)

Source from the content-addressed store, hash-verified

2619 }
2620
2621 getHubMemoryBySource(sourceUserId: string, sourceChunkId: string): HubMemoryRecord | null {
2622 const row = this.db.prepare('SELECT * FROM hub_memories WHERE source_user_id = ? AND source_chunk_id = ?').get(sourceUserId, sourceChunkId) as HubMemoryRow | undefined;
2623 return row ? rowToHubMemory(row) : null;
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;

Callers 3

handleMethod · 0.45
handleMemoryScopeMethod · 0.45

Calls 3

prepareMethod · 0.80
rowToHubMemoryFunction · 0.70
getMethod · 0.65

Tested by

no test coverage detected