glynnbird commented on a change in pull request #246:
URL: https://github.com/apache/couchdb-nano/pull/246#discussion_r552475684
##########
File path: README.md
##########
@@ -623,7 +625,9 @@ alice.list({include_docs: true}).then((body) => {
List all the docs in the database as a stream.
```js
-alice.list().pipe(process.stdout)
+alice.list()
Review comment:
this should be `alice.listAsStream()` - an error in the original.
##########
File path: README.md
##########
@@ -355,7 +355,9 @@ nano.db.list().then((body) => {
Lists all the CouchDB databases as a stream:
```js
-nano.db.list().pipe(process.stdout);
+nano.db.list()
Review comment:
I think this should be `nano.db.listAsStream()`. An error in the
original, not in your PR.
##########
File path: README.md
##########
@@ -1100,7 +1116,9 @@ alice.view('characters', 'happy_ones', { include_docs:
true }).then((body) => {
Same as `db.view` but returns a stream:
```js
-alice.view('characters', 'happy_ones', {reduce: false}).pipe(process.stdout);
+alice.view('characters', 'happy_ones', {reduce: false})
Review comment:
This should be `alice.viewAsStream(...` - error in the original
##########
File path: lib/nano.js
##########
@@ -189,6 +189,33 @@ module.exports = exports = function dbScope (cfg) {
}
}
+ const streamResponseHandler = function (response, req, stream) {
Review comment:
really like this 👍
##########
File path: README.md
##########
@@ -953,7 +965,9 @@ const params = {
endkey: 'b',
limit: 1
}
-db.partitionedView('canidae', 'view-ddoc', 'view-name',
params).pipe(process.stdout)
+db.partitionedView('canidae', 'view-ddoc', 'view-name', params)
Review comment:
This should be `db.partitionedViewAsStream(...` - an. error in the
original
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]