Method: Moped::ReadPreference::Selectable#query_options

Defined in:
lib/moped/read_preference/selectable.rb

#query_options(options) ⇒ Hash

Get the provided options as query options for this read preference.

Examples:

Get the query options.

preference.query_options({})

Since:

  • 2.0.0



37
38
39
40
41
# File 'lib/moped/read_preference/selectable.rb', line 37

def query_options(options)
  options[:flags] ||= []
  options[:flags] |= [ :slave_ok ]
  options
end