| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
# Copyright 2014 - present MongoDB, Inc. |
|
2
|
|
|
|
|
|
|
# |
|
3
|
|
|
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); |
|
4
|
|
|
|
|
|
|
# you may not use this file except in compliance with the License. |
|
5
|
|
|
|
|
|
|
# You may obtain a copy of the License at |
|
6
|
|
|
|
|
|
|
# |
|
7
|
|
|
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0 |
|
8
|
|
|
|
|
|
|
# |
|
9
|
|
|
|
|
|
|
# Unless required by applicable law or agreed to in writing, software |
|
10
|
|
|
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS, |
|
11
|
|
|
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
12
|
|
|
|
|
|
|
# See the License for the specific language governing permissions and |
|
13
|
|
|
|
|
|
|
# limitations under the License. |
|
14
|
|
|
|
|
|
|
|
|
15
|
59
|
|
|
59
|
|
352
|
use strict; |
|
|
59
|
|
|
|
|
113
|
|
|
|
59
|
|
|
|
|
1484
|
|
|
16
|
59
|
|
|
59
|
|
269
|
use warnings; |
|
|
59
|
|
|
|
|
126
|
|
|
|
59
|
|
|
|
|
1851
|
|
|
17
|
|
|
|
|
|
|
package MongoDB::UpdateResult; |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
# ABSTRACT: MongoDB update result object |
|
20
|
|
|
|
|
|
|
|
|
21
|
59
|
|
|
59
|
|
338
|
use version; |
|
|
59
|
|
|
|
|
129
|
|
|
|
59
|
|
|
|
|
321
|
|
|
22
|
|
|
|
|
|
|
our $VERSION = 'v2.2.2'; |
|
23
|
|
|
|
|
|
|
|
|
24
|
59
|
|
|
59
|
|
4232
|
use Moo; |
|
|
59
|
|
|
|
|
126
|
|
|
|
59
|
|
|
|
|
320
|
|
|
25
|
59
|
|
|
59
|
|
15968
|
use MongoDB::_Constants; |
|
|
59
|
|
|
|
|
163
|
|
|
|
59
|
|
|
|
|
6755
|
|
|
26
|
59
|
|
|
|
|
398
|
use MongoDB::_Types qw( |
|
27
|
|
|
|
|
|
|
Numish |
|
28
|
59
|
|
|
59
|
|
385
|
); |
|
|
59
|
|
|
|
|
126
|
|
|
29
|
59
|
|
|
|
|
421
|
use Types::Standard qw( |
|
30
|
|
|
|
|
|
|
Undef |
|
31
|
59
|
|
|
59
|
|
28448
|
); |
|
|
59
|
|
|
|
|
122
|
|
|
32
|
59
|
|
|
59
|
|
45277
|
use namespace::clean; |
|
|
59
|
|
|
|
|
127
|
|
|
|
59
|
|
|
|
|
357
|
|
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
with $_ for qw( |
|
35
|
|
|
|
|
|
|
MongoDB::Role::_PrivateConstructor |
|
36
|
|
|
|
|
|
|
MongoDB::Role::_WriteResult |
|
37
|
|
|
|
|
|
|
); |
|
38
|
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
#pod =attr matched_count |
|
40
|
|
|
|
|
|
|
#pod |
|
41
|
|
|
|
|
|
|
#pod The number of documents that matched the filter. |
|
42
|
|
|
|
|
|
|
#pod |
|
43
|
|
|
|
|
|
|
#pod =cut |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
has matched_count => ( |
|
46
|
|
|
|
|
|
|
is => 'ro', |
|
47
|
|
|
|
|
|
|
required => 1, |
|
48
|
|
|
|
|
|
|
isa => Numish, |
|
49
|
|
|
|
|
|
|
); |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
#pod =attr modified_count |
|
52
|
|
|
|
|
|
|
#pod |
|
53
|
|
|
|
|
|
|
#pod The number of documents that were modified. Note: this is only available |
|
54
|
|
|
|
|
|
|
#pod from MongoDB version 2.6 or later. It will return C from earlier |
|
55
|
|
|
|
|
|
|
#pod servers. |
|
56
|
|
|
|
|
|
|
#pod |
|
57
|
|
|
|
|
|
|
#pod You can call C to find out if this attribute is |
|
58
|
|
|
|
|
|
|
#pod defined or not. |
|
59
|
|
|
|
|
|
|
#pod |
|
60
|
|
|
|
|
|
|
#pod =cut |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
has modified_count => ( |
|
63
|
|
|
|
|
|
|
is => 'ro', |
|
64
|
|
|
|
|
|
|
required => 1, |
|
65
|
|
|
|
|
|
|
isa => (Numish|Undef), |
|
66
|
|
|
|
|
|
|
); |
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
sub has_modified_count { |
|
69
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
|
70
|
0
|
|
|
|
|
|
return defined( $self->modified_count ); |
|
71
|
|
|
|
|
|
|
} |
|
72
|
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
#pod =attr upserted_id |
|
74
|
|
|
|
|
|
|
#pod |
|
75
|
|
|
|
|
|
|
#pod The identifier of the inserted document if an upsert took place. If |
|
76
|
|
|
|
|
|
|
#pod no upsert took place, it returns C. |
|
77
|
|
|
|
|
|
|
#pod |
|
78
|
|
|
|
|
|
|
#pod =cut |
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
has upserted_id => ( |
|
81
|
|
|
|
|
|
|
is => 'ro', |
|
82
|
|
|
|
|
|
|
); |
|
83
|
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
1; |
|
85
|
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
__END__ |