dyna-record
    Preparing search index...

    Class DynamoClient

    Interacts with DynamoDB through a single document client, providing methods for common operations such as retrieving, querying, and transacting items.

    One instance per table, resolved and memoized by that table's metadata, so tables configured with different clients never share one.

    Index

    Constructors

    Methods

    • Queries DynamoDB based on the provided parameters and returns the matching items.

      A single DynamoDB Query returns at most 1MB of data and a LastEvaluatedKey cursor when more results exist. This method drains every page by following that cursor, so callers always receive the complete result set rather than a silently truncated first page.

      If params.Limit is provided it is treated as a cap on the total number of items returned (not a per-page limit), and pagination stops once it is reached. This keeps the door open for adding a bounded/cursor-based read API later without changing this method's behavior.

      Parameters

      • params: QueryCommandInput

        The parameters for the QueryCommand to DynamoDB.

      Returns Promise<QueryItems>

      A Promise resolving to an array of the queried items.

    • Performs a vector similarity search against a DynamoDB vector index and returns the matching results.

      Log output redacts the query vector: only a placeholder with the dimension count is logged, never the vector values.

      Parameters

      • params: SearchVectorsCommandInput

        The parameters for the SearchVectorsCommand to DynamoDB.

      Returns Promise<(Omit<SearchResultItem, "Item"> & {})[]>

      A Promise resolving to the array of search results.

    • Executes a transactional read operation in DynamoDB to get multiple items atomically.

      Parameters

      • params: TransactGetCommandInput

        The parameters for the TransactGetCommand to DynamoDB.

      Returns Promise<(Omit<ItemResponse, "Item"> & {})[]>

      A Promise resolving to the responses of the transactional get operation.

    • Executes a transactional write operation in DynamoDB to write multiple items atomically.

      Parameters

      • params: TransactWriteCommandInput

        The parameters for the TransactWriteCommand to DynamoDB.

      Returns Promise<TransactWriteCommandOutput>

      A Promise resolving to the output of the transactional write operation.