Exemple #1
0
 def add_to_set(self, qfield, value):
     ''' Refer to:  :func:`~mongoalchemy.update_expression.UpdateExpression.add_to_set`'''
     return UpdateExpression(self).add_to_set(qfield, value)
Exemple #2
0
 def pop_last(self, qfield):
     ''' Refer to:  :func:`~mongoalchemy.update_expression.UpdateExpression.pop_last`'''
     return UpdateExpression(self).pop_last(qfield)
Exemple #3
0
 def remove_all(self, qfield, *value):
     ''' Refer to:  :func:`~mongoalchemy.update_expression.UpdateExpression.remove_all`'''
     return UpdateExpression(self).remove_all(qfield, *value)
Exemple #4
0
 def extend(self, qfield, *value):
     ''' Refer to:  :func:`~mongoalchemy.update_expression.UpdateExpression.extend`'''
     return UpdateExpression(self).extend(qfield, *value)
Exemple #5
0
 def inc(self, *args, **kwargs):
     ''' Refer to:  :func:`~mongoalchemy.update_expression.UpdateExpression.inc`'''
     return UpdateExpression(self).inc(*args, **kwargs)
Exemple #6
0
 def unset(self, qfield):
     ''' Refer to:  :func:`~mongoalchemy.update_expression.UpdateExpression.unset`'''
     return UpdateExpression(self).unset(qfield)
 def __delattr__(self, field):
     q = self.__class__.query.filter(self.__class__.mongo_id == self.mongo_id)
     ex = UpdateExpression(q)
     ex.unset(getattr(self.__class__, field))
     ex.execute()