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

ResultSetHandler<T> abstraction #71

Closed
dimzon opened this issue Apr 6, 2014 · 3 comments
Closed

ResultSetHandler<T> abstraction #71

dimzon opened this issue Apr 6, 2014 · 3 comments
Milestone

Comments

@dimzon
Copy link
Contributor

dimzon commented Apr 6, 2014

ResultSetHandler from apache db utils is a good api separation concept.
at one side you can provide your own hand-coded implementation
at other side you can use sql2o RS->POJO code
at third side you can write your own generic code
so I propose to add ResultSetHandler interface and ResultSetHandlerFactory interface. Default ResultSetHandlerFactory implementation will use sql2o RS->POJO code.

@aldenquimby
Copy link
Contributor

👍 I agree, and for reference, it's here

@dimzon
Copy link
Contributor Author

dimzon commented Apr 6, 2014

btw it's FunctionalInterface in Java8 terms so you can write rs->rs.getObect(1) in Java8
at other side I'm a big fun of code-reuse and generics we can use such universal interface

public interface Func<I,O,X extends Throwable> {
    O run(I inputArguments) throws X;
}

@aldenquimby aldenquimby added this to the 2.0 milestone Apr 7, 2014
@aaberg aaberg modified the milestones: 1.5.0, 2.0 Sep 20, 2014
@aaberg
Copy link
Owner

aaberg commented Sep 20, 2014

Closing this issue, The ResultSetHandler was included in version 1.5.0

@aaberg aaberg closed this as completed Sep 20, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants