rxdb

A fast, local first, reactive Database for JavaScript Applications https://rxdb.info/

APACHE-2.0 License

Downloads
69.4K
Stars
20.7K
Committers
235

Bot releases are hidden (Show)

rxdb - 13.0.0

Published by pubkey about 2 years ago

BREAKING read the announcement

  • ADD credentials settings to the GraphQL replication plugin #3976 Thanks @marcoklein

  • RENAMED the ajv-validate plugin to validate-ajv to be in equal with the other validation plugins.

  • The is-my-json-valid validation is no longer supported until this bug is fixed.

  • REFACTORED the schema validation plugins, they are no longer plugins but now they get wrapped around any other RxStorage.

    • It allows us to run the validation inside of a Worker RxStorage instead of running it in the main JavaScript process.
    • It allows us to configure which RxDatabase instance must use the validation and which does not. In production it often makes sense to validate user data, but you might not need the validation for data that is only replicated from the backend.
  • REFACTORED the key compression plugin, it is no longer a plugin but now a wrapper around any other RxStorage.

    • It allows to run the key-comresion inside of a Worker RxStorage instead of running it in the main JavaScript process.
  • REFACTORED the encryption plugin, it is no longer a plugin but now a wrapper around any other RxStorage.

    • It allows to run the encryption inside of a Worker RxStorage instead of running it in the main JavaScript process.
    • It allows do use asynchronous crypto function like WebCrypto
  • Store the password hash in the same write request as the database token to improve performance.

  • REMOVED many unused plugin hooks because they decreased the performance.

  • REMOVED support for temporary documents see here

  • REMOVED RxDatabase.broadcastChannel The broadcast channel has been moved out of the RxDatabase and is part of the RxStorage. So it is not longer exposed via RxDatabase.broadcastChannel.

  • In the RxDB internal _meta.lwt field, we now use 2 decimals number of the unix timestamp in milliseconds.

  • REMOVE RxStorageStatics .hash and .hashKey

  • CHANGE removed default usage of md5 as default hashing. Use a faster non-cryptographic hash instead.

    • ADD option to pass a custom hash function when calling createRxDatabase.
  • Removed the liveInterval option of the replication. It was an edge case feature with wrong defaults. If you want to run the pull replication on internval, you can send a RESYNC event manually in a loop.

  • CHANGE use Float instead of Int to represent timestamps in GraphQL.

  • REPLACED RxReplicationPullError and RxReplicationPushError with normal RxError like in the rest of the RxDB code.

  • REMOVED the option to filter out replication documents with the push/pull modifiers #2552 because this does not work with the new replication protocol.

  • CHANGE default of replication live to be set to true. Because most people want to do a live replication, not a one time replication.

  • CHANGED Attachment data is now always handled as Blob because Node.js does support Blob since version 18.0.0 so we no longer have to use a Buffer but instead can use Blob for browsers and Node.js

  • FIXED multiple problems with encoding attachments data. We now use the js-base64 library which properly handles utf-8/binary/ascii transformations.

  • RENAMED the server plugin is now called server-couchdb and RxDatabase.server() is now RxDatabase.serverCouchDB()

  • ADDED the websocket replication plugin

  • ADDED the FoundationDB RxStorage

  • FIX couchdb-server plugin missed out events from the replication.

  • ADD Support JsonSchema for nested additionalProperties #3952 Thanks @swnf

  • REFACTORED the layout of RxChangeEvent to better match the RxDB requirements and to fix the 'deleted-document-is-modified-but-still-deleted' bug.

rxdb - 12.0.0

Published by pubkey over 2 years ago

BREAKING read the announcement

  • All indexes that do not contain the primaryKey, get the primary key added.

  • You can now set a custom index when doing a query.

  • Unified the replication primitives and the GraphQL replication plugin.

  • Removed the deprecated in-memory plugin.

  • Added cleanup plugin

  • Refactor local documents plugin to only create a storage instance for local documents when needed.

  • Removed the core plugin. The default export from 'rxdb' now exports only the RxDB core without plugins.

  • The Dexie.js RxStorage is no longer in beta mode.

  • Added the in memory storage plugin.

  • Added RxDocument().toMutableJSON()

  • Added RxCollection().bulkUpsert()

  • Added optional init() function to RxPlugin.

  • dev-mode: Add check to ensure all top-level fields in a query are defined in the schema.

  • Support for array field based indexes like data.[].subfield was removed, as it anyway never really worked.

  • Refactored the usage of RxCollection.storageInstance to ensure all hooks run properly.

  • Refactored the encryption plugin so no more plugin specific code is in the RxDB core.

  • Removed the encrypted export from the json-import-export plugin. This was barely used and made everything more complex. All exports are no non-encrypted. If you need them encrypted, you can still run by encryption after the export is done.

  • RxPlugin hooks now can be defined as running before or after other plugin hooks.

  • Attachments are now internally handled as string instead of Blob or Buffer

  • Fix (replication primitives) only drop pulled documents when a relevant document was changed locally.

  • Fix dexie.js was not able to query over an index when keyCompression: true

Changes to RxStorageInterface:

  • RxStorageInstance must have the RxStorage in the storage property.
  • The _deleted field is now required for each data interaction with RxStorage.
  • Removed RxStorageInstance.getChangedDocuments() and added RxStorageInstance.getChangedDocumentsSince() for better performance.
  • Added doesBroadcastChangestream() to RxStorageStatics
  • Added withDeleted parameter to RxStorageKeyObjectInstance.findLocalDocumentsById()
  • Added internal _meta property to stored document data that contains internal document related data like last-write-time and replication checkpoints.
rxdb - 12.0.0-beta.32

Published by pubkey over 2 years ago

rxdb - 12.0.0-beta.31

Published by pubkey over 2 years ago

12.0.0-beta.31

rxdb - 12.0.0-beta.30

Published by pubkey over 2 years ago

12.0.0-beta.30

rxdb - 12.0.0-beta.29

Published by pubkey over 2 years ago

rxdb - 12.0.0-beta.27

Published by pubkey over 2 years ago

12.0.0-beta.27

rxdb - 12.0.0-beta.26

Published by pubkey over 2 years ago

rxdb - 12.0.0-beta.25

Published by pubkey over 2 years ago

12.0.0-beta.25

rxdb - 12.0.0-beta.24

Published by pubkey over 2 years ago

rxdb - 12.0.0-beta.23

Published by pubkey over 2 years ago

  • All indexes that do not contain the primaryKey, get the primary key added.

  • You can now set a custom index when doing a query.

  • Unified the replication primitives and the GraphQL replication plugin.

  • Removed the deprecated in-memory plugin.

  • Refactor usage of RxCollection.storageInstance to ensure all hooks run properly.

  • Added withDeleted parameter to RxStorageKeyObjectInstance.findLocalDocumentsById()

  • The _deleted field is now required for each data interaction with RxStorage.

  • RxStorageInstance must have the RxStorage in the storage property.

  • Removed RxStorageInstance.getChangedDocuments() and added RxStorageInstance.getChangedDocumentsSince() for better performance.

  • Removed the core plugin. The default export from 'rxdb' now exports only the RxDB core without plugins.

  • Added optional init() function to RxPlugin.

  • Added doesBroadcastChangestream() to RxStorageStatics

  • Fix (replication primitives) only drop pulled documents when a relevant document was changed locally.

  • Add _meta property to stored document data.

  • Attachments are now internally handled as string instead of Blob or Buffer

  • RxPlugin hooks now can be defined as running before or after other plugin hooks.

  • Removed the encrypted export from the json-import-export plugin. This was barely used and made everything more complex. All exports are no non-encrypted. If you need them encrypted, you can still run by encryption after the export is done.

  • Refactor the encryption plugin so no more plugin specific code is in the RxDB core.

  • Refactor local documents plugin to only create a storage instance for local documents when needed.

  • Added RxDocument().toMutableJSON()

  • Added RxCollection().bulkUpsert()

  • Added RxStorageInstance.cleanup()

  • Added cleanup plugin

  • dev-mode: Add check to ensure all top-level fields in a query are defined in the schema.

  • Support for array field based indexes like data.[].subfield was removed.

rxdb - 12.0.0-beta.2

Published by pubkey over 2 years ago

  • All indexes that do not contain the primaryKey, get the primary key added.

  • You can now set a custom index when doing a query.

  • Unified the replication primitives and the GraphQL replication plugin.

  • Removed the deprecated in-memory plugin.

  • Refactor usage of RxCollection.storageInstance to ensure all hooks run properly.

  • Added withDeleted parameter to RxStorageKeyObjectInstance.findLocalDocumentsById()

  • The _deleted field is now required for each data interaction with RxStorage.

  • Removed the core plugin. The default export from 'rxdb' now exports only the RxDB core without plugins.

  • Added optional init() function to RxPlugin.

  • Added doesBroadcastChangestream() to RxStorageStatics

  • Fix (replication primitives) only drop pulled documents when a relevant document was changed locally.

  • Add _meta property to stored document data.

rxdb - 11.6.0

Published by pubkey over 2 years ago

Bugfixes:

  • #3666 RxDB with lokijs works bad in Safari and FF when using multiple tabs

Other:

  • Replication primitives must throw an error if _deleted field is missing. #3671
rxdb - 11.5.1

Published by pubkey over 2 years ago

Bugfixes:

  • RxStorage.statics.getQueryMatcher() must not match documents with _deleted: true.
rxdb - 11.5.0

Published by pubkey over 2 years ago

Features:

rxdb - 11.4.0

Published by pubkey over 2 years ago

Bugfixes:

  • RxDocument.toJSON() is leaking meta field _deleted. #3645 Thanks @Bessonov

Features:

  • Allow truthy values for the GraphQL replication deletedFlag field. #3644 Thanks @nirvdrum

Other:

  • .findOne(documentId) should use RxStorage().findDocumentsById() instead of RxStorage().query()
rxdb - 11.3.0

Published by pubkey almost 3 years ago

Bugfixes:

  • GraphQL replication: Unnecessary local document writes fill up the database #3627 Thanks @hdwatts
rxdb - 11.2.0

Published by pubkey almost 3 years ago

Bugfixes:

  • Replication Primitives: Local writes while running the pull must not be lost but send to the remote.
  • Replication Primitives: Should not stack up failed runs and then run many times.
  • Support composite indices in schema literal types #3609 Thanks @nirvdrum
rxdb - 11.1.0

Published by pubkey almost 3 years ago

Features:

  • Added toTypedRxJsonSchema and ExtractDocumentTypeFromTypedRxJsonSchema to generate the document types from the schema.
rxdb - 11.0.0

Published by pubkey almost 3 years ago

BREAKING:

  • RxStorage: The non async functions prepareQuery, getSortComparator and getQueryMatcher have been moved out of RxStorageInstance into RxStorage. This was needed to have better WebWorker support. This will not affect you do not use a custom RxStorage implementation.
  • LokiJS: Do not use the IdleQueue of the RxDatabase to handle calls to saveDatabase(), instead wait for CPU idleness of the JavaScript process.
  • RxStorageInterface:
    • Replaced all Map with plain json objects so that they can be JSON.stringify-ed
    • Replaced typings of event stream to use EventBulk and process events in bulks to save performance.
    • Move all static methods into the statics property so we can code-split when using the worker plugin.
    • digest and length of attachment data is now created by RxDB, not by the RxStorage. #3548
    • Added the statics hashKey property to identify the used hash function.
  • Internally all events are handles via bulks, this saves performance when events are transfered over a WebWorker or a BroadcastChannel.
  • Removed the deprecated recieved methods, use received instead. See #3392
  • Removed the no-validate plugin. To use RxDB without schema validation, just do not add a validation plugin to your custom build.

Bugfixes:

  • Do not throw an error when database is destroyed while a GraphQL replication is running.
  • Compound primary key migration throws "Value of primary key(s) cannot be changed" #3546 Thanks @nothingkid
  • Allow _id as primaryKey #3562 Thanks @SuperKirik
  • LokiJS: Remote operations do never resolve when remote instance was leader and died.

Other:

  • LokiJS: All documents are stored with a $lastWriteAt field, so we can implement an auto compaction later.
  • Transpile async/await to promises instead of generators. via babel-plugin-transform-async-to-promises