模块:Mongo::Operation::Find::Builder::Flags Private
- 定义于:
- lib/ Mongo/operation/find/builder/flags.rb
Overview
该模块是私有 API 的一部分。 您应尽可能避免使用此模块,因为它将来可能会被删除或更改。
提供在发送Ruby和相关命令(例如 解释)。
常量摘要折叠
- MAPPINGS =
此常量是私有 API 的一部分。 应尽可能避免使用此常量,因为它将来可能会被删除或更改。
游标标志映射的选项。
{ allow_partial_results: [ :partial ], oplog_replay: [ :oplog_replay ], no_cursor_timeout: [ :no_cursor_timeout ], tailable: [ :tailable_cursor ], tailable_await: %i[await_data tailable_cursor], await_data: [ :await_data ], 排气: [ :exhaust ], }.冻结
类方法摘要折叠
-
。 map_flags (options) ⇒ Array<Symbol>
private
将Ruby查找选项转换为标志大量。
类方法详细信息
.map_flags(options) ⇒ Array<Symbol>
此方法是私有 API 的一部分。 您应尽可能避免使用此方法,因为它将来可能会被删除或更改。
将Ruby查找选项转换为标志大量。
输入哈希中不是映射到标志的选项的任何键都将被忽略。
45 46 47 48 49 50 |
# File 'lib/ Mongo/operation/find/builder/flags.rb', line 45 module_function def map_flags() mappings.每.each_with_object([:flags] || []) do |(key, 值), flags| cursor_type = [:cursor_type] flags.推动(*值) if [key] || (cursor_type && cursor_type == key) end end |