Class InMemoryLearningStore

The learning store in the process, for tests and short-lived processes (see the module's description).

Hierarchy

  • TransactionalLearningStore
    • InMemoryLearningStore

Constructors

Methods

  • Parameters

    • chainKey: string

    Returns Promise<{
        rows: StoredLedgerRow[];
        head: undefined | ChainHead;
    }>

  • Parameters

    • namespace: string
    • agentKey: string
    • userId: string

    Returns Promise<StoredLedgerRow[]>

  • Parameters

    • namespace: string
    • agentKey: string
    • createdBefore: string

    Returns Promise<StoredLedgerRow[]>

  • Parameters

    • chainKey: string
    • expectedSeq: number
    • next: {
          lastId: string;
          lastHash: string;
          seq: number;
      }
      • lastId: string
      • lastHash: string
      • seq: number

    Returns Promise<boolean>

  • Parameters

    • namespace: string
    • agentKey: string
    • userId: string

    Returns Promise<undefined | StoredTraitRow>

  • Parameters

    • row: StoredTraitRow
    • expectedVersion: number

    Returns Promise<boolean>

  • Parameters

    • namespace: string
    • agentKey: string
    • sessionId: string
    • userId: string
    • kind: "learner" | "visitor"

    Returns Promise<undefined | SessionRow>

  • Parameters

    • table: LearnerDocTable
    • namespace: string
    • agentKey: string
    • userId: string

    Returns Promise<LearnerDocRow[]>

  • Parameters

    • namespace: string
    • userId: string

    Returns Promise<Record<string, number>>

Properties

kind: "memory" = ...