Skip to content

Table.put()

David Fahlander edited this page Nov 25, 2016 · 2 revisions

Adds new or replaces existing object in the object store.

Syntax

table.put(item, [key])

Parameters

item Object to add
key Primary key optional

Return Value

Promise

Remarks

If an object with the same primary key already exist, it will be replaced with the given object. If it does not exist, it will be added.

If the operation succeeds then the returned Promise resolves to the key under which the object was stored in the Table.

See Also

Table.update()

Table.add()

Collection.modify()

Clone this wiki locally