Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Cursor<T>

Creates a new Cursor instance (INTERNAL TYPE, do not instantiate directly).

see

http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html

Type parameters

  • T

Hierarchy

Index

Properties

readPreference

readPreference: ReadPreference

Get cursor ReadPreference.

sortValue

sortValue: string

Cursor query sort setting.

timeout

timeout: boolean

Is Cursor able to time out.

Methods

addCursorFlag

  • addCursorFlag(flag: string, value: boolean): Cursor<T>

addQueryModifier

  • addQueryModifier(name: string, value: boolean): Cursor<T>

batchSize

  • batchSize(value: number): Cursor<T>

clone

close

comment

  • comment(value: string): Cursor<T>

count

explain

filter

  • filter(filter: Object): Cursor<T>

forEach

hasNext

  • hasNext(): Promise<boolean>
  • hasNext(callback: MongoCallback<boolean>): void

hint

  • hint(hint: Object): Cursor<T>

isClosed

  • isClosed(): boolean

limit

  • limit(value: number): Cursor<T>

map

  • map(transform: Function): Cursor<T>

max

maxAwaitTimeMS

  • maxAwaitTimeMS(value: number): Cursor<T>

maxScan

  • maxScan(maxScan: Object): Cursor<T>

maxTimeMS

  • maxTimeMS(value: number): Cursor<T>

min

next

project

  • project(value: Object): Cursor<T>

read

  • read(size: number): string | Buffer | void

returnKey

  • returnKey(returnKey: Object): Cursor<T>

rewind

  • rewind(): void

setCursorOption

  • setCursorOption(field: string, value: Object): Cursor<T>

setReadPreference

showRecordId

  • showRecordId(showRecordId: Object): Cursor<T>

skip

  • skip(value: number): Cursor<T>

snapshot

  • snapshot(snapshot: Object): Cursor<T>

sort

  • sort(keyOrList: string | Object[] | Object, direction?: number): Cursor<T>

stream

  • stream(options?: object): Cursor<T>

toArray

  • toArray(): Promise<T[]>
  • toArray(callback: MongoCallback<T[]>): void

unshift

  • unshift(stream: Buffer | string): void

Generated using TypeDoc