Class: DynamoDB

DynamoDB

DynamoDB

new DynamoDB(dynamoDB) → {DynamoDB}

Create an instance of the DynamoDB Document client.
Parameters:
Name Type Description
dynamoDB AWS.DynamoDB An instance of the service provided AWS SDK (optional).
Source:
Returns:
Modified version of the service for Document support.
Type
DynamoDB

Methods

BinToStr(value) → {string}

Utility to convert a Binary object into its String equivalent.
Parameters:
Name Type Description
value object Binary value (Buffer | Uint8Array) depending on environment.
Source:
Throws:
BinConversionError
Returns:
Return value will be the string representation of the Binary object.
Type
string

Condition(key, operator, val1, val2) → {Condition}

Creates an instance of Condition and should be used with the DynamoDB client.
Parameters:
Name Type Description
key string The attribute name being conditioned.
operator string The operator in the conditional clause. (See lower level docs for full list of operators)
val1 Potential first element in what would be the AttributeValueList
val2 Potential second element in what would be the AttributeValueList
Source:
Returns:
Condition for your DynamoDB request.
Type
Condition

Set(set, type) → {Set}

Utility to create Set Object for requests.
Parameters:
Name Type Description
set array An array that contains elements of the same typed as defined by {type}.
type string Can only be a [S]tring, [N]umber, or [B]inary type.
Source:
Throws:
InvalidSetType, InconsistentType
Returns:
Custom Set object that follow {type}.
Type
Set

StrToBin(value) → {object}

Utility to convert a String to the necessary Binary object.
Parameters:
Name Type Description
value string String value to converted to Binary object.
Source:
Throws:
StrConversionError
Returns:
Return value will be a Buffer or Uint8Array in the browser.
Type
object