You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2018/07/24 12:32:09 UTC

[GitHub] glynnbird closed pull request #100: Adding the use of the find method in README.md

glynnbird closed pull request #100: Adding the use of the find method in README.md
URL: https://github.com/apache/couchdb-nano/pull/100
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/README.md b/README.md
index 6cc9f02..8f77128 100644
--- a/README.md
+++ b/README.md
@@ -57,6 +57,7 @@ Note the minimum required version of Node.js is 6.
   - [db.fetch(docnames, [params], [callback])](#dbfetchdocnames-params-callback)
   - [db.fetchRevs(docnames, [params], [callback])](#dbfetchrevsdocnames-params-callback)
   - [db.createIndex(indexDef, [callback])](#dbcreateindexindexdef-callback)
+  - [db.find(mango, [callback])](#dbfindmango-callback)
 - [Multipart functions](#multipart-functions)
   - [db.multipart.insert(doc, attachments, [params], [callback])](#dbmultipartinsertdoc-attachments-params-callback)
   - [db.multipart.get(docname, [params], [callback])](#dbmultipartgetdocname-params-callback)
@@ -634,6 +635,24 @@ alice.createIndex(indexDef, function(err, result) {
 });
 ```
 
+### db.find(mango, [callback])
+
+Search docs using mango query, as specified in
+[CouchDB doc](http://docs.couchdb.org/en/2.1.1/api/database/find.html).
+
+```js
+var mango = {
+  selector: {
+    name: "test"
+  },
+  fields: ["name"],
+  limit: 10
+};
+alice.find(mango, function(err, result) {
+  console.log(result);
+});
+```
+
 ## Multipart functions
 
 ### db.multipart.insert(doc, attachments, params, [callback])


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services