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
|
|
403
|
use strict; |
|
59
|
|
|
|
|
136
|
|
|
59
|
|
|
|
|
1645
|
|
16
|
59
|
|
|
59
|
|
324
|
use warnings; |
|
59
|
|
|
|
|
163
|
|
|
59
|
|
|
|
|
2056
|
|
17
|
|
|
|
|
|
|
package MongoDB::UpdateResult; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
# ABSTRACT: MongoDB update result object |
20
|
|
|
|
|
|
|
|
21
|
59
|
|
|
59
|
|
366
|
use version; |
|
59
|
|
|
|
|
162
|
|
|
59
|
|
|
|
|
332
|
|
22
|
|
|
|
|
|
|
our $VERSION = 'v2.2.1'; |
23
|
|
|
|
|
|
|
|
24
|
59
|
|
|
59
|
|
4908
|
use Moo; |
|
59
|
|
|
|
|
158
|
|
|
59
|
|
|
|
|
373
|
|
25
|
59
|
|
|
59
|
|
19257
|
use MongoDB::_Constants; |
|
59
|
|
|
|
|
182
|
|
|
59
|
|
|
|
|
7528
|
|
26
|
59
|
|
|
|
|
392
|
use MongoDB::_Types qw( |
27
|
|
|
|
|
|
|
Numish |
28
|
59
|
|
|
59
|
|
461
|
); |
|
59
|
|
|
|
|
136
|
|
29
|
59
|
|
|
|
|
445
|
use Types::Standard qw( |
30
|
|
|
|
|
|
|
Undef |
31
|
59
|
|
|
59
|
|
31429
|
); |
|
59
|
|
|
|
|
161
|
|
32
|
59
|
|
|
59
|
|
43926
|
use namespace::clean; |
|
59
|
|
|
|
|
146
|
|
|
59
|
|
|
|
|
448
|
|
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__ |