Skip to content

Commit

Permalink
wip(indexeddb): stub _purgeRev method
Browse files Browse the repository at this point in the history
  • Loading branch information
jankaszel authored and AlbaHerrerias committed Dec 7, 2022
1 parent 972ae33 commit e861d00
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions packages/node_modules/pouchdb-adapter-indexeddb/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,19 @@ function IdbPouch(dbOpts, callback) {
});
};

api._purgeRev = function (docId, rev) {
// first, let's remove the document from our docs object store and see what happens to the index
return this.remove(docId, rev).then(() => {
// then, we inspect the meta object stores
// then, we check the auxiliary MR index databases. how do we trigger view rebuilds? do we want actual rebuilds or
// something else?
// also of interest could be the native indexeddb find indexes - they shouldn't contain anything since they're
// updated automatically? MR-based find indexes should work as above.

// also, make sure to remove the entire document if we remove the last leaf that has no branched path?
});
};

// TODO: this setTimeout seems nasty, if its needed lets
// figure out / explain why
setTimeout(function () {
Expand Down

0 comments on commit e861d00

Please sign in to comment.