Module: Mongo::Operation::Limited

Included in:
Commands::Command, Write::Command::Writable
Defined in:
lib/mongo/operation/limited.rb

Overview

Adds behaviour for commands so ensure the limit option is always -1.

Since:

  • 2.0.0

Instance Method Summary collapse

Instance Method Details

#optionsHash

Limited operations are commands that always require a limit of -1. In these cases we always overwrite the limit value.

Examples:

Get the options.

limited.options

Returns:

  • (Hash)

    The options with a -1 limit.

Since:

  • 2.0.0



32
33
34
# File 'lib/mongo/operation/limited.rb', line 32

def options
  super.merge(:limit => -1)
end