orientjs icon indicating copy to clipboard operation
orientjs copied to clipboard

how to perform bulk insert in transaction

Open jhonny111s opened this issue 8 years ago • 0 comments

var trx = db.let('bulkitems', function(p){ p.insert().into("tabletobulk") .set([{name: 'item1'}, {name: 'itemN'}]) }) .commit().return('$bulkitems').all() .then( function(results){ console.log(results); //only save last item but need [@rid1, @rid2] } );

jhonny111s avatar Jan 09 '18 19:01 jhonny111s