SqlPersistentMemoryStore
Implements
Section titled “Implements”PersistentMemoryStore
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new SqlPersistentMemoryStore(sql): SqlPersistentMemoryStore;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
Returns
Section titled “Returns”SqlPersistentMemoryStore
Methods
Section titled “Methods”deleteBlock()
Section titled “deleteBlock()”deleteBlock( scope, owner,key): Promise<void>;Delete a block. No-op when missing.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
|
|
|
|
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”PersistentMemoryStore.deleteBlocklistBlocks()
Section titled “listBlocks()”listBlocks(scope, owner): Promise<string[]>;List block keys for an owner within a scope.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
|
Returns
Section titled “Returns”Promise<string[]>
Implementation of
Section titled “Implementation of”PersistentMemoryStore.listBlocksloadBlock()
Section titled “loadBlock()”loadBlock( scope, owner,key): Promise<PersistentMemoryBlock | null>;Load a single block by (scope, owner, key). Returns null when the block does not exist yet (first time the agent ever ran for this owner). Implementations MUST NOT throw on missing — return null.
owner is typically the userId for scope=‘user’ / scope=‘shared’,
and the agentId for scope=‘agent’. Implementations should accept any
string and treat it as opaque.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
|
|
|
|
Returns
Section titled “Returns”Promise<PersistentMemoryBlock | null>
Implementation of
Section titled “Implementation of”PersistentMemoryStore.loadBlocksaveBlock()
Section titled “saveBlock()”saveBlock(block, owner): Promise<void>;Persist a block atomically. Replaces the entire content.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
|
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”PersistentMemoryStore.saveBlock