-
Type:
Improvement
-
Resolution: Done
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Breaking change. Implementing this API for Motor was a mistake:
@gen.coroutine
def fifth_item():
yield collection.insert([{'i': i} for i in range(10)])
cursor = collection.find().sort([('i', 1)])[5]
yield cursor.fetch_next
doc = cursor.next_object()
Require users to set skip and limit longhand:
@gen.coroutine
def fifth_item():
yield collection.insert([{'i': i} for i in range(10)])
cursor = collection.find().sort([('i', 1)]).skip(5).limit(1)
yield cursor.fetch_next
doc = cursor.next_object()
print(doc['i'])
IOLoop.current().run_sync(fifth_item)
- is depended on by
-
MOTOR-64 Incorrect iteration of MotorCursor causes infinite loop
-
- Closed
-