1MongoDB::UpdateResult(3U)ser Contributed Perl DocumentatiMoonngoDB::UpdateResult(3)
2
3
4
6 MongoDB::UpdateResult - MongoDB update result object
7
9 version v2.2.2
10
12 my $result = $coll->update( @parameters );
13
14 if ( $result->acknowledged ) {
15 ...
16 }
17
19 This class encapsulates the results from an update or replace
20 operations.
21
23 matched_count
24 The number of documents that matched the filter.
25
26 modified_count
27 The number of documents that were modified. Note: this is only
28 available from MongoDB version 2.6 or later. It will return "undef"
29 from earlier servers.
30
31 You can call "has_modified_count" to find out if this attribute is
32 defined or not.
33
34 upserted_id
35 The identifier of the inserted document if an upsert took place. If no
36 upsert took place, it returns "undef".
37
39 acknowledged
40 Indicates whether this write result was acknowledged. Always true for
41 this class.
42
43 assert
44 Throws an error if write errors or write concern errors occurred.
45 Otherwise, returns the invocant.
46
47 assert_no_write_error
48 Throws a MongoDB::WriteError if write errors occurred. Otherwise,
49 returns the invocant.
50
51 assert_no_write_concern_error
52 Throws a MongoDB::WriteConcernError if write concern errors occurred.
53 Otherwise, returns the invocant.
54
56 • David Golden <david@mongodb.com>
57
58 • Rassi <rassi@mongodb.com>
59
60 • Mike Friedman <friedo@friedo.com>
61
62 • Kristina Chodorow <k.chodorow@gmail.com>
63
64 • Florian Ragwitz <rafl@debian.org>
65
67 This software is Copyright (c) 2020 by MongoDB, Inc.
68
69 This is free software, licensed under:
70
71 The Apache License, Version 2.0, January 2004
72
73
74
75perl v5.36.0 2023-01-20 MongoDB::UpdateResult(3)