DynamoDbPutItemStatement

DynamoDbPutItemStatement

new DynamoDbPutItemStatement(opt)

SQL-ish PutItem statement class for AWS DynamoDB.

create DynamoDbPutItemStatement.

SQL-ish Syntax:

INSERT INTO <table-name> ( <attribute-list> )
VALUES ( <value-list> )
[WHERE <key-condition-expression>]
  • [] is representing that can be ommited.
  • <table-name> - DynamoDB table name.
  • <attribute-list> - The comma separated attribute names.
  • <values-list> - The comma separated attribute values.
  • <key-condition-expression> - Primary key conditional expression.
Source:
Parameters:
Name Type Description
opt string | object

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

Methods

getParameter(args) → {object}

Get a parameter as a result of this statement instance. It is available to execute the DynamoDB API.

Source:
Parameters:
Name Type Description
args object

K-V which is an attribute name to the value.

Returns:
Type:
object

A parameter for the DynamoDB API.

setValues(values) → {undefined}

Set an item to this statement. The item will be put to the DynamoDB when this statement ran.

Source:
Parameters:
Name Type Description
values array | object

If this is array, it must contain values as same order for the attributes specified as SQL in the constructor. If this is an object, the key is an attribute names. Whether each cases above, the attribute names must be specified by SQL-ish statement at the constructor. The values will be converted to DynamoDB Map Object. So, you can specify a value as is.

Returns:
Type:
undefined