Deletes items from DynamoDB in batches of 25 or fewer via one or more BatchWriteItem operations. The items may be from any number of tables; tables and schemas for each item are determined using the {DynamoDbSchema} property and the {DynamoDbTable} property on defined on each item supplied.
This method will automatically retry any delete requests returned by DynamoDB as unprocessed. Exponential backoff on unprocessed items is employed on a per-table basis.
A synchronous or asynchronous iterable of items to delete.
Retrieves items from DynamoDB in batches of 100 or fewer via one or more BatchGetItem operations. The items may be from any number of tables; tables and schemas for each item are determined using the {DynamoDbSchema} property and the {DynamoDbTable} property on defined on each item supplied.
This method will automatically retry any get requests returned by DynamoDB as unprocessed. Exponential backoff on unprocessed items is employed on a per-table basis.
A synchronous or asynchronous iterable of items to get.
Puts items into DynamoDB in batches of 25 or fewer via one or more BatchWriteItem operations. The items may be from any number of tables; tables and schemas for each item are determined using the {DynamoDbSchema} property and the {DynamoDbTable} property on defined on each item supplied.
This method will automatically retry any put requests returned by DynamoDB as unprocessed. Exponential backoff on unprocessed items is employed on a per-table basis.
A synchronous or asynchronous iterable of items to put.
Puts or deletes items from DynamoDB in batches of 25 or fewer via one or more BatchWriteItem operations. The items may belong to any number of tables; tables and schemas for each item are determined using the {DynamoDbSchema} property and the {DynamoDbTable} property on defined on each item supplied.
This method will automatically retry any write requests returned by DynamoDB as unprocessed. Exponential backoff on unprocessed items is employed on a per-table basis.
A synchronous or asynchronous iterable of tuples of the string 'put'|'delete' and the item on which to perform the specified write action.
Perform a CreateTable operation using the schema accessible via the {DynamoDbSchema} property and the table name accessible via the {DynamoDbTable} property on the prototype of the constructor supplied.
The promise returned by this method will not resolve until the table is active and ready for use.
The constructor used for values in the table.
Perform a DeleteItem operation using the schema accessible via the {DynamoDbSchema} property and the table name accessible via the {DynamoDbTable} property on the item supplied.
The item to delete
Options to configure the DeleteItem operation
Perform a DeleteTable operation using the schema accessible via the {DynamoDbSchema} property and the table name accessible via the {DynamoDbTable} property on the prototype of the constructor supplied.
The promise returned by this method will not resolve until the table is deleted and can no longer be used.
The constructor used for values in the table.
If the table does not already exist, perform a CreateTable operation using the schema accessible via the {DynamoDbSchema} property and the table name accessible via the {DynamoDbTable} property on the prototype of the constructor supplied.
The promise returned by this method will not resolve until the table is active and ready for use.
The constructor used for values in the table.
Options to configure the CreateTable operation
If the table exists, perform a DeleteTable operation using the schema accessible via the {DynamoDbSchema} property and the table name accessible via the {DynamoDbTable} property on the prototype of the constructor supplied.
The promise returned by this method will not resolve until the table is deleted and can no longer be used.
The constructor used for values in the table.
Execute a custom update expression using the schema and table name
defined on the provided valueConstructor
.
This method does not support automatic version checking, as the current state of a table's version attribute cannot be inferred from an update expression object. To perform a version check manually, add a condition expression:
const currentVersion = 1;
updateExpression.set('nameOfVersionAttribute', currentVersion + 1);
const condition = {
type: 'Equals',
subject: 'nameOfVersionAttribute',
object: currentVersion
};
const updated = await mapper.executeUpdateExpression(
updateExpression,
itemKey,
constructor,
{condition}
);
NB: Property names and attribute paths in the update expression should reflect the names used in the schema.
The update expression to execute.
The full key to identify the object being updated.
The constructor with which to map the result to a domain object.
Options with which to customize the UpdateItem request.
The updated item.
Perform a GetItem operation using the schema accessible via the {DynamoDbSchema} method and the table name accessible via the {DynamoDbTable} method on the item supplied.
The item to get
Options to configure the GetItem operation
Perform a Scan operation using the schema accessible via the {DynamoDbSchema} method and the table name accessible via the {DynamoDbTable} method on the prototype of the constructor supplied.
This scan will be performed by multiple parallel workers, each of which
will perform a sequential scan of a segment of the table or index. Use
the segments
parameter to specify the number of workers to be used.
The constructor to be used for each item returned by the scan
The number of parallel workers to use to perform the scan
Options to configure the Scan operation
An asynchronous iterator that yields scan results. Intended
to be consumed with a for await ... of
loop.
Perform a PutItem operation using the schema accessible via the {DynamoDbSchema} method and the table name accessible via the {DynamoDbTable} method on the item supplied.
The item to save to DynamoDB
Options to configure the PutItem operation
Perform a Query operation using the schema accessible via the {DynamoDbSchema} method and the table name accessible via the {DynamoDbTable} method on the prototype of the constructor supplied.
The constructor to use for each query result.
A condition identifying a particular hash key value.
Additional options for customizing the Query operation
An asynchronous iterator that yields query results. Intended
to be consumed with a for await ... of
loop.
Named parameter object
Perform a Scan operation using the schema accessible via the {DynamoDbSchema} method and the table name accessible via the {DynamoDbTable} method on the prototype of the constructor supplied.
The constructor to use for each item returned by the Scan operation.
Additional options for customizing the Scan operation
An asynchronous iterator that yields scan results. Intended
to be consumed with a for await ... of
loop.
Perform an UpdateItem operation using the schema accessible via the {DynamoDbSchema} method and the table name accessible via the {DynamoDbTable} method on the item supplied.
The item to save to DynamoDB
Options to configure the UpdateItem operation
Object mapper for domain object interaction with DynamoDB.
To use, define a schema that describes how an item is represented in a DynamoDB table. This schema will be used to marshall a native JavaScript object into its desired persisted form. Attributes present on the object but not in the schema will be ignored.