Add Update Delete - JGdijk/ords GitHub Wiki

To add items use the add() function:

ords.use('task').add([
    {id: 1 , name: 'task1'},
    {id: 2 , name: 'task2'}
]);

*you can also add a singel item by inserting a single object instead of an array.

To update items use the update() function:

ords.use('task').update({name: 'all the same'}, [ids]); //gives all the tasks the same name

*see the statement section how to select which items to update.

To remove items use the remove() function:

ords.use('task').remove([ids]); // removes all the tasks