Class: Mongo::Operation::Commands::GetMore::Result

Inherits:
Result
  • Object
show all
Defined in:
lib/mongo/operation/commands/get_more/result.rb

Overview

Defines custom behaviour of results for the get more command.

Since:

  • 2.2.0

Constant Summary

Constants inherited from Result

Result::CURSOR, Result::CURSOR_ID, Result::FIRST_BATCH, Result::N, Result::NAMESPACE, Result::NEXT_BATCH, Result::OK, Result::RESULT

Instance Attribute Summary

Attributes inherited from Result

#replies

Instance Method Summary collapse

Methods inherited from Result

#acknowledged?, #each, #initialize, #inspect, #multiple?, #namespace, #ok?, #reply, #returned_count, #successful?, #validate!, #written_count

Constructor Details

This class inherits a constructor from Mongo::Operation::Result

Instance Method Details

#cursor_idInteger

Get the cursor id.

Examples:

Get the cursor id.

result.cursor_id

Returns:

  • (Integer)

    The cursor id.

Since:

  • 2.2.0



33
34
35
# File 'lib/mongo/operation/commands/get_more/result.rb', line 33

def cursor_id
  cursor_document ? cursor_document[CURSOR_ID] : super
end

#documentsArray<BSON::Document>

Get the documents in the result.

Examples:

Get the documents.

result.documents

Returns:

  • (Array<BSON::Document>)

    The documents.

Since:

  • 2.2.0



45
46
47
# File 'lib/mongo/operation/commands/get_more/result.rb', line 45

def documents
  cursor_document[NEXT_BATCH]
end