Last active
September 22, 2016 14:44
-
-
Save nwillc/8b62dd17c440abb2b2d668519a1e3375 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public final class Extractors { | |
private Extractors() {} | |
public static final BiFunction<ResultSet, Integer, String> STRING_I = (r, i) -> { | |
try { | |
return r.getString(i); | |
} catch (SQLException e) { | |
throw new UncheckedSQLException(e); | |
} | |
}; | |
public static final BiFunction<ResultSet, String, String> STRING_S = (r, s) -> { | |
try { | |
return r.getString(s); | |
} catch (SQLException e) { | |
throw new UncheckedSQLException(e); | |
} | |
}; | |
/* ... */ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment