Namespace: dynamodb

dynamodb

Source:

Methods

(static) get(table, index, match) → {promise}

Select an item from a DynamoDB table by matching index
Parameters:
Name Type Description
table string The name of the table to select from
index index The name of the index to select by
match * The field value to match against
Source:
Returns:
- A promise that resolves on completion
Type
promise

(static) operation(table, name, params) → {promise}

Perform an arbitrary database operation using the full API options
Parameters:
Name Type Description
table string The name of the table operate on
name string The name of the operation to perform, eg query, scan etc
params object A params object as per the DocumentClient API The TableName parameter can be omitted
Source:
Returns:
- A promise that resolves on completion
Type
promise

(static) put(table, args) → {promise}

Add a new item to a DynamoDB table
Parameters:
Name Type Description
table string The name of the table to modify
args object The properties to apply to the new item
Source:
Returns:
- A promise that resolves on completion
Type
promise

(static) query(table, field, match) → {promise}

Select items from a DynamoDB table by matching field value
Parameters:
Name Type Description
table string The name of the table to select from
field string The name of the field to select by
match * The field value to match against
Source:
Returns:
- A promise that resolves on completion
Type
promise

(static) rangeQuery(table, field, match, range, start, end) → {promise}

Select items from a DynamoDB table by matching field and optional range values
Parameters:
Name Type Description
table string The name of the table to select from
field string The name of the field to select by
match * The field value to match against
range string The name of the range field to select by
start * The range value to select items greater than
end * The range value to select items less than
Source:
Returns:
- A promise that resolves on completion
Type
promise

(static) remove(table, keys) → {promise}

Remove an item from a DynamoDB table
Parameters:
Name Type Description
table string The name of the table to remove from
keys object An object containing key value pairs to match by If a sort key is defined on the table, its value must be supplied in addition to the hash key
Source:
Returns:
- A promise that resolves on completion
Type
promise

(static) scan(table) → {promise}

Get all values from a DynamoDB table
Parameters:
Name Type Description
table string The name of the table to select from
Source:
Returns:
- A promise that resolves on completion
Type
promise

(static) update(table, field, args) → {promise}

Update an existing item in a DynamoDB table
Parameters:
Name Type Description
table string The name of the table to modify
field string The name of the property to select the item by
args object The new properties to apply to the item
Source:
Returns:
- A promise that resolves on completion
Type
promise