Method: Origin::Optional#hint

Defined in:
lib/origin/optional.rb

#hint(value = nil) ⇒ Optional

Add an index hint to the query options.

Examples:

Add an index hint.

optional.hint("$natural" => 1)

Parameters:

  • value (Hash) (defaults to: nil)

    The index hint.

Returns:

Since:

  • 1.0.0



71
72
73
# File 'lib/origin/optional.rb', line 71

def hint(value = nil)
  option(value) { |options| options.store(:hint, value) }
end