prorm API Reference
    Preparing search index...

    Class AerospikeStore

    AerospikeStore wraps an aerospike client and exposes Aerospike's record surface: put/get/remove/exists for single-record operations, operate for atomic multi-op transactions on a record, and truncate for clearing a set. Records are addressed by a (namespace, set, key) tuple, built by makeKey().

    Implements

    Index
    name: "aerospike" = 'aerospike'

    The name of the store (e.g. 'mongodb', 'redis', 'dynamodb')

    library: "aerospike" = 'aerospike'

    The client library being used

    • Builds the key object the driver expects from a (namespace, set, key) tuple, filling in the store's default namespace/set for anything the caller omits. When the real driver is loaded this returns a new Aerospike.Key(namespace, set, key); when a mock client is injected (no module) it returns a plain { ns, set, key } tuple.

      Parameters

      • input: AerospikeKeyInput

      Returns unknown

    • Writes (puts) a record's bins. Optionally accepts write metadata (TTL/generation).

      Parameters

      • key: AerospikeKeyInput
      • bins: Record<string, unknown>
      • Optionalmeta: AerospikeMeta

      Returns Promise<unknown>

    • Reads a record by key, returning its bins (record.bins), or throws if it doesn't exist.

      Parameters

      • key: AerospikeKeyInput

      Returns Promise<Record<string, unknown>>

    • Removes a record by key.

      Parameters

      • key: AerospikeKeyInput

      Returns Promise<unknown>

    • Returns whether a record exists for the given key.

      Parameters

      • key: AerospikeKeyInput

      Returns Promise<boolean>

    • Runs an ordered list of operations atomically against a single record (Aerospike's operate — increment, append, read-back, etc). ops is passed straight through to the driver; build them with the driver's own operation helpers.

      Parameters

      • key: AerospikeKeyInput
      • ops: unknown[]

      Returns Promise<unknown>

    • Truncates a set (or the store's default set), deleting every record in it. beforeNanos of 0 means "everything up to now". Requires a driver whose client exposes truncate().

      Parameters

      • Optionalset: string

      Returns Promise<unknown>