2
PyMongo API에서 복잡한 쿼리를 순서대로 수행하는 것이 가능한지 궁금합니다. 데이터베이스가 있는데 데이터를 검색하려고합니다. 데이터베이스 기능은 {id, username, ...}
이고, ID는 {uid, timestamp}
입니다. 특정 uid
을 확인하는 쿼리를 수행하고 싶습니다. 나는 내 쿼리를 수행 할 수 있습니다 timestamp
추가하는 경우PyMongo - 하나의 중첩 된 필드로 일치
db = client.test_database
db = client['trendSetters']
collection = db.test_collection
collection = db["cms_users_features"]
result = collection.find_one()
for col in collection.find({"_id": {"uid": 702993}}):
print col
편집
for col in collection.find({"_id": {"uid": 702993, "timestamp":1393554289813 }}):
print col
: 내가 좋아하는 뭔가를 시도했습니다. timestamp
을 추가하지 않고 어떻게 그렇게 할 수 있습니까?