• 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
.travis Loading commit data...
docs Loading commit data...
mongo-orchestration Loading commit data...
src Loading commit data...
tests Loading commit data...
.gitignore Loading commit data...
.travis.yml Loading commit data...
CONTRIBUTING.md Loading commit data...
LICENSE Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
composer.json Loading commit data...
phpunit.xml.dist Loading commit data...