Skip to content

WriteableTable.bulkAdd()

David Fahlander edited this page Mar 11, 2016 · 22 revisions

Adds objects to the object store.

Syntax

table.bulkAdd(items)

Parameters

items Array of objects to add

Return Value

Promise

Remarks

Add given array of objects to store.

If you have a large number of objects to add to the object store, bulkAdd() is a little faster than doing add() in a loop. The object store needs to have inbound keys in order for bulkAdd to work - i.e. you're table schema must not start with an empty key.

var db = new Dexie("test");
db.version(1).stores({
    tableWithInboundKeys: "id,x,y,z",
    tableWithoutInboundKeys: ",x,y,z"
});

See Also

WriteableTable.add()

Clone this wiki locally