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

Public Member Functions

def __init__ (self, selector, bulk, collation)
 
def update_one (self, update)
 
def update (self, update)
 
def replace_one (self, replacement)
 
def remove_one (self)
 
def remove (self)
 
def upsert (self)
 

Detailed Description

An interface for adding update or remove operations.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  selector,
  bulk,
  collation 
)

Member Function Documentation

◆ remove()

def remove (   self)
Remove all documents matching the selector criteria.

◆ remove_one()

def remove_one (   self)
Remove a single document matching the selector criteria.

◆ replace_one()

def replace_one (   self,
  replacement 
)
Replace one entire document matching the selector criteria.

:Parameters:
  - `replacement` (dict): the replacement document

◆ update()

def update (   self,
  update 
)
Update all documents matching the selector criteria.

:Parameters:
  - `update` (dict): the update operations to apply

◆ update_one()

def update_one (   self,
  update 
)
Update one document matching the selector criteria.

:Parameters:
  - `update` (dict): the update operations to apply

◆ upsert()

def upsert (   self)
Specify that all chained update operations should be
upserts.

:Returns:
  - A :class:`BulkUpsertOperation` instance, used to add
    update operations to this bulk operation.

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