Method: Mongo::Cursor#query_opts

Defined in:
lib/mongo/cursor.rb

#query_optsInteger

Returns an integer indicating which query options have been selected.

The MongoDB wire protocol.



297
298
299
300
301
302
303
# File 'lib/mongo/cursor.rb', line 297

def query_opts
  opts     = 0
  opts    |= Mongo::Constants::OP_QUERY_NO_CURSOR_TIMEOUT unless @timeout
  opts    |= Mongo::Constants::OP_QUERY_SLAVE_OK if @connection.slave_ok?
  opts    |= Mongo::Constants::OP_QUERY_TAILABLE if @tailable
  opts
end