Skip to content

Added find to Nano#47

Closed
Panickev wants to merge 1 commit intoapache:masterfrom
Panickev:master
Closed

Added find to Nano#47
Panickev wants to merge 1 commit intoapache:masterfrom
Panickev:master

Conversation

@Panickev
Copy link

Overview

Added find to Nano. This way you can use custom queries.

Copy link
Member

@garrensmith garrensmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great start. Could you review your work against Cloudant's https://github.com/cloudant/nodejs-cloudant/blob/master/cloudant.js#L151-L169

Also could you add a test to prove this is working.

}

function findDoc(query, callback) {
return relax({ db: dbName, path: '_find', method: 'POST', body: query }, callback);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you encode the url.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

none of the other methods here do this at this point, I assume relax() does this already.

session: session,
insert: insertDoc,
get: getDoc,
find: findDoc,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you align this correctly.

@janl janl mentioned this pull request Jul 4, 2017
@janl
Copy link
Member

janl commented Jul 4, 2017

Great start, closing in favour of #50 which adds tests.

@janl janl closed this Jul 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants