Model Requests

Single model requests you can execute on a DynamoStore.

General

Creation

All model requests are created by using the corresponding method on a DynamoStore instance. A new request instance for the related model/table will be returned.

Request Params

Every request instance contains the public params property where all params for the request are written to. You might want to use it for debugging purpose but are also able to write on it (eg. non-covered features).

Consumed Capacity

You might want to receive the consumed capacity which can be achieved by applying the returnConsumedCapacity('INDEXES' | 'TOTAL') method and the usage of execFullResponse() instead of exec().

Execution

All requests provide at least two execution methods:

  • exec() returns a promise which will resolve to the requested items or void if no items were requested

  • execFullResponse() returns a promise which will resolve to the full response DynamoDB returns, but response.Items are still mapped for you.

Get

technical api doc
https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_GetItem.html

Put

technical api doc
https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_PutItem.html

Update

technical api doc
https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateItem.html

Delete

technical api doc
https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_DeleteItem.html

Query

technical api doc
https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_Query.html

Scan

technical api doc
https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_Scan.html

BatchGet

This is a special implementation from BatchGetRequest which only allows to read from a single table.

technical api doc
https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_BatchGetItem.html

BatchWrite

This is a special implementation from BatchWriteRequest which only allows to write to a single table

technical api doc
https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_BatchWriteItem.html

TransactGet

This is a special implementation from TransactGetRequest which only allows to read from a single table.

technical api doc
https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_TransactGetItems.html

Last updated

Was this helpful?