prorm API Reference
    Preparing search index...

    Class KeyspacesStore

    KeyspacesStore wraps a cassandra-driver Client pointed at an Amazon Keyspaces endpoint and exposes CQL execution (execute), atomic multi-statement batches (batch), and a few parameterized convenience helpers (insert, selectAll).

    Statements are prepared by default (prepare: true). All Keyspaces-specific connection concerns (TLS, SigV4/credentials, LOCAL_QUORUM consistency) are plain driver options and pass through via clientOptions or a pre-built client.

    Implements

    Index
    name: "keyspaces" = 'keyspaces'

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

    library: "cassandra-driver" = 'cassandra-driver'

    The client library being used

    • Execute a single CQL statement with optional bound params. Statements are prepared by default (prepare: true); pass opts.prepare = false to run a one-off unprepared. Any other driver query options (including consistency, which defaults to LOCAL_QUORUM on Keyspaces) are forwarded via opts. Returns the full driver result (with .rows).

      Type Parameters

      • T = Record<string, unknown>

      Parameters

      • query: string
      • params: unknown[] = []
      • opts: KeyspacesQueryOptions = {}

      Returns Promise<KeyspacesResult<T>>

    • Execute multiple statements as a single logged batch. Each entry is a { query, params } pair. Prepared by default; forward other driver batch options via opts.

      Parameters

      • queries: KeyspacesBatchQuery[]
      • opts: KeyspacesQueryOptions = {}

      Returns Promise<KeyspacesResult<Record<string, unknown>>>

    • Convenience INSERT: builds a parameterized INSERT INTO table (cols...) VALUES (?, ?, ...) from obj's keys and executes it (prepared). For upserts with TTL, IF NOT EXISTS, or other clauses, write the CQL yourself and call execute().

      Parameters

      • table: string
      • obj: Record<string, unknown>
      • opts: KeyspacesQueryOptions = {}

      Returns Promise<KeyspacesResult<Record<string, unknown>>>

    • Convenience SELECT * FROM table. Returns the full driver result (with .rows).

      Type Parameters

      • T = Record<string, unknown>

      Parameters

      • table: string
      • opts: KeyspacesQueryOptions = {}

      Returns Promise<KeyspacesResult<T>>