-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Cursors
-
None
Cursors can be used a few ways:
- as iterators (hasNext/next)
- as streams (cursor.pipe/cursor.on(..))
- with a number of "I/O" generating methods like forEach
If a cursor is used one way, it cannot be reliably used with another style. Mixing styles is also problematic (hasNext followed by forEach). In the future a cursor should be a factory for each style (cursor.stream() should return a new stream, etc), but in the meantime we can warn users if they are using multiple styles concurrently.