Add Cursor::first() #98

Open
opened 2026-10-27 17:09:46 +01:00 by c.fahner · 0 comments
Owner

Currently getting only the first item from a cursor requires multiple steps: setting $limit to 1, obtaining an iterator and then assigning or returning the first item from the iterator.

A method Cursor::first() should be added to combine these steps.

Currently getting only the first item from a cursor requires multiple steps: setting `$limit` to `1`, obtaining an iterator and then assigning or returning the first item from the iterator. A method `Cursor::first()` should be added to combine these steps.
c.fahner added this to the v0.3 milestone 2026-10-27 17:09:46 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
slendium/ocd#98
No description provided.