Skip to content

Conversation

HolgerDoerner
Copy link

Adding the methods loadStreamEvents and loadStreamEventsReverse to the EventStore interface.

I did this as part of Hacktoberfest, so I would appreciate it if You would label the Issue accordingly 😃

Closes #2

* @param int $limit
* @return \Iterator
*/
public function loadStreamEvents(string $streamName, int $skip, int $limit): \Iterator;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

skip should default to 0 and limit to null

/**
* @param string $streamName
* @param int $skip
* @param int $limit

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

int | null $limit

* @param int $limit
* @return \Iterator
*/
public function loadStreamEventsReverse(string $streamName, int $skip, int $limit): \Iterator;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

skip should default to 0 and limit to null

/**
* @param string $streamName
* @param int $skip
* @param int $limit

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

int | null $limit

@codeliner
Copy link

pagination should be optional. By default the returned cursor should iterate over all events in the stream. See my inline comments for details

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Load stream events

2 participants