MongoDB::ChangeStream - A stream providing update information for collections.
version v2.0.2
$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.
maxAwaitTimeMS
The Change Streams manual section.
The Change Streams specification.
David Golden <david@mongodb.com>
Rassi <rassi@mongodb.com>
Mike Friedman <friedo@friedo.com>
Kristina Chodorow <k.chodorow@gmail.com>
Florian Ragwitz <rafl@debian.org>
This software is Copyright (c) 2018 by MongoDB, Inc.
This is free software, licensed under:
The Apache License, Version 2.0, January 2004
To install MongoDB, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MongoDB
CPAN shell
perl -MCPAN -e shell install MongoDB
For more information on module installation, please visit the detailed CPAN module installation guide.