| Class | Mongo::Operation::ListCollections::Result |
| In: |
lib/mongo/operation/list_collections/result.rb
|
| Parent: | Operation::Result |
Defines custom behavior of results when using the listCollections command.
@since 2.0.0
Get the cursor id for the result.
@example Get the cursor id.
result.cursor_id
@note Even though the wire protocol has a cursor_id field for all
messages of type reply, it is always zero when using the listCollections command and must be retrieved from the cursor document itself.
@return [ Integer ] The cursor id.
@since 2.0.0
Validate the result. In the case where an unauthorized client tries to run the command we need to generate the proper error.
@example Validate the result.
result.validate!
@return [ Result ] Self if successful.
@since 2.0.0