MongoDB::ChangeStream(3pm) | User Contributed Perl Documentation | MongoDB::ChangeStream(3pm) |
MongoDB::ChangeStream - A stream providing update information for collections.
version v2.0.3
$stream = $collection->watch( $pipeline, $options ); while(1) { # This inner loop will only iterate until there are no more # changes available. while (my $change = $stream->next) { ... } }
This class models change stream results as returned by the "watch" in MongoDB::Collection method.
$change_stream = $collection->watch(...); $change = $change_stream->next;
Waits for the next change in the collection and returns it.
Note: This method will wait for the amount of milliseconds passed as "maxAwaitTimeMS" to "watch" in MongoDB::Collection or the server's default wait-time. It will not wait indefinitely.
The Change Streams manual section <https://docs.mongodb.com/manual/changeStreams/>.
The Change Streams specification <https://github.com/mongodb/specifications/blob/master/source/change-streams.rst>.
This software is Copyright (c) 2019 by MongoDB, Inc.
This is free software, licensed under:
The Apache License, Version 2.0, January 2004
2019-02-09 | perl v5.28.1 |