Query.prototype.tailable()

Parameters
  • bool «Boolean» defaults to true

  • [opts] «Object» options to set

  • [opts.numberOfRetries] «Number» if cursor is exhausted, retry this many times before giving up

  • [opts.tailableRetryInterval] «Number» if cursor is exhausted, wait this many milliseconds before retrying

Sets the tailable option (for use with capped collections).

Example

  1. query.tailable() // true
  2. query.tailable(true)
  3. query.tailable(false)

Note

Cannot be used with distinct()