Perl Diver 2.33
Main Environment Variables Perl Default Values Perl Config - Summary Perl Config - Full Installed Modules List Directory uptime Docs

Module Documentation
Details and documentation about a specific module, including version and documentation (if available). Note that while links to perldoc.com and search.cpan.org are provided, the module may be part of a larger distribution. If you reach a File Not Found page on either site, please try the parent module.

MongoDB::InsertManyResult

Name MongoDB::InsertManyResult
Version v2.2.2
Located at /usr/share/perl5
File /usr/share/perl5/MongoDB/InsertManyResult.pm
Is Core No
Search CPAN for this module MongoDB::InsertManyResult
Documentation MongoDB::InsertManyResult
Module Details MongoDB::InsertManyResult


NAME

MongoDB::InsertManyResult - MongoDB single insert result object


VERSION

version v2.2.2


SYNOPSIS

    my $result = $coll->insert( $document );
    if ( $result->acknowledged ) {
        ...
    }


DESCRIPTION

This class encapsulates the result from the insertion of a single document.


ATTRIBUTES

inserted_count

The number of documents inserted.

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.


METHODS

acknowledged

Indicates whether this write result was acknowledged. Always true for this class.

assert

Throws an error if write errors or write concern errors occurred. Otherwise, returns the invocant.

assert_no_write_error

Throws a MongoDB::WriteError if write errors occurred. Otherwise, returns the invocant.

assert_no_write_concern_error

Throws a MongoDB::WriteConcernError if write concern errors occurred. Otherwise, returns the invocant.


AUTHORS


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

Perl Diver brought to you by ScriptSolutions.com © 1997- 2026