triniwiz / triniwiz/nativescript-plugins
[nativescript-couchbase] inBatch method doesn't work on Android
Open
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 87
- Forks
- 57
- Avg merge
- 1h 36m
- Merged PRs (30d)
- 4
Description
Hi! I try to use the inBatch method, iOS works, but Android doesn't.
const processingLoop = () => {
for (let i = 0; i < claims.length; i++) {
const documentId = 'claim_' + claims[i].id;
const existingDocument = this.database.getDocument(documentId);
// add a unique type, since couchbase does not have the name of collections or tables
Object.assign(claims[i], { _type: 'claim' });
if (!existingDocument) {
this.database.createDocument(claims[i], documentId);
} else {
this.database.updateDocument(documentId, claims[i]);
}
}
};
try {
this.database.inBatch(() => processingLoop());
} catch (e) {
console.log('e);
}

Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the Android implementation or entry point for the nativescript-couchbase inBatch method and compare its behavior with the working iOS path. No source file or test is named in the report, so first identify the relevant Android code and an existing test or reproduction; done means the shown batch loop works on Android as it does on iOS.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, javascript
- Domain
- database, mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100