| commit | e4cc8905354489be9a6310cc948bf4d8e64bd56e | [log] [tgz] |
|---|---|---|
| author | Johannes Jörg Schmidt <schmidt@pm.me> | Sat May 21 00:12:02 2022 +0200 |
| committer | Johannes Jörg Schmidt <schmidt@pm.me> | Sat May 21 09:19:51 2022 +0200 |
| tree | 4867ed03b8342bbf0dc4330db1e1dec8e908d58b | |
| parent | 9519c748c48cbac41451039765c758e5987bbc57 [diff] |
fix: active task total items calculation Update sequences can be strings, e.g. `2342-g1AAAACheJzLYWBgYMpgTmEQTM4vTc5ISXIwNDLXMwBCwxyQVB4LkGRoAFL_gSArgzmJgYFlQi5QjN0wydgsMS0Jm1Y8BiYyJNUjTJoGNsnMMC0lLckCm54sAOFdKgw` (and are always strings in clustered CouchDB since v2) and therefore cannot be subtracted. This uses `parseInt(seq, 10)` to get an integer from the sequence number or sequence string. Note that `parseInt` will ignore the appendix (is that even specified anywhere?) and also works with integers. In reality, this is not even accurate. Because eg changing the `_security` object in an Apache CouchDB database also changes the sequence, even though no document change has been written. Therefore, the sequence arithmetic is insufficient for counting document changes. But normally the active task is used for progress display purposes, so this might suffice as a rough approximation.
PouchDB is an open-source JavaScript database inspired by Apache CouchDB that is designed to run well within the browser.
PouchDB was created to help web developers build applications that work as well offline as they do online.
To get started using PouchDB, check out the web site and API documentation.
The PouchDB community is active on Libera IRC (web), in the Google Groups mailing list, and on StackOverflow. Or you can tweet @pouchdb!
If you think you've found a bug in PouchDB, please write a reproducible test case and file a Github issue. You can start with a template we have built on glitch.
If you like to live on the bleeding edge, you can build PouchDB from source using these steps:
git clone https://github.com/pouchdb/pouchdb.git cd pouchdb npm install
After running these steps, the browser build can be found in packages/node_modules/pouchdb/dist/pouchdb.js.
PouchDB follows semantic versioning. To see a changelog with all PouchDB releases, check out the Github releases page.
For a concise list of breaking changes, there's the wiki list of breaking changes.
Keep in mind that PouchDB is auto-migrating, so a database created in 1.0.0 will still work if you open it in 4.0.0+. Any release containing a migration is clearly marked in the release notes.
We‘re always looking for new contributors! If you’d like to try your hand at writing code, writing documentation, designing the website, writing a blog post, or answering questions on StackOverflow, then we'd love to have your input.
If you have a pull request that you‘d like to submit, please read the contributing guide for info on style, commit message format, and other (slightly!) nitpicky things like that. PouchDB is heavily tested, so you’ll also want to check out the testing guide.