From 5562def5b7137be944fdbc93bcd7e7b32ea0fbf2 Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Tue, 19 Jun 2012 11:29:48 -0400 Subject: [PATCH] Add documentation of mongo query syntax usage --- common/lib/keystore/mongo.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/common/lib/keystore/mongo.py b/common/lib/keystore/mongo.py index d9760909c9..9b6327c8e9 100644 --- a/common/lib/keystore/mongo.py +++ b/common/lib/keystore/mongo.py @@ -67,6 +67,9 @@ class MongoKeyStore(KeyStore): location: Something that can be passed to Location data: A nested dictionary of problem data """ + + # See http://www.mongodb.org/display/DOCS/Updating for + # atomic update syntax self.collection.update( {'location': Location(location).dict()}, {'$set': {'data': data}} @@ -80,6 +83,9 @@ class MongoKeyStore(KeyStore): location: Something that can be passed to Location children: A list of child item identifiers """ + + # See http://www.mongodb.org/display/DOCS/Updating for + # atomic update syntax self.collection.update( {'location': Location(location).dict()}, {'$set': {'children': children}}