模块:Mongo::Operation::OpMsgExecutable Private
- 包括:
- 多态查找
- 包含在:
- Aggregate、CollectionsInfo、Command、Count、Create、CreateIndex、CreateSearchIndexes、CreateUser、Distinct、Drop、DropDatabase、DropIndex、DropSearchIndex、Explain、Find、GetMore、Indexes、KillCursors、ListCollections、MapReduce、ParallelScan、RemoveUser、UpdateSearchIndex、UpdateUser、UsersInfo、 WriteCommand
- 定义于:
- lib/ Mongo/operation/shared/op_msg_executable.rb
Overview
该模块是私有 API 的一部分。 您应尽可能避免使用此模块,因为它将来可能会被删除或更改。
将操作作为 OpMsg 执行的共享行为。
实例方法摘要折叠
-
#execute (服务器, context:, options: {}) ⇒ Mongo::Operation::Result
private
执行操作。
-
#execute_with_connection (connection, context:, options: {}) ⇒ Mongo::Operation::Result
private
执行操作。
实例方法详细信息
#execute (server, context:, options: {}) ⇒ Mongo::Operation::Result
此方法是私有 API 的一部分。 您应尽可能避免使用此方法,因为它将来可能会被删除或更改。
执行操作。
34 35 36 37 38 39 40 41 |
# File 'lib/ Mongo/operation/shared/op_msg_executable.rb', line 34 def 执行(server, 上下文:, 选项: {}) server.with_connection( connection_global_id: 上下文.connection_global_id, 上下文: 上下文 ) do |连接| execute_with_connection(连接, 上下文: 上下文, 选项: ) end end |
#execute_with_connection (connection, context:, options: {}) ⇒ Mongo::Operation::Result
此方法是私有 API 的一部分。 您应尽可能避免使用此方法,因为它将来可能会被删除或更改。
执行操作。
51 52 53 |
# File 'lib/ Mongo/operation/shared/op_msg_executable.rb', line 51 def execute_with_connection(连接, 上下文:, 选项: {}) final_operation.执行(连接, 上下文: 上下文, 选项: ) end |