-
-
Notifications
You must be signed in to change notification settings - Fork 191
Specify time limit operation on a mongodb cursor #227
Changes from 2 commits
5a26415
8d463f3
f6494a3
3821ae6
d40ee0e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -253,4 +253,13 @@ public function tailable($tail = true); | |
* @return self | ||
*/ | ||
public function timeout($ms); | ||
|
||
/** | ||
* Wrapper method for MongoCursor::maxTimeMS(). | ||
* | ||
* @see http://php.net/manual/en/mongocursor.maxtimems.php | ||
* @param integer $ms | ||
* @return self | ||
*/ | ||
public function maxTimeMS($ms); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Technically speaking, yes. This is a BC break and thus would force us to go 2.0. I'm kicking myself now for not catching all methods that were added in the 1.5 driver. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ne0h12: Unfortunately, this needs to be removed. We cannot add new interface methods without bumping a major version. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, I removed it |
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ne0h12: The most compatible solution would be to call
MongoCursor::addOption('$maxTimeMS', $ms)
here, as it doesn't depend on the driver's method at all.