FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

changesreader /added fields & body support by hexnickk · Pull Request #266 · apache/couchdb-nano · GitHub

changesreader /added fields & body support - #266

Open
hexnickk wants to merge 2 commits into
apache:mainfrom
hexnickk:fix/changesreader-fields
Open

hexnickk wants to merge 2 commits into
apache:mainfrom
hexnickk:fix/changesreader-fields

Conversation

Copy link
Copy Markdown

Overview

This PR is addressing issue #263

In simple words, it is adding support for fields and body params for changesreader.

Testing recommendations

You can run this code against any running CouchDB database e.g. https://registry.npmjs.org/

db.changesReader
  .start({ fields })
  .on('changes', console.log);

GitHub issue number

#263

Checklist

  • Code is written and works correctly;
  • Changes are covered by tests;
  • Documentation reflects the changes;

Comment thread lib/nano.d.ts
body?: object;
/** a MangoSelector defining the slice of the changes feed to return */
selector?: MangoSelector;
/** a MangoSelector defining changes feed fields to return */

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

A small error: this isn't a MangoSelector, it's an array. :)

Comment thread lib/changesreader.js
if (self.selector) {
req.body.selector = self.selector
}
if (self.fields) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I don't see anything in the CouchDB docs saying that a fields array can be supplied. Am I missing something?

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

2 participants


Back | FazBrowse Home | New Git URL