Class

io.scalajs.npm.mongodb.Cursor

CursorExtensions

Related Doc: package Cursor

Permalink

implicit final class CursorExtensions extends AnyVal

Cursor Extensions

Linear Supertypes
AnyVal, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CursorExtensions
  2. AnyVal
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new CursorExtensions(cursor: Cursor)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def batchSizeFuture(batchSize: Int): Future[Cursor]

    Permalink

    Sets the batch size parameter of this cursor to the given value.

    Sets the batch size parameter of this cursor to the given value.

    batchSize

    the new batch size.

    Annotations
    @inline()
  6. def closeFuture(): Future[Cursor]

    Permalink

    Close the cursor.

    Close the cursor.

    Annotations
    @inline()
  7. def countFuture(applySkipLimit: Boolean): Future[Cursor]

    Permalink

    Determines how many result the query for this cursor will return

    Determines how many result the query for this cursor will return

    applySkipLimit

    if set to true will apply the skip and limits set on the cursor. Defaults to false.

    Annotations
    @inline()
  8. val cursor: Cursor

    Permalink
  9. def eachFuture[T <: Any]: Future[UndefOr[T]]

    Permalink

    Iterates over all the documents for this cursor.

    Iterates over all the documents for this cursor. As with {cursor.toArray}, not all of the elements will be iterated if this cursor had been previouly accessed. In that case, {cursor.rewind} can be used to reset the cursor. However, unlike {cursor.toArray}, the cursor will only hold a maximum of batch size elements at any given time if batch size is specified. Otherwise, the caller is responsible for making sure that the entire result can fit the memory.

    Annotations
    @inline()
  10. def explainFuture[T <: Any]: Future[T]

    Permalink

    Gets a detailed information about how the query is performed on this cursor and how long it took the database to process it.

    Gets a detailed information about how the query is performed on this cursor and how long it took the database to process it.

    Annotations
    @inline()
  11. def getClass(): Class[_ <: AnyVal]

    Permalink
    Definition Classes
    AnyVal → Any
  12. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  13. def limitFuture(limit: Int): Future[Cursor]

    Permalink

    Sets the limit parameter of this cursor to the given value.

    Sets the limit parameter of this cursor to the given value.

    limit

    the new limit.

    Annotations
    @inline()
  14. def maxTimeMSFuture(maxTimeMS: Int): Future[Cursor]

    Permalink

    Specifies a time limit for a query operation.

    Specifies a time limit for a query operation. After the specified time is exceeded, the operation will be aborted and an error will be returned to the client. If maxTimeMS is null, no limit is applied.

    maxTimeMS

    the maxTimeMS for the query.

    Annotations
    @inline()
  15. def nextFuture[T <: Any]: Future[UndefOr[T]]

    Permalink

    Gets the next document from the cursor.

    Gets the next document from the cursor.

    Annotations
    @inline()
  16. def onOnce(callback: Function): cursor.type

    Permalink
    Annotations
    @inline()
  17. def setReadPreferenceFuture(pref: String): Future[Cursor]

    Permalink

    Sets the read preference for the cursor

    Sets the read preference for the cursor

    pref

    read preference for the cursor, one of Server.READ_PRIMARY, Server.READ_SECONDARY, Server.READ_SECONDARY_ONLY

    Annotations
    @inline()
  18. def skipFuture(skip: Int): Future[Cursor]

    Permalink

    Sets the skip parameter of this cursor to the given value.

    Sets the skip parameter of this cursor to the given value.

    skip

    the new skip value.

    Annotations
    @inline()
  19. def sortFuture(key: String, direction: |[Int, String]): Future[Cursor]

    Permalink

    Sets the sort parameter of this cursor to the given value.

    Sets the sort parameter of this cursor to the given value.

    key

    this can be a string or an array. If passed as a string, the string will be the field to sort. If passed an array, each element will represent a field to be sorted and should be an array that contains the format [string, direction].

    direction

    this determines how the results are sorted. "asc", "ascending" or 1 for ascending order while "desc", "descending or -1 for descending order. Note that the strings are case insensitive.

    Annotations
    @inline()
  20. def sortFuture(list: Array[Any]): Future[Cursor]

    Permalink

    Sets the sort parameter of this cursor to the given value.

    Sets the sort parameter of this cursor to the given value.

    list

    this can be a string or an array. If passed as a string, the string will be the field to sort. If passed an array, each element will represent a field to be sorted and should be an array that contains the format [string, direction].

    Annotations
    @inline()
  21. def toArrayFuture[T <: Any]: Future[Array[T]]

    Permalink

    Returns an array of documents.

    Returns an array of documents. The caller is responsible for making sure that there is enough memory to store the results. Note that the array only contain partial results when this cursor had been previouly accessed. In that case, cursor.rewind() can be used to reset the cursor.

    Annotations
    @inline()
  22. def toString(): String

    Permalink
    Definition Classes
    Any

Inherited from AnyVal

Inherited from Any

Ungrouped