-
-
13 Aug 2020 15:12:18 UTC
- Distribution: MongoDB
- Module version: v2.2.2
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues (1)
- Testers
- Kwalitee
Bus factor: 1- 44.88% Coverage
- License: apache_2_0
- Perl: v5.10.1
- Activity
24 month- Tools
- Download (567.81KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
and 74 contributors-
David Golden
-
Rassi
-
Mike Friedman
-
Kristina Chodorow
-
Florian Ragwitz
-
Andrew Page
-
Andrey Khozov
-
Ashley Willis
-
Ask Bjørn Hansen
-
Bernard Gorman
-
Brendan W. McAdams
-
Brian Moss
-
Casey Rojas
-
Christian Hansen
-
Christian Sturm
-
Christian Walde
-
Colin Cyr
-
Danny Raetzsch
-
David Morrison
-
David Nadle
-
David Steinbrunner
-
David Storch
-
diegok
-
D. Ilmari Mannsåker
-
Eric Daniels
-
Finn Kempers (Shadowcat Systems Ltd)
-
Gerard Goossen
-
Glenn Fowler
-
Graham Barr
-
Hao Wu
-
Harish Upadhyayula
-
Jason Carey
-
Jason Toffaletti
-
Johann Rolschewski
-
John A. Kunze
-
Joseph Harnish
-
Josh Matthews
-
Joshua Juran
-
J. Stewart
-
Kamil Slowikowski
-
Ken Williams
-
Matthew Shopsin
-
Matt S Trout
-
Michael Langner
-
Michael Rotmanov
-
Mike Dirolf
-
Mohammad S Anwar
-
Nickola Trupcheff
-
Nigel Gregoire
-
Niko Tyni
-
Nuno Carvalho
-
Orlando Vazquez
-
Othello Maurer
-
Pan Fan
-
Pavel Denisov
-
Rahul Dhodapkar
-
Robert Sedlacek (Shadowcat Systems Ltd)
-
Robin Lee
-
Roman Yerin
-
Ronald J Kimball
-
Ryan Chipman
-
Slaven Rezic
-
Stephen Oberholtzer
-
Steve Sanbeg
-
Stuart Watt
-
Thomas Bloor (Shadowcat Systems Ltd)
-
Tobias Leich
-
Uwe Voelker
-
Wallace Reis
-
Wan Bachtiar
-
Whitney Jackson
-
Xavier Guimard
-
Xtreak
-
Zhihong Zhang
- Dependencies
- Authen::SASL::SASLprep
- Authen::SCRAM::Client
- BSON
- BSON::Bytes
- BSON::Code
- BSON::DBRef
- BSON::OID
- BSON::Raw
- BSON::Regex
- BSON::Time
- BSON::Timestamp
- BSON::Types
- Carp
- Compress::Zlib
- Digest::MD5
- Encode
- Exporter
- IO::Socket
- List::Util
- MIME::Base64
- Math::BigInt
- Moo
- Moo::Role
- Net::DNS
- Safe::Isa
- Scalar::Util
- Socket
- Sub::Defer
- Sub::Quote
- Tie::IxHash
- Time::HiRes
- Type::Library
- Type::Utils
- Types::Standard
- UUID::URandom
- boolean
- bytes
- constant
- if
- namespace::clean
- overload
- re
- strict
- version
- warnings
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
MongoDB::BulkWriteResult - MongoDB bulk write result document
VERSION
version v2.2.2
SYNOPSIS
# returned directly my $result = $bulk->execute; # from a WriteError or WriteConcernError my $result = $error->result; if ( $result->acknowledged ) { ... }
DESCRIPTION
This class encapsulates the results from a bulk write operation. It may be returned directly from
execute
or it may be in theresult
attribute of aMongoDB::DatabaseError
subclass likeMongoDB::WriteError
orMongoDB::WriteConcernError
.ATTRIBUTES
inserted_count
Number of documents inserted
upserted_count
Number of documents upserted
matched_count
Number of documents matched for an update or replace operation.
deleted_count
Number of documents removed
modified_count
Number of documents actually modified by an update operation. This is not necessarily the same as "matched_count" if the document was not actually modified as a result of the update.
This field is not available from legacy servers before version 2.6. If results are seen from a legacy server (or from a mongos proxying for a legacy server) this attribute will be
undef
.You can call
has_modified_count
to find out if this attribute is defined or not.upserted
An array reference containing information about upserted documents (if any). Each document will have the following fields:
index — 0-based index indicating which operation failed
_id — the object ID of the upserted document
upserted_ids
A hash reference built lazily from
upserted
mapping indexes to object IDs.inserted
An array reference containing information about inserted documents (if any). Documents are just as in
upserted
.inserted_ids
A hash reference built lazily from
inserted
mapping indexes to object IDs.write_errors
An array reference containing write errors (if any). Each error document will have the following fields:
index — 0-based index indicating which operation failed
code — numeric error code
errmsg — textual error string
op — a representation of the actual operation sent to the server
write_concern_errors
An array reference containing write concern errors (if any). Each error document will have the following fields:
index — 0-based index indicating which operation failed
code — numeric error code
op_count
The number of operations sent to the database.
batch_count
The number of database commands issued to the server. This will be less than the
op_count
if multiple operations were grouped together.METHODS
assert
Throws an error if write errors or write concern errors occurred.
assert_no_write_error
Throws a MongoDB::WriteError if
count_write_errors
is non-zero; otherwise returns 1.assert_no_write_concern_error
Throws a MongoDB::WriteConcernError if
count_write_concern_errors
is non-zero; otherwise returns 1.count_write_errors
Returns the number of write errors
count_write_concern_errors
Returns the number of write errors
last_code
Returns the last
code
field from either the list ofwrite_errors
orwrite_concern_errors
or 0 if there are no errors.last_errmsg
Returns the last
errmsg
field from either the list ofwrite_errors
orwrite_concern_errors
or the empty string if there are no errors.last_wtimeout
True if a write concern timed out or false otherwise.
AUTHORS
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>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2020 by MongoDB, Inc.
This is free software, licensed under:
The Apache License, Version 2.0, January 2004
Module Install Instructions
To install MongoDB, copy and paste the appropriate command in to your terminal.
cpanm MongoDB
perl -MCPAN -e shell install MongoDB
For more information on module installation, please visit the detailed CPAN module installation guide.