如何使用默认的空参数调用 pymongo sort() 函数,这样我就没有排序了。
collection.find(params).sort([])
ValueError: key_or_list must not be the empty list
collection.find(params).sort({})
TypeError: if no direction is specified, key_or_list must be an instance of list
collection.find(params).sort([{}])
ValueError: not enough values to unpack (expected 2, got 0)
在 mongo 控制台中,我可以使用
db.collection.find().sort({})