나는 혼자서 문제를 해결할 수있었습니다. 동일한 문제가있는 사용자의 경우 여기에 내 솔루션을 게시합니다.
var pdb = new PouchDB('./test20'); // init of database
/* if I call function changes() it gives me the changes of a specific
with a specific ID*/
function changes() {
console.log("Currently in: changes()");
var idPlayer = ""+localStorage.getItem("playerIDLocalStorage");
pdb.get(idPlayer, {revs_info: true}).then(function (revs) {
var x = 0;
while(revs._revs_info[x].rev != null) {
var revision = ""+revs._revs_info[x].rev;
pdb.bulkGet({
docs: [{id: idPlayer, rev: revision}],
include_docs: true
}).then(function (result) {
var doc = result.results[0].docs[0].ok;
console.log(doc.playerName);
}).catch(function (err) {
console.log("Error in subchanges(): "+err);
});
x++;
}
}).catch(function (err) {
console.log("Error in changes(): "+err);
});
}