Questions tagged [rxdb]
The rxdb tag has no usage guidance.
rxdb
53
questions
0
votes
0
answers
26
views
implementing RxDb with my mern application
I an a total noob and I'm tying to use Rxdb with my mern application for offline experience
I'm trying to use Rxdb to save some data locally present in mongodb for offline use. in a normal mern ...
0
votes
1
answer
92
views
NG0602 when using RxDB reactivity factory
My use case: Use a reactive rxDB.collection.find().$$() inside a computed angular signal. I am quite sure I am misreading the current documentation :/
Reading the current RxDB documentation I can see ...
0
votes
1
answer
50
views
RxDB "Cannot open database state with newer RxDB version" error when trying to update from v13 to v15
I'm trying to update my RxDB database from version 13 to version 15, but I'm encountering a very strange error:
bootstrap.tsx:242 RxError (DM5): RxError (DM5):
Cannot open database state with newer ...
1
vote
1
answer
101
views
Add item to nested array in RXDB
I am using RXDB for the first time and i am a bit of trouble understanding how to add data to a document.
I have a "boards" collection, which i can get with db.boards;
Boards have "...
2
votes
0
answers
112
views
How to sync an RxDB instance with the actual IndexedDB when switching tabs? ( multitab )
I have a web application that uses RxDB ( https://rxdb.info/ ) to store data in indexedDB. I encountered an issue where when I clear the data in indexedDB using the clearTODOS method in one tab, the ...
0
votes
0
answers
75
views
How handle rxdb .$.subscribe with replication
i my case,
i m using myDatabase.collections.opportunities.$.subscribe(
that must save any historical step/changes for each. where there differences between documentData and previousDocumentData on &...
0
votes
0
answers
50
views
Failed to add collection:', [Error: ensureNotFalsy() is falsy] - React native
I'm working on react native project where method is written in react and I want to save the collection. I'm using SQLite rxdb plugin to save it but getting this error everytime. even I tried with ...
0
votes
0
answers
69
views
RxDB RxDatabaseBase DexieError
I am trying to implement signalDb with RxDB
Just following this example by signalDb
(Here's the source code of this example)
Ang I got this error:
DexieError {_e: Error
at getErrorWithStack (http:...
0
votes
1
answer
120
views
rxDB incrementalPatch when there is an object
I am using rxDB like this to update my document:
await doc.incrementalPatch({
...newDoc,
updated_at: new Date().toUTCString(),
});
However I get this issue:
RxError (DOC6):
RxDocument....
0
votes
0
answers
111
views
RXDB Application and data storage size issue
I'm working on a web app using RXDB as a client side database and MongoDB as a server side database.
Currently, local RXDB browser databases contain exactly the same data as the server side db.
This ...
1
vote
0
answers
170
views
Electron - unable to use rxdb in vuejs renderer process
I'm trying to use rxDB inside my electron vue app. I've followed the guide on how to implement it inside the renderer process, and I have the following code in my App.vue file:
// Importo dipendenze ...
1
vote
0
answers
485
views
error in rxdb:Cannot read properties of undefined (reading 'key')?
enter image description here
rx-schema-helper.ts:104 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'key')
at getPrimaryFieldOfPrimaryKey (rx-schema-helper.ts:104:63)...
1
vote
1
answer
944
views
Any way to make RxDB work for React Native on Expo with a SQLite database (I own a RxDB Premium, the SQLite Plugin does not work)
The author mentions that his premium plugin rxdb-premium/plugins/storage-sqlite is not working on older version of SQLite on Android, if we get the error mentionned below (in the next code block). So, ...
1
vote
1
answer
349
views
Getting Adapter not added. Use RxDB.plugin(require('pouchdb-adapter-[adaptername]'); in ReactNative
RxError: RxError:
RxDatabase.create(): Adapter not added. Use RxDB.plugin(require('pouchdb-adapter-[adaptername]');
Given parameters: {
adapter:"asyncstorage"}
database.js //mycode
import ...
1
vote
1
answer
512
views
pouchdb or alternative where I can control how much data stored locally?
In the design stage for an app that collects large amounts of data...
Ideally, I want it to be an offline-first app and was looking to Pouchdb/Counchdb - However, the data needs to be kept for years ...
0
votes
1
answer
429
views
How to store Typescript data types in RxDB?
New to RxDB here.
I've read through the RxDB document and seems there's no elegant way to store types in RxDB. For example,
Sum types
type Animal = {kind: 'horse', pawColor: Color} | {kind: 'bird', ...
0
votes
1
answer
818
views
Which non premium RxDB RxStorage can be used as a database backend for GraphQL Replication on a NodeJS backend application? [closed]
I'm studying RxDB to use it in a NodeJS backend with GraphQL replication but I couldn't find any free opensource RxStorage with this specs in the documentation.
PouchDB - seems to work only with ...
2
votes
0
answers
562
views
Rxdb infinitely pulling in replicateRxCollection
I'm working with rxdb and I have pull and push handlers for the backend I have used supabase
I have setup the code for replication as follows:
replication.ts
import { RxDatabase } from "rxdb"...
1
vote
0
answers
66
views
How can I configure a plugin in RxDB?
I added the ajv validation plugin through the standard way:
import { RxDBAjvValidatePlugin } from 'rxdb/plugins/ajv-validate';
addRxPlugin(RxDBAjvValidatePlugin);
and now see the following error:
...
1
vote
0
answers
383
views
How to use RxDB with PouchDB adapter in a Nuxt 3 project?
I'm using Nuxt 3 with client side rendering and I'm having some issues making RxDB with PouchDB adapter to work.
I'm having issues getting RxDB/PouchDB to work. :/
Excerpt from nuxt.config.ts (I tried ...
0
votes
1
answer
775
views
Unable to sync RxDB with couchdb on react-native after creating collections
Why would rxdb throw this error when try to connect/sync on couch server Error Sync: TypeError: undefined is not an object (evaluating 'db.todos.syncCouchDB')
I tested the same function on my web app ...
2
votes
1
answer
714
views
How to update local data from rxdb to server database postgrasql through graphql in react
we are trying rxdb as local database and postgresql as a server database and through graphql end point we are able to push and pull data from local to server and vice-versa but how to update and ...
4
votes
0
answers
598
views
RxDB check if a local database exists
How can I find out whether the local db (indexedDB) with a given name already exists?
const db = await createRxDatabase({
name: 'heroesdb',
storage: getRxStoragePouch('idb'),
});
This approach, ...
2
votes
0
answers
314
views
Uncaught (in promise) ReferenceError: process is not defined when calling createRxDatabase in aurelia app
I am trying to use rxdb as a store for my aurelia app. I have not found a plugin that implements this aleady, so start writing my own solution. I am using aurelia-cli 2.0.3, aurelia-loader-nodejs 1.1....
3
votes
0
answers
463
views
Rxdb sync not update db
There are 3 bases (front, node, remote). Front <=> node, node <=> remote. When the front base is updated, the data goes to the remote base, but the node is not updated. In theory, the node ...
2
votes
1
answer
928
views
Is there a way to auto increment a number field in RxDB?
I've got a simple schema:
export default {
title: 'hash schema',
version: 0,
primaryKey: 'hash',
type: 'object',
keyCompression: true,
properties: {
uuid: { type: 'string' },
id: { ...
2
votes
0
answers
869
views
package.json entry points with rollup and @rollup/plugin-node-resolve
I'm looking for some help with package.json entry points (i.e. with @rollup/plugin-node-resolve, with snowpack). For a package I'm importing (indirectly via RxDB), I'm having some issues and ...
1
vote
1
answer
296
views
Why is the vanilla JS example for RxDB not working
I've followed the instructions at GitHub, but the example doesn't work.
The app shows "Starting database".
At the browser console there is this error:
Uncaught (in promise) TypeError: ...
0
votes
1
answer
396
views
WebSQL threw an error [Error: Error code 1: no such table: document-store]
We are using react-naive-sqlite-2 in our application with RxDB and started getting this error somewhat sporadically. It seems to happen after we remove the database. I was surprised to see this was a ...
4
votes
1
answer
897
views
How Do I Properly Initialize RxDB in a Vue App with global
I'm trying out RxDB for the first time in a Vue 3 app, and getting started is a bit more tricky than I expected (and it's probably my fault).
I installed RxDB with NPM in my project ("rxdb": ...
-1
votes
1
answer
224
views
How to sync revisions when calling bulkDocs on pouchdb instance in RxDB
I'm trying to bulk update some RxDB docs, since RxDB does not have a bulk update function I have to use the bulkDocs function on the built in pouchdb instance. I can successfully do this but then my ...
1
vote
0
answers
2k
views
rollup cannot find exported function using commonjs plugin even with namedExports
I'm trying to use rxdb with rollup but rxdb imports the clone module, and apparently in a way incompatible with rollup and the commonjs plugin.
I see this error when I run yarn dev:
[!] Error: '...
1
vote
0
answers
240
views
RxDb - Delete object from array with specific index
It gives me a head-ache seeing all solutions using $pull in MongoDb that RxDb inspire it's queries I started looking into docs I saw that RxDb uses modifyjs. Yee... it doesn't support $pull operator ...
0
votes
0
answers
154
views
Slow loading Nuxt/Electron Desktop App with large datasets using rxdb
When loading a page/table with more than 1000 results, it takes around six seconds for the data to load and sometimes temporarily freezes the application.
Pagination wont work because I need to get ...
3
votes
0
answers
771
views
Rxdb: Purge deleted items and old revisions by manually replicating (copying) rxdb database?
I'm looking for a way to replicate an rxdb instance locally, in the browser (local storage to local storage). I read somewhere that this is the only way to purge deleted items (can't find the link now)...
3
votes
0
answers
130
views
possible to generate RxDB schema from existing graphql schema?
Curious if this is possible, I see graphQLSchemaFromRxSchema for working in the other direction, but we already have a graphQL schema we want to use.
1
vote
0
answers
125
views
Rxdb migration is not running
I have a schema with version 0, and 4k docs with it.
Changing version to 1, have the following strategy:
autoMigrate: true,
migrationStrategies: {
1: (r: any) => {
debugger;
...
0
votes
1
answer
63
views
Doc is always null in the pullQueryBuilder
I have set up graphql sync with a collection. The first sync runs fine, the data is populated, but after that I get an error like this:
core.js:4197 ERROR Error: Uncaught (in promise): {"status&...
0
votes
1
answer
686
views
rxdb: migration of document failed final document does not match final schema
I just changed my rxdb schema version from 0 to 1 in order to add a deletedAt attribute. I added a migration strategy for going from ver 0 to 1.
Now I'm getting this error: "migration of document ...
1
vote
1
answer
189
views
Data syncing with pouchdb-based systems client-side: is there a workaround to the 'deleted' flag?
I'm planning on using rxdb + hasura/postgresql in the backend. I'm reading this rxdb page for example, which off the bat requires sync-able entities to have a deleted flag.
Q1 (main question)
Is ...
8
votes
2
answers
2k
views
RxDB - Use the existing local DB
Case
How to open an existing database?
Issue
I already create one database with RxDB.create(), and created some collections, put some documents in it
So, in another script, i want to open that ...
3
votes
1
answer
1k
views
RxDb, cannot sort on field(s) XXX when using the default index
I just discovered RxDb, which as far as I understand is running PouchDB underneath, in any case, I have defined a fairly simple schema for an entity:
let nodeSchema: RxJsonSchema<NodeDocType> = ...
4
votes
1
answer
2k
views
How to handle JWT authentication with RxDB?
I have a local RxDB database and I want to connect it with CouchDB. Everything seems to works fine except for authentication. I have no idea how to add it differently then inserting credentials in ...
1
vote
1
answer
110
views
RxDB leader-ship blocks all sockets in chrome
I used the waitForLeadership to let only one tab sync the db. And it looks like it works. But if I activate this feature and open more than 3 tabs, the next tabs won't load.
Chrome always says, ...
1
vote
1
answer
727
views
RxDB/Electron storing data in sqlite
I want to build a hybrid using Ionic/Electron to run it on Desktop,Browser and Android, after doing some research i found about RxDB which by it's definition seems to fit this kind of DB usage (https:/...
0
votes
3
answers
419
views
How to make this global variable hold its value between calls?
I'm trying to reduce the amount of times the database object is initialized in my data access file (variable database inside the file tree-rxdb.mjs). I created a global variable to hold a reference to ...
1
vote
1
answer
421
views
How to index geojson data in browser to store in indexDB (using geojson-vt)
Overview
I have a fairly interesting requirement where I need to load geojson data from a service (not a vector tile service) and then cache that data for offline use (using indexDB). So, when ...
0
votes
1
answer
156
views
Rxdb Plugin: Using the RxCollectionBase#insert method in a plugin
I am trying to create a plugin for rxdb.
I want to catch the exception raised by insert and return an hash with
{[fieldName: string] => [error:string]}
When using my new method though, I am ...
0
votes
1
answer
620
views
RxDB - can't find collection after reload
Trying to start with RxDB in my angular application. Wanted to get something simple to work:
export const LANG = {
version: 0,
title: "Language Key",
type: "object",
properties: {
key: {
...
3
votes
1
answer
3k
views
RxDB - Document update conflict (error 409)
I use RxDB and want to update the document in it.
This is how the db is created:
const _create = async function() {
const db = await RxDB.create({
name: 'myName',
adapter: process.env....