Closed trokster closed 7 years ago
This is a good question. Currently, the only way to do this is to make a call to all()
and get all the documents, e.g.
db.all().then(function (docs) {
// docs is an "associate array" of docs
});
There are no plans to provide a get()
function at this point.
Hello,
Is there a specific reason for not implementing the get() functionality? I am also looking for this functionality. I would simply propose to change the "all()" function to:
Code change in the all() function would be something like:
return db.allDocs({include_docs: true, startkey: docID, endkey: docID+"_\ufff0"}).then(function (doc) {
Would this be an option and if yes, shall I make a pull request with the proposed changes? Thanks in advance!
Hey @ruud12! I think this is a good idea. Please name this new function get
. I look forward to seeing the PR!
Hi,
Sorry stupid question maybe. How do you pull a given object from the DB ? Say I have an object with $id = 123, is there a method akin to get, or would I need to manually merge it from all changes ?