ReadStream()

Constructor

ReadStream

class ReadStream()
Arguments:
  • autoclose (boolean) – automatically close file when the stream reaches the end.
  • cursor (gridstore) – a cursor object that the stream wraps.
Returns:

readstream

Returns a stream interface for the file.

Events
  • data {function(item) {}} the data event triggers when a document is ready.
  • end {function() {}} the end event triggers when there is no more documents available.
  • close {function() {}} the close event triggers when the stream is closed.
  • error {function(err) {}} the error event triggers if an error happens.

Contents

Manual

MongoDB Wiki