1MongoDB::InsertManyResuUlste(r3)Contributed Perl DocumenMtoantgiooDnB::InsertManyResult(3)
2
3
4
6 MongoDB::InsertManyResult - MongoDB single insert result object
7
9 version v2.2.2
10
12 my $result = $coll->insert( $document );
13
14 if ( $result->acknowledged ) {
15 ...
16 }
17
19 This class encapsulates the result from the insertion of a single
20 document.
21
23 inserted_count
24 The number of documents inserted.
25
26 inserted
27 An array reference containing information about inserted documents (if
28 any). Documents are just as in "upserted".
29
30 inserted_ids
31 A hash reference built lazily from "inserted" mapping indexes to object
32 IDs.
33
35 acknowledged
36 Indicates whether this write result was acknowledged. Always true for
37 this class.
38
39 assert
40 Throws an error if write errors or write concern errors occurred.
41 Otherwise, returns the invocant.
42
43 assert_no_write_error
44 Throws a MongoDB::WriteError if write errors occurred. Otherwise,
45 returns the invocant.
46
47 assert_no_write_concern_error
48 Throws a MongoDB::WriteConcernError if write concern errors occurred.
49 Otherwise, returns the invocant.
50
52 • David Golden <david@mongodb.com>
53
54 • Rassi <rassi@mongodb.com>
55
56 • Mike Friedman <friedo@friedo.com>
57
58 • Kristina Chodorow <k.chodorow@gmail.com>
59
60 • Florian Ragwitz <rafl@debian.org>
61
63 This software is Copyright (c) 2020 by MongoDB, Inc.
64
65 This is free software, licensed under:
66
67 The Apache License, Version 2.0, January 2004
68
69
70
71perl v5.32.1 2021-01-27 MongoDB::InsertManyResult(3)