insertMultipe({data}, schema, (success)=> {}, (error)=> {})
my_collection.insertMultiple(
[
{key: value},
{key: value}
],
schema,
() => // removed successfully,
(error) => alert(error)
);
import React,{useEffect} from 'react';
import {Text} from 'react-native';
import {Pleex} from 'pleex';
const App = () => {
// Create collection
const my_collection = Pleex.collection('myCollection');
// Create schema
const my_schema = Pleex.schema({
name: String,
});
// Insert to my collection
my_collection.insertMultiple(
[
{name: 'John'},
{name: 'Smith'},
{name: 'Sara'}
],
mySchema,
(success) => alert('success'),
(error) => alert(error)
);
return (
<>
<Text>Try Multiple insert</Text>
</>
);
};
export default App;