Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add unset

  • Loading branch information...
commit 370605ce1032e2c124df90b911362fd1308b8a1b 1 parent d9fb183
Andy Gayton authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 monglue/document.py
View
6 monglue/document.py
@@ -72,6 +72,12 @@ def set(self, document):
return self.__database__[self.__collection_name__].update(
{'_id': self.a['_id']}, {'$set': document})
+ def unset(self, document):
+ self.a.update(document)
+ _validate(self, self.a)
+ return self.__database__[self.__collection_name__].update(
+ {'_id': self.a['_id']}, {'$unset': document})
+
def addToSet(self, document):
# XXX - this could reuse the pymongo stub code
for key in document:
Please sign in to comment.
Something went wrong with that request. Please try again.