OpenQuizz
Une application de gestion des contenus pédagogiques
BulkWriteResult Class Reference
Inheritance diagram for BulkWriteResult:
Collaboration diagram for BulkWriteResult:

Public Member Functions

def __init__ (self, bulk_api_result, acknowledged)
 
def bulk_api_result (self)
 
def inserted_count (self)
 
def matched_count (self)
 
def modified_count (self)
 
def deleted_count (self)
 
def upserted_count (self)
 
def upserted_ids (self)
 
- Public Member Functions inherited from _WriteResult
def __init__ (self, acknowledged)
 
def acknowledged (self)
 

Detailed Description

An object wrapper for bulk API write results.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  bulk_api_result,
  acknowledged 
)
Create a BulkWriteResult instance.

:Parameters:
  - `bulk_api_result`: A result dict from the bulk API
  - `acknowledged`: Was this write result acknowledged? If ``False``
    then all properties of this object will raise
    :exc:`~pymongo.errors.InvalidOperation`.

Member Function Documentation

◆ bulk_api_result()

def bulk_api_result (   self)
The raw bulk API result.

◆ deleted_count()

def deleted_count (   self)
The number of documents deleted.

◆ inserted_count()

def inserted_count (   self)
The number of documents inserted.

◆ matched_count()

def matched_count (   self)
The number of documents matched for an update.

◆ modified_count()

def modified_count (   self)
The number of documents modified.

.. note:: modified_count is only reported by MongoDB 2.6 and later.
  When connected to an earlier server version, or in certain mixed
  version sharding configurations, this attribute will be set to
  ``None``.

◆ upserted_count()

def upserted_count (   self)
The number of documents upserted.

◆ upserted_ids()

def upserted_ids (   self)
A map of operation index to the _id of the upserted document.

The documentation for this class was generated from the following file: