Simplemente itere como lo haría naturalmente sobre los objetos del cursor, no veo que quiera iterar sobre él usando range
y .next()
.
cursor1= Collection.find({x : {"$gt" : 1}})
for record in cursor1:
# do stuff with your record
Simplemente itere como lo haría naturalmente sobre los objetos del cursor, no veo que quiera iterar sobre él usando range
y .next()
.
cursor1= Collection.find({x : {"$gt" : 1}})
for record in cursor1:
# do stuff with your record