File tree Expand file tree Collapse file tree 1 file changed +5
-15
lines changed Expand file tree Collapse file tree 1 file changed +5
-15
lines changed Original file line number Diff line number Diff line change @@ -329,21 +329,6 @@ public function execute(Server $server)
329
329
* @return array
330
330
*/
331
331
public function getCommandDocument ()
332
- {
333
- $ cmd = $ this ->createCommandDocument ();
334
-
335
- // Read concern can change the query plan
336
- if (isset ($ this ->options ['readConcern ' ])) {
337
- $ cmd ['readConcern ' ] = $ this ->options ['readConcern ' ];
338
- }
339
-
340
- return $ cmd ;
341
- }
342
-
343
- /**
344
- * Construct a command document for Find
345
- */
346
- private function createCommandDocument (): array
347
332
{
348
333
$ cmd = ['find ' => $ this ->collectionName , 'filter ' => (object ) $ this ->filter ];
349
334
@@ -353,6 +338,11 @@ private function createCommandDocument(): array
353
338
return $ cmd ;
354
339
}
355
340
341
+ // Read concern can change the query plan
342
+ if (isset ($ this ->options ['readConcern ' ])) {
343
+ $ cmd ['readConcern ' ] = $ this ->options ['readConcern ' ];
344
+ }
345
+
356
346
// maxAwaitTimeMS is a Query level option so should not be considered here
357
347
unset($ options ['maxAwaitTimeMS ' ]);
358
348
You can’t perform that action at this time.
0 commit comments