Method: Mongo::Cursor#id

Defined in:
lib/mongo/cursor.rb

#idInteger

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Note:

A cursor id of 0 means the cursor was closed on the server.

Get the cursor id.

Examples:

Get the cursor id.

cursor.id

Returns:

  • (Integer)

    The cursor id.

Since:

  • 2.2.0



368
369
370
# File 'lib/mongo/cursor.rb', line 368

def id
  @cursor_id
end