insertMultiple

Insert multiple items with a single schema to collection

insertMultipe({data}, schema, (success)=> {}, (error)=> {})

How to use:

my_collection.insertMultiple(
    [
        {key: value},
        {key: value}
    ],
    schema,
    () =>  // removed successfully,
    (error) => alert(error) 
);

Arguments:

parameter

required

types

data (input)

yes

array of objects

schema

yes

schema variable

success callback

yes

function

failure callback

yes

function

Example:

Last updated

Was this helpful?