adapt changes for SpiderList and NodeList

This commit is contained in:
Marvin Zhang
2019-02-16 22:56:58 +08:00
parent 7d160d8665
commit 2cca685a71
11 changed files with 63 additions and 16 deletions

View File

@@ -28,6 +28,10 @@ class DbManager(object):
col = self.db[col_name]
col.find_one_and_update({'_id': ObjectId(id)}, {'$set': values})
def remove_one(self, col_name: str, id: str, **kwargs):
col = self.db[col_name]
col.remove({'_id': ObjectId(id)})
def list(self, col_name: str, cond: dict, skip: int = 0, limit: int = 10, **kwargs):
col = self.db[col_name]
data = []