CursorType

public enum CursorType

The possible types of MongoCursor an operation can return.

  • The default value. A vast majority of cursors will be of this type.

    Declaration

    Swift

    case nonTailable
  • Tailable means the cursor is not closed when the last data is retrieved. Rather, the cursor marks the final object’s position. You can resume using the cursor later, from where it was located, if more data were received. Like any “latent cursor”, the cursor may become invalid at some point (CursorNotFound) – for example if the final object it references were deleted.

    Declaration

    Swift

    case tailable
  • Combines the tailable option with awaitData, as defined below.

    Use with TailableCursor. If we are at the end of the data, block for a while rather than returning no data. After a timeout period, we do return as normal. The default is true.

    Declaration

    Swift

    case tailableAwait