This package wraps the DynamoDB Client - AWS SDK for JavaScript v3 to provide a streamlined developer experience and consistent logging.
Wraps an AWS DynamoDB client to provide standard logging & services.
Kind: static class of wrapped-dynamodb-client
-
.WrappedDynamoDbClient
- new exports.WrappedDynamoDbClient([options])
-
item
-
.deleteItem(tableName, key) ⇒
Promise.<object>
-
.deleteItems(tableName, keys) ⇒
Promise.<number>
-
.getItem(tableName, key, [attributes]) ⇒
Promise.<object>
-
.purgeItems(tableName, keys) ⇒
Promise.<number>
-
.putItem(tableName, item) ⇒
Promise.<object>
-
.putItems(tableName, items) ⇒
Promise.<Array>
-
.query(tableName, options) ⇒
Promise.<object>
-
.scan(tableName, options) ⇒
Promise.<object>
-
.transactDeleteItems(tableName, keys) ⇒
Promise.<Array>
-
.transactPutItems(tableName, items) ⇒
Promise.<Array>
-
.deleteItem(tableName, key) ⇒
-
table
-
.createTable(tableName, [options]) ⇒
Promise.<object>
-
.deleteTable(tableName) ⇒
Promise.<object>
-
.describeTable(tableName) ⇒
Promise.<object>
-
.createTable(tableName, [options]) ⇒
WrappedDynamoDbClient constructor.
Param | Type | Description |
---|---|---|
[options] | object |
Options. |
[options.logger] | object |
Logger instance (default is global console object). Must have info, error & debug methods |
[options.logInternals] | boolean |
Log AWS client internals (default is false). |
[options.config] | object |
DynamoDBClientConfig object. |
Delete an item from a DynamoDB table.
Kind: instance method of WrappedDynamoDbClient
Returns: Promise.<object>
- WaiterResult object.
Category: item
Param | Type | Description |
---|---|---|
tableName | string |
Table name. |
key | object |
Item object (only the key is required). |
Delete multiple items from a DynamoDB table.
Kind: instance method of WrappedDynamoDbClient
Returns: Promise.<number>
- Array of responses from chunked batchWrite operations.
Category: item
Param | Type | Description |
---|---|---|
tableName | string |
Table name. |
keys | Array.<object> |
Array of item objects (only the key is required). |
Get an item from a DynamoDB table.
Kind: instance method of WrappedDynamoDbClient
Returns: Promise.<object>
- - GetItemCommandOutput object.
Category: item
Param | Type | Description |
---|---|---|
tableName | string |
Table name. |
key | object |
Item object (only the key is required). |
[attributes] |
string | Array.<string>
|
Comma-delimited list or string array of attributes to retrieve. |
Purge all items from a DynamoDB table.
Kind: instance method of WrappedDynamoDbClient
Returns: Promise.<number>
- Total items purged from table.
Category: item
Param | Type | Description |
---|---|---|
tableName | string |
Table name. |
keys | Array.<string> |
Item keys. |
Put an item into a DynamoDB table.
Kind: instance method of WrappedDynamoDbClient
Returns: Promise.<object>
- - PutItemCommandOutput object.
Category: item
Param | Type | Description |
---|---|---|
tableName | string |
Table name. |
item | object |
Item object. |
Put multiple items into a DynamoDB table.
Kind: instance method of WrappedDynamoDbClient
Returns: Promise.<Array>
- Array of responses from chunked batchWrite operations.
Category: item
Param | Type | Description |
---|---|---|
tableName | string |
Table name. |
items | Array.<object> |
Array of item objects. |
Query items from a DynamoDB table.
Kind: instance method of WrappedDynamoDbClient
Returns: Promise.<object>
- QueryCommandOutput object.
Category: item
Param | Type | Description |
---|---|---|
tableName | string |
Table name. |
options | object |
QueryCommandInput object. |
Scan items from a DynamoDB table.
Kind: instance method of WrappedDynamoDbClient
Returns: Promise.<object>
- ScanCommandOutput object.
Category: item
Param | Type | Description |
---|---|---|
tableName | string |
Table name. |
options | object |
ScanCommandInput object. |
Delete multiple items from a DynamoDB table as a single transaction.
Kind: instance method of WrappedDynamoDbClient
Returns: Promise.<Array>
- Array of responses from chunked batchWrite operations.
Category: item
Param | Type | Description |
---|---|---|
tableName | string |
Table name. |
keys | Array.<object> |
Array of item keys. |
Put multiple items into a DynamoDB table as a single transaction.
Kind: instance method of WrappedDynamoDbClient
Returns: Promise.<Array>
- Array of responses from chunked batchWrite operations.
Category: item
Param | Type | Description |
---|---|---|
tableName | string |
Table name. |
items | Array.<object> |
Array of item objects. |
Create a DynamoDB table.
Kind: instance method of WrappedDynamoDbClient
Returns: Promise.<object>
- WaiterResult object.
Category: table
Param | Type | Description |
---|---|---|
tableName | string |
Table name. |
[options] | object |
CreateTableCommandInput object. |
Delete a DynamoDB table.
Kind: instance method of WrappedDynamoDbClient
Returns: Promise.<object>
- - Deletion status
Category: table
Param | Type | Description |
---|---|---|
tableName | string |
Table name. |
Describe a DynamoDB table.
Kind: instance method of WrappedDynamoDbClient
Returns: Promise.<object>
- - TableDescription}
Category: table
Param | Type | Description |
---|---|---|
tableName | string |
Table name. |
See more great templates and other tools on my GitHub Profile!