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

Public Member Functions

def __init__ (self, raw_result, acknowledged)
 
def raw_result (self)
 
def matched_count (self)
 
def modified_count (self)
 
def upserted_id (self)
 
- Public Member Functions inherited from _WriteResult
def __init__ (self, acknowledged)
 
def acknowledged (self)
 

Detailed Description

The return type for :meth:`~pymongo.collection.Collection.update_one`,
:meth:`~pymongo.collection.Collection.update_many`, and
:meth:`~pymongo.collection.Collection.replace_one`.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  raw_result,
  acknowledged 
)

Member Function Documentation

◆ matched_count()

def matched_count (   self)
The number of documents matched for this 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``.

◆ raw_result()

def raw_result (   self)
The raw result document returned by the server.

◆ upserted_id()

def upserted_id (   self)
The _id of the inserted document if an upsert took place. Otherwise
``None``.

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