mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-10 02:59:27 +08:00
Update nosql_mongodb.py
This commit is contained in:
@@ -262,7 +262,12 @@ class nosqlMongodbCtr():
|
||||
|
||||
# print(where)
|
||||
result = collection_instance.find(where).skip(start_index).limit(size).sort('_id',-1)
|
||||
if where:
|
||||
count = collection_instance.count_documents(where)
|
||||
else:
|
||||
collection_stats = db_instance.command("collStats", collection)
|
||||
count = collection_stats.get("count")
|
||||
|
||||
d = []
|
||||
for document in result:
|
||||
d.append(document)
|
||||
|
||||
Reference in New Issue
Block a user