Wednesday, 15 March 2017

arangojs - How to know if the insert function to arangodb is done successfully?

I followed the tutorial from https://github.com/arangodb/arangojs#queries and this is one of the code to insert document

var qb = require('aqb');
db.query(
    qb.for('u').in('_users')
    .filter(qb.eq('u.authData.active', '@active'))
    .return('u.user'),
    {active: true}
)
.then(cursor => {
    // cursor is a cursor for the query result
});

How would I know if the insert function to arangodb is done successfully? for example I will return true of the insert was successful and false if not



via Gerald

No comments:

Post a Comment