Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

hexnickk
Copy link

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;

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
Contributor

Choose a reason for hiding this comment

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

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

if (self.selector) {
req.body.selector = self.selector
}
if (self.fields) {
Copy link
Contributor

Choose a reason for hiding this comment

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

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

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.