DynamoDbQueryStatement

DynamoDbQueryStatement

new DynamoDbQueryStatement(opt)

SQL-ish Query statement class for AWS DynamoDB.

Source:
Parameters:
Name Type Description
opt string | object

SQL-ish Query statement as string or parameter object for Query API.

Methods

next() → {undefined}

Get next following items from inside of the callback function of previous invoked run(). This method is available when the limit feature was using. The result also will be notified to the same callback.

Source:
Returns:
Type:
undefined

run(args, callback) → {undefined}

Run the statement and notify its result to callback in async.

If the Limit feature of the returning item count is used in the statement, the next() method can be used in the callback to read next following items.

Source:
Parameters:
Name Type Description
args object

The parameter for this statement. The key is a parameter name and must be an attribute placeholder name starting with ':' that used in the statement. Its value will be converted to the DynamoDB Map Object, So you can set it as is.

callback function

The callback function to receive the result or an error. The declaration is (err, result) => { ... }. The result is an array of items. The type of Item is the map of DynamoDB.

Returns:
Type:
undefined