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 valueobject Binary value (Buffer | Uint8Array) depending on environment. - Source:
Throws:
BinConversionErrorReturns:
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 keystring The attribute name being conditioned. operatorstring The operator in the conditional clause. (See lower level docs for full list of operators) val1Potential first element in what would be the AttributeValueList val2Potential 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 setarray An array that contains elements of the same typed as defined by {type}. typestring Can only be a [S]tring, [N]umber, or [B]inary type. - Source:
Throws:
InvalidSetType, InconsistentTypeReturns:
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 valuestring String value to converted to Binary object. - Source:
Throws:
StrConversionErrorReturns:
Return value will be a Buffer or Uint8Array in the browser.- Type
- object