In RxDB, to list all documents in a collection on a remote db that has documents, I've tried:
myCollection.dump()
.then(json => console.dir(json));
and
myCollection.find().exec() // <- find all documents
.then(documents => console.dir(documents));
from the documentation: https://rxdb.info/rx-collection.html#dump https://rxdb.info/rx-document.html#find
but both do a _find
post with body:
{"selector":{"_id":{}}}
that return an empty docs [] array. That same _find
selector executed outside of RxDB also returns an empty docs array.
If I add documents to the collection with myCollection.upsert()
, the doc is added to the remote server and then appears as a response in the two above calls. But maybe only from what's stored in memory, as there's still this remote _find
POST with an empty docs: []
response. So on a page refresh those list calls are empty again.
I'm using:
"pouchdb-adapter-http": "7.0.0",
"rxdb": "8.0.4",
"rxjs": "6.3.3"