1.6.21 • Published 11 months ago

@veterancrowd/wrapped-dynamodb-client v1.6.21

Weekly downloads
-
License
-
Repository
github
Last release
11 months ago

WrappedDynamoDbClient

This package wraps the DynamoDB Client - AWS SDK for JavaScript v3 to provide a streamlined developer experience and consistent logging.

API Documentation

wrapped-dynamodb-client.WrappedDynamoDbClient

Wraps an AWS DynamoDB client to provide standard logging & services.

Kind: static class of wrapped-dynamodb-client

new exports.WrappedDynamoDbClient(options)

WrappedDynamoDbClient constructor.

ParamTypeDescription
optionsobjectOptions.
options.loggerobjectLogger instance (default is global console object). Must have info, error & debug methods
options.logInternalsbooleanLog AWS client internals (default is false).
options.configobjectDynamoDBClientConfig object.

wrappedDynamoDbClient.deleteItem(tableName, key) ⇒ Promise.<object>

Delete an item from a DynamoDB table.

Kind: instance method of WrappedDynamoDbClient
Returns: Promise.<object> - WaiterResult object.
Category: item

ParamTypeDescription
tableNamestringTable name.
keyobjectItem object (only the key is required).

wrappedDynamoDbClient.deleteItems(tableName, keys) ⇒ Promise.<number>

Delete multiple items from a DynamoDB table.

Kind: instance method of WrappedDynamoDbClient
Returns: Promise.<number> - Array of responses from chunked batchWrite operations.
Category: item

ParamTypeDescription
tableNamestringTable name.
keysArray.<object>Array of item objects (only the key is required).

wrappedDynamoDbClient.getItem(tableName, key, attributes) ⇒ Promise.<object>

Get an item from a DynamoDB table.

Kind: instance method of WrappedDynamoDbClient
Returns: Promise.<object> - - GetItemCommandOutput object.
Category: item

ParamTypeDescription
tableNamestringTable name.
keyobjectItem object (only the key is required).
attributesstring | Array.<string>Comma-delimited list or string array of attributes to retrieve.

wrappedDynamoDbClient.purgeItems(tableName, keys) ⇒ Promise.<number>

Purge all items from a DynamoDB table.

Kind: instance method of WrappedDynamoDbClient
Returns: Promise.<number> - Total items purged from table.
Category: item

ParamTypeDescription
tableNamestringTable name.
keysArray.<string>Item keys.

wrappedDynamoDbClient.putItem(tableName, item) ⇒ Promise.<object>

Put an item into a DynamoDB table.

Kind: instance method of WrappedDynamoDbClient
Returns: Promise.<object> - - PutItemCommandOutput object.
Category: item

ParamTypeDescription
tableNamestringTable name.
itemobjectItem object.

wrappedDynamoDbClient.putItems(tableName, items) ⇒ Promise.<Array>

Put multiple items into a DynamoDB table.

Kind: instance method of WrappedDynamoDbClient
Returns: Promise.<Array> - Array of responses from chunked batchWrite operations.
Category: item

ParamTypeDescription
tableNamestringTable name.
itemsArray.<object>Array of item objects.

wrappedDynamoDbClient.query(tableName, options) ⇒ Promise.<object>

Query items from a DynamoDB table.

Kind: instance method of WrappedDynamoDbClient
Returns: Promise.<object> - QueryCommandOutput object.
Category: item

ParamTypeDescription
tableNamestringTable name.
optionsobjectQueryCommandInput object.

wrappedDynamoDbClient.scan(tableName, options) ⇒ Promise.<object>

Scan items from a DynamoDB table.

Kind: instance method of WrappedDynamoDbClient
Returns: Promise.<object> - ScanCommandOutput object.
Category: item

ParamTypeDescription
tableNamestringTable name.
optionsobjectScanCommandInput object.

wrappedDynamoDbClient.transactDeleteItems(tableName, keys) ⇒ Promise.<Array>

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

ParamTypeDescription
tableNamestringTable name.
keysArray.<object>Array of item keys.

wrappedDynamoDbClient.transactPutItems(tableName, items) ⇒ Promise.<Array>

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

ParamTypeDescription
tableNamestringTable name.
itemsArray.<object>Array of item objects.

wrappedDynamoDbClient.createTable(tableName, options) ⇒ Promise.<object>

Create a DynamoDB table.

Kind: instance method of WrappedDynamoDbClient
Returns: Promise.<object> - WaiterResult object.
Category: table

ParamTypeDescription
tableNamestringTable name.
optionsobjectCreateTableCommandInput object.

wrappedDynamoDbClient.deleteTable(tableName) ⇒ Promise.<object>

Delete a DynamoDB table.

Kind: instance method of WrappedDynamoDbClient
Returns: Promise.<object> - - Deletion status
Category: table

ParamTypeDescription
tableNamestringTable name.

wrappedDynamoDbClient.describeTable(tableName) ⇒ Promise.<object>

Describe a DynamoDB table.

Kind: instance method of WrappedDynamoDbClient
Returns: Promise.<object> - - TableDescription}
Category: table

ParamTypeDescription
tableNamestringTable name.

See more great templates and other tools on my GitHub Profile!

1.6.20

11 months ago

1.6.21

11 months ago

1.6.19

12 months ago

1.6.17

1 year ago

1.6.18

1 year ago

1.6.16

1 year ago

1.6.15

1 year ago

1.6.14

1 year ago

1.6.13

1 year ago

1.6.12

1 year ago

1.6.11

1 year ago

1.6.10

1 year ago

1.6.9

1 year ago

1.6.8

1 year ago

1.6.7

1 year ago

1.6.6

2 years ago

1.6.4

2 years ago

1.6.3

2 years ago

1.6.2

2 years ago

1.6.1

2 years ago

1.6.0

2 years ago

1.5.1

2 years ago

1.2.4

2 years ago

1.5.0

2 years ago

1.4.1

2 years ago

1.2.3

2 years ago

1.4.0

2 years ago

1.3.0

2 years ago

1.6.5

2 years ago

1.2.2

2 years ago

1.2.0

2 years ago

1.1.1

2 years ago

1.2.0-0

2 years ago

1.2.1

2 years ago

1.1.2

2 years ago

1.0.2

2 years ago

1.1.0

2 years ago

1.0.1

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.0

2 years ago

0.0.1

2 years ago