Skip to content

Peek and single methods #52

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 11, 2016
Merged

Peek and single methods #52

merged 4 commits into from
Apr 11, 2016

Conversation

technige
Copy link
Contributor

@technige technige commented Apr 8, 2016

No description provided.

if num_records == 0:
raise ResultError("No records found in stream")
elif num_records != 1:
raise ResultError("Multiple records found in stream")
Copy link
Contributor

Choose a reason for hiding this comment

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

single - consume all remaining records and return the first of these, failing if there is not exactly one record
According to the card

@zhenlineo zhenlineo merged commit c559093 into 1.0 Apr 11, 2016
@zhenlineo zhenlineo deleted the 1.0-pingle branch April 11, 2016 10:05
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.

2 participants