Closed YourTechBud closed 5 years ago
Here's how the batch API should look for javascript:
const batch = db.beginBatch();
batch.add(db.insert(col).docs(...docs));
batch.add(db.update(col).where(whereClause).set())
// Apply batch
batch.apply().then(res => ...).catch(ex => ...)
Same can be ported to other client libraries as well
Have done the refactoring and have created a Pull Request.
The transaction support we have added works more like a batch. Let's make that more explicit. This will require us refactoring:
crud.go
andoperations.go