@codesoul-co/hypha-memory / structured-managed-store
- Package index:
@codesoul-co/hypha-memory - Source:
packages/memory/src/structured-managed-store.ts - Exports: 2
Using this module
Use the Structured managed store module for persisting and reading data at this boundary. It exports 1 class, 1 interface.
Import from the package entrypoint
ts
import {
StructuredManagedMemoryRecordStore,
} from '@codesoul-co/hypha-memory';
import type {
StructuredManagedMemoryRecordStoreOptions,
} from '@codesoul-co/hypha-memory';Usage patterns
- Use the 1 type/interface export as static contracts in application code, adapters, or tests. Import them with
import type; they do not exist at runtime. - The module exposes 1 class as constructable runtime implementations. Each symbol entry lists its constructor and public methods.
Public exports
| Symbol | Kind | Signature | Description |
|---|---|---|---|
StructuredManagedMemoryRecordStore | class | new StructuredManagedMemoryRecordStore(options: StructuredManagedMemoryRecordStoreOptions): StructuredManagedMemoryRecordStore | Structured Managed Memory Record Store class with 11 public constructor or member entries; its exact declarations are listed below. |
StructuredManagedMemoryRecordStoreOptions | interface | interface StructuredManagedMemoryRecordStoreOptions | Structured Managed Memory Record Store Options interface with 5 public fields or methods. |
StructuredManagedMemoryRecordStore
Structured Managed Memory Record Store class with 11 public constructor or member entries; its exact declarations are listed below.
- Kind: class
- Import:
import { StructuredManagedMemoryRecordStore } from '@codesoul-co/hypha-memory'; - Source module:
structured-managed-store
Declaration
text
export declare class StructuredManagedMemoryRecordStore implements ManagedMemoryRecordStore {
constructor(options: StructuredManagedMemoryRecordStoreOptions);
create(record: ManagedMemoryRecord): Promise<ManagedMemoryRecord>;
get(id: string, scope: ManagedMemoryScope): Promise<ManagedMemoryRecord | null>;
getVersionByScopeHash(id: string, versionId: string, scopeHash: string): Promise<ManagedMemoryRecord | null>;
list(request: ManagedMemoryRecordQuery): Promise<ManagedMemoryRecord[]>;
createVersion(record: ManagedMemoryRecord, expectedRevision: number): Promise<ManagedMemoryRecord>;
updateStatus(id: string, scope: ManagedMemoryScope, expectedRevision: number, status: MemoryStatus, updatedAt: string): Promise<ManagedMemoryRecord>;
delete(id: string, scope: ManagedMemoryScope): Promise<void>;
history(id: string, scope: ManagedMemoryScope): Promise<ManagedMemoryRecord[]>;
transaction<T>(fn: (store: ManagedMemoryRecordStore) => Promise<T>): Promise<T>;
health(): Promise<ProviderHealth>;
}Public members
| Member | Kind | Signature | Description |
|---|---|---|---|
constructor | constructor | (options: StructuredManagedMemoryRecordStoreOptions): StructuredManagedMemoryRecordStore | Creates an instance of this class. |
create | method | create(record: ManagedMemoryRecord): Promise<ManagedMemoryRecord> | Public method; parameters and return type are shown in the signature. |
createVersion | method | createVersion(record: ManagedMemoryRecord, expectedRevision: number): Promise<ManagedMemoryRecord> | Public method; parameters and return type are shown in the signature. |
delete | method | delete(id: string, scope: ManagedMemoryScope): Promise<void> | Public method; parameters and return type are shown in the signature. |
get | method | get(id: string, scope: ManagedMemoryScope): Promise<ManagedMemoryRecord | null> | Public method; parameters and return type are shown in the signature. |
getVersionByScopeHash | method | getVersionByScopeHash(id: string, versionId: string, scopeHash: string): Promise<ManagedMemoryRecord | null> | Public method; parameters and return type are shown in the signature. |
health | method | health(): Promise<ProviderHealth> | Public method; parameters and return type are shown in the signature. |
history | method | history(id: string, scope: ManagedMemoryScope): Promise<ManagedMemoryRecord[]> | Public method; parameters and return type are shown in the signature. |
list | method | list(request: ManagedMemoryRecordQuery): Promise<ManagedMemoryRecord[]> | Public method; parameters and return type are shown in the signature. |
transaction | method | transaction<T>(fn: (store: ManagedMemoryRecordStore) => Promise<T>): Promise<T> | Public method; parameters and return type are shown in the signature. |
updateStatus | method | updateStatus(id: string, scope: ManagedMemoryScope, expectedRevision: number, status: MemoryStatus, updatedAt: string): Promise<ManagedMemoryRecord> | Public method; parameters and return type are shown in the signature. |
StructuredManagedMemoryRecordStoreOptions
Structured Managed Memory Record Store Options interface with 5 public fields or methods.
- Kind: interface
- Import:
import type { StructuredManagedMemoryRecordStoreOptions } from '@codesoul-co/hypha-memory'; - Source module:
structured-managed-store
Declaration
text
export interface StructuredManagedMemoryRecordStoreOptions {
provider: StructuredStoreProvider;
currentTable?: string;
versionsTable?: string;
inTransaction?: boolean;
now?: () => Date;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
currentTable | property | currentTable?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
inTransaction | property | inTransaction?: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
now | method | now?(): Date | Public method; parameters and return type are shown in the signature. |
provider | property | provider: StructuredStoreProvider | Public property; its type, readonly modifier and optionality are shown in the signature. |
versionsTable | property | versionsTable?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
