类:Mongo::Operation::ParallelScan::Result
- 继承:
-
操作::结果
- 对象
- 操作::结果
- Mongo::Operation::ParallelScan::Result
- 定义于:
- lib/ Mongo/operation/parallel_scan/result.rb
Overview
定义并行扫描中结果的自定义行为。
常量摘要折叠
- CURSORS =
此常量是私有 API 的一部分。 应尽可能避免使用此常量,因为它将来可能会被删除或更改。
结果中游标字段的名称。
'cursors'
实例方法摘要折叠
-
#cursor_ids ⇒ Array<Integer>
private
从结果中获取所有游标 ID。
-
# 个documents ⇒ Array<BSON::Document>
从并行扫描中获取文档。
实例方法详细信息
# cursor_id = "Array<Integer>"
此方法是私有 API 的一部分。 您应尽可能避免使用此方法,因为它将来可能会被删除或更改。
从结果中获取所有游标 ID。
40 41 42 |
# File 'lib/ Mongo/operation/parallel_scan/result.rb', line 40 def cursor_id 文档.map { |doc| doc[游标][CURSOR_ID] } end |
# 个documents ⇒ Array<BSON::Document>
从并行扫描中获取文档。
53 54 55 |
# File 'lib/ Mongo/operation/parallel_scan/result.rb', line 53 def 文档 回复.文档[0][游标] end |