apache / apache/pouchdb

[adapter-indexeddb] deleted document is "missing" not "deleted"

Open
#8,562 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
17.6k
Forks
1.5k
PR merge metrics
No merged PRs in 30d

Description

### Issue
When we are using the new indexeddb adapter, we see that a deleted document will not be marked as `deleted` in the `reason` field of the Exception that is thrown from `db.get(id)`, but it is `missing`.
This differs from how couchdb and the old idb adapter do things.
See the code here:
https://github.com/pouchdb/pouchdb/blob/15092e8eefaac5604afe2155ed7d38872bea40be/packages/node_modules/pouchdb-adapter-indexeddb/src/get.js#L23-L26

vs
https://github.com/pouchdb/pouchdb/blob/15092e8eefaac5604afe2155ed7d38872bea40be/packages/node_modules/pouchdb-adapter-idb/src/index.js#L354-L355

### Info
Pouchdb: 7.3.0

### Reproduce
I'll try to add a breaking test to demonstrate the difference.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.