• Jeremy Mikola's avatar
    PHPLIB-411: postBatchResumeToken, getResumeToken(), and resume improvements · 4c6f7ceb
    Jeremy Mikola authored
    Added ChangeStream::getResumeToken() method (PHPLIB-435), which returns the cached resume token.
    
    postBatchResumeToken and startAfter (introduced in PHPLIB-407) can now be used for resuming.
    
    Replaced TailableCursorIterator with ChangeStreamIterator. In addition to avoiding getMore commands when calling rewind(), the new class also tracks the size of each cursor batch so it can capture the postBatchResumeToken from getMore commands.
    
    Refactored the resume process such that Watch now exclusively constructs the inner iterator for ChangeStream.
    
    UnexpectedValueException is now thrown if firstBatch and nextBatch fields are not found in aggregate and getMore responses, respectively.
    4c6f7ceb
Name
Last commit
Last update
..
BSONArray.php Loading commit data...
BSONDocument.php Loading commit data...
BSONIterator.php Loading commit data...
CachingIterator.php Loading commit data...
ChangeStreamIterator.php Loading commit data...
CollectionInfo.php Loading commit data...
CollectionInfoCommandIterator.php Loading commit data...
CollectionInfoIterator.php Loading commit data...
DatabaseInfo.php Loading commit data...
DatabaseInfoIterator.php Loading commit data...
DatabaseInfoLegacyIterator.php Loading commit data...
IndexInfo.php Loading commit data...
IndexInfoIterator.php Loading commit data...
IndexInfoIteratorIterator.php Loading commit data...
IndexInput.php Loading commit data...
TypeMapArrayIterator.php Loading commit data...