1MongoDB::ChangeStream(3U)ser Contributed Perl DocumentatiMoonngoDB::ChangeStream(3)
2
3
4

NAME

6       MongoDB::ChangeStream - A stream providing update information for
7       collections.
8

VERSION

10       version v2.0.3
11

SYNOPSIS

13           $stream = $collection->watch( $pipeline, $options );
14           while(1) {
15
16               # This inner loop will only iterate until there are no more
17               # changes available.
18               while (my $change = $stream->next) {
19                   ...
20               }
21           }
22

DESCRIPTION

24       This class models change stream results as returned by the "watch" in
25       MongoDB::Collection method.
26

STREAM METHODS

28   next
29           $change_stream = $collection->watch(...);
30           $change = $change_stream->next;
31
32       Waits for the next change in the collection and returns it.
33
34       Note: This method will wait for the amount of milliseconds passed as
35       "maxAwaitTimeMS" to "watch" in MongoDB::Collection or the server's
36       default wait-time. It will not wait indefinitely.
37

SEE ALSO

39       The Change Streams manual section
40       <https://docs.mongodb.com/manual/changeStreams/>.
41
42       The Change Streams specification
43       <https://github.com/mongodb/specifications/blob/master/source/change-
44       streams.rst>.
45

AUTHORS

47       ·   David Golden <david@mongodb.com>
48
49       ·   Rassi <rassi@mongodb.com>
50
51       ·   Mike Friedman <friedo@friedo.com>
52
53       ·   Kristina Chodorow <k.chodorow@gmail.com>
54
55       ·   Florian Ragwitz <rafl@debian.org>
56
58       This software is Copyright (c) 2019 by MongoDB, Inc.
59
60       This is free software, licensed under:
61
62         The Apache License, Version 2.0, January 2004
63
64
65
66perl v5.28.1                      2019-02-07          MongoDB::ChangeStream(3)
Impressum