Skip to content
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

Add new ResultIterable<T> methods for single row results #1511

Merged
merged 3 commits into from Apr 24, 2019

Conversation

qualidafial
Copy link
Member

@qualidafial qualidafial commented Apr 23, 2019

  • one() : T - throws if zero or multiple rows returned
  • findOne() : Optional<T> - throws if multiple rows returned
  • first() : T - throws if zero rows returned
  • Deprecate findOnly() in favor of one()

Fixes #1498

- one() : T - throws if zero or multiple rows returned
- findOne() : Optional<T> - throws if multiple rows returned
- first() : T - throws if zero rows returned
- Deprecate findOnly() in favor of one()
Copy link

@leaumar leaumar left a comment

Choose a reason for hiding this comment

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

looks sweet

Copy link
Contributor

@findepi findepi left a comment

Choose a reason for hiding this comment

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

Thanks!

Copy link
Member

@stevenschlansker stevenschlansker left a comment

Choose a reason for hiding this comment

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

Looks great

@stevenschlansker stevenschlansker merged commit 985de45 into master Apr 24, 2019
@stevenschlansker stevenschlansker deleted the result-iterable-single-row-methods branch April 24, 2019 02:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

How to get the only row if present?
4 participants