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 database to execute some queries, but I don't know how to do it.
I tried to use RxDB.create() with same database name, but it create new database and override the created database above.
Code sample
const database = await createRxDatabase({
name: path.join(app.getPath('userData') + '/db'),
adapter: leveldown, // the full leveldown-module
multiInstance: false,
});
I just don't see appropriate way to check if .ldb file exists and how to get reference to rxdb database object without creating a new one.
Info
Environment: Electron
Adapter: LevelDB
Stack: React
Packages: "rxdb": "9.5.0", "leveldown": "5.6.0", "pouchdb-adapter-leveldb": "7.2.2"