Options for DynamoDBClient initialization
Private _clientThe options used to initialize this object's DynamoDBClient instance.
The DynamoDBDocumentClient instance used by the methods of this object.
This property is lazily initialized.
Returns the attributes of one or more items from one or more tables by delegating to BatchGetCommand.
You can use the batchItem helper to create the request items.
import { batchItem as bi } from 'dynamo-facade-v3';
// These two are equivalent
df.batchGet([
bi.get('movies', { actor: 'Tom Hanks', movie: 'Toy Story' }),
bi.get('movies', { actor: 'Tom Hanks', movie: 'Forrest Gump' }),
])
df.batchGet([
bi.get('movies', [
{ actor: 'Tom Hanks', movie: 'Toy Story' },
{ actor: 'Tom Hanks', movie: 'Forrest Gump' },
])
])
The same response returned by send()ing this command
The items to get in the format { [tableName]: { Keys: [...] } }
Optional options: Partial<BatchGetCommandInput>The options accepted by the original BatchGetCommand class
Puts or deletes multiple items in one or more tables by delegating to BatchWriteCommand.
You can use the batchItem helper to create the request items.
import { batchItem as bi } from 'dynamo-facade-v3';
df.batchWrite([
bi.put('movies', [
{ actor: 'Tom Hanks', movie: 'Toy Story' },
{ actor: 'Tom Hanks', movie: 'Forrest Gump' },
])
])
The same response returned by send()ing this command
The items to write in the format { tableName: [ { ...request }, ...] }
Optional options: Partial<BatchWriteCommandInput>The options accepted by the original BatchWriteCommand class
Deletes a single item in a table by primary key by delegating to DeleteCommand.
The same response returned by send()ing this command
The name of the table from which to delete the item
A map of attribute names to values, representing the primary key of the item to delete
Optional options: Partial<FacadeDeleteItemInput>The options accepted by the original DeleteCommand class, plus an optional condition field that generates ConditionExpression
Returns a set of attributes for the item with the given primary key by delegating to GetCommand.
The same response returned by send()ing this command
The name of the table containing the requested item
A map of attribute names to values, representing the primary key of the item to retrieve
Optional options: Partial<GetCommandInput>The options accepted by the original GetCommand class
Creates a new item, or replaces an old item with a new item by delegating to PutCommand.
The same response returned by send()ing this command
The name of the table to contain the item
A map of attribute name/value pairs, one for each attribute
Optional options: Partial<FacadePutItemInput>The options accepted by the original PutCommand class, plus an optional condition field that generates ConditionExpression
Directly access items from a table by primary key or a secondary index by delegating to QueryCommand.
df.query('movies', { actor: 'Tom Hanks', movie: 'Toy Story' })
The same response returned by send()ing this command
The name of the table containing the requested items
An object describing the comparisons used to generate KeyConditionExpression, ExpressionAttributeNames, and ExpressionAttributeValues
Optional options: Partial<FacadeQueryInput>The options accepted by the original QueryCommand class, plus an optional filter field that generates FilterExpression
Repeatedly call query until all paginated results are returned.
A response object with the same fields of the query response as arrays (one item for each request made)
The name of the table containing the requested items
An object describing the comparisons used to generate KeyConditionExpression, ExpressionAttributeNames, and ExpressionAttributeValues
Optional options: Partial<FacadeQueryInput>The options accepted by the original QueryCommand class, plus an optional filter field that generates FilterExpression
Returns one or more items and item attributes by accessing every item in a table or a secondary index by delegating to ScanCommand.
df.scan('movies', { actor: 'Tom Hanks' })
The same response returned by send()ing this command
The name of the table containing the requested items; or, if you provide IndexName in the options, the name of the table to which that index belongs
Optional filter: FilterAn object describing the comparisons used to generate FilterExpression, ExpressionAttributeNames, and ExpressionAttributeValues
Optional options: Partial<ScanCommandInput>The options accepted by the original ScanCommand method
Repeatedly call scan until all paginated results are returned.
A response object with the same fields of the scan response as arrays (one item for each request made)
The name of the table containing the requested items; or, if you provide IndexName in the options, the name of the table to which that index belongs
Optional filter: FilterAn object describing the comparisons used to generate FilterExpression, ExpressionAttributeNames, and ExpressionAttributeValues
Optional options: Partial<ScanCommandInput>The options accepted by the original ScanCommand method
Atomically retrieves multiple items from one or more tables (but not from indexes) in a single account and region by delegating to TransactGetCommand.
You can use the transactItem helper to create the request items.
import { transactItem as tr } from 'dynamo-facade-v3';
df.transactGet([
tr.get('movies', { actor: 'Tom Hanks', movie: 'Toy Story' }
])
The same response returned by send()ing this command
The items to get in the format [{ Get: { TableName: ..., Key: ... } }, ...]
Optional options: Partial<TransactGetCommandInput>The options accepted by the original TransactGetCommand class
Synchronous write operation that groups up to 25 action requests by delegating to TransactWriteCommand.
You can use the transactItem helper to create the request items.
import { transactItem as tr } from 'dynamo-facade-v3';
df.transactWrite([
tr.put('movies', { actor: 'Tom Hanks', movie: 'Toy Story' }
])
The same response returned by send()ing this command
The items to write in the format [ { Put: { ... } }, ...]
Optional options: Partial<TransactWriteCommandInput>The options accepted by the original TransactWriteCommand class
Edits an existing item's attributes, or adds a new item to the table if it does not already exist by delegating to UpdateCommand.
The same response returned by send()ing this command
The name of the table containing the item to update
The primary key of the item to be updated
A map of attribute name/value pairs with the attributes that must be modified
Optional options: Partial<FacadeUpdateItemInput>The options accepted by the original UpdateCommand class, plus an optional condition field that generates ConditionExpression
Generated using TypeDoc
Facade class for easy access to DynamoDB.