Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changesreader /added fields & body support #266

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kozlovzxc
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;

/** 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.

None yet

2 participants