docs-src/docs/releases/16.0.0.md
The release 16.0.0 is used for major refactorings. We did not change that much, mostly renaming things and fixing confusing implementation details.
Data stored in the previous version 15 is compatible with the code of the new version 16 for most RxStorage implementation. So migration will be easy.
Only the following RxStorage implementations are required to migrate the data itself with the storage migration plugin:
randomCouchString() to randomToken()ohash package when crypto.subtle does not exist. All modern runtimes (also react-native) now support crypto.subtle, so we do not need that fallback anymore.The LokiJS RxStorage was deprecated because LokiJS itself is no longer maintained. Therefore it will be removed completely. If you still need that, you can fork the code of it and publish it in an own package and link to it from the third party plugins page.
.destroy() to .close()Destroy was adapted from PouchDB, but people often think this deletes the written data. close is a better name for that functionality.
.destroy() to .close().onDestroy() to .onClose()postDestroyRxCollection to postCloseRxCollectionpreDestroyRxDatabase to preCloseRxDatabaseignoreDuplicate: true on createRxDatabase() must only be allowed in dev-mode.The ignoreDuplicate flag is only useful for tests and should never be used in production. We now throw an error if it is set to true in non-dev-mode.
Many reported issues come from people storing data that is not valid to their schema. To fix this, in dev-mode it is now required that at least one schema validator is used.
The memory-synced RxStorage was removed in RxDB version 16. Please use the memory-mapped storage instead which has better trade-offs and is easier to configure.
isEqual() and resolve().Because the handler is used in so many places it becomes confusing to write a proper conflict handler. Also having a handler that requires user interaction is only possible by hackingly using the context param. By splitting the functionalities it is easier to learn where the handlers are used and how to define them properly.
The OPFS and Filesystem-Node RxStorage had problems with storing emojis and other special characters inside of indexed fields. I completely rewrote them and improved performance especially on initial load when a lot of data is stored already and when doing many small writes/reads at the same time on in series.
rx-pipeline-checkpointconflictResultionTasks() and resolveConflictResultionTask() from the RxStorage interface.upstreamInitialSync() did not set a checkpoint and each time checked all documents if they are equal to the master.16.RxJsonSchema for easier debugging.There are many things that can be done by you to improve RxDB:
Stay connected with the latest updates and network with professionals in the RxDB community by following RxDB's official LinkedIn page!