Skip to content

Commit f8f6585

Browse files
committed
PHPLIB-539: support hint in findAndDelete operations
1 parent b72b6c0 commit f8f6585

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/Operation/FindAndModify.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,7 @@ class FindAndModify implements Executable, Explainable
9999
* name as a string or the index key pattern as a document. If specified,
100100
* then the query system will only consider plans using the hinted index.
101101
*
102-
* This is only supported for update and replace operations (i.e. remove
103-
* option is false) on server versions >= 4.4. Using this option in
102+
* This is only supported on server versions >= 4.4. Using this option in
104103
* other contexts will result in an exception at execution time.
105104
*
106105
* * maxTimeMS (integer): The maximum amount of time to allow the query to

src/Operation/FindOneAndDelete.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,13 @@ class FindOneAndDelete implements Executable, Explainable
4646
* This is not supported for server versions < 3.4 and will result in an
4747
* exception at execution time if used.
4848
*
49+
* * hint (string|document): The index to use. Specify either the index
50+
* name as a string or the index key pattern as a document. If specified,
51+
* then the query system will only consider plans using the hinted index.
52+
*
53+
* This is not supported for server versions < 4.4 and will result in an
54+
* exception at execution time if used.
55+
*
4956
* * maxTimeMS (integer): The maximum amount of time to allow the query to
5057
* run.
5158
*

0 commit comments

Comments
 (0)