WriteableTable.add() - zuki/Dexie.js GitHub Wiki

Adds an object to the object store.

Syntax

table.add(item, [key])

Parameters

item Object to add
key Primary key optional

Return Value

Promise

Remarks

Add given object to store. If an object with the same primary key already exist, the operation will fail and returned promise catch() callback will be called with the error object. If the operation succeeds, the returned promise resolve() callback receives the result of the add request on the object store, the id of the inserted object.

See Also

WriteableTable.put()

⚠️ **GitHub.com Fallback** ⚠️