(self, selector, update, multi=False, upsert=False,
                   collation=None)
Create an update document and add it to the list of ops.
Create an update document and add it to the list of ops.
Create an update document and add it to the list of ops .
def add_update(self, selector, update, multi=False, upsert=False,
                   collation=None):
        """Create an update document and add it to the list of ops.
        """
        validate_ok_for_update(update)
        cmd = SON([('q', selector), ('u', update),
                   ('multi', multi), ('upsert', upsert)])
        collation = validate_collation_or_none(collation)
        if collation is not None:
            self.uses_collation = True
            cmd['collation'] = collation
        self.ops.append((_UPDATE, cmd))
def add_update ( self , selector , update , multi = False , upsert = False , collation = None ) : validate_ok_for_update ( update ) cmd = SON ( [ ( 'q' , selector ) , ( 'u' , update ) , ( 'multi' , multi ) , ( 'upsert' , upsert ) ] ) collation = validate_collation_or_none ( collation ) if collation is not None : self . uses_collation = True cmd [ 'collation' ] = collation self . ops . append ( ( _UPDATE , cmd ) )