Skip to content

Instantly share code, notes, and snippets.

@nwillc
Last active September 22, 2016 14:44
Show Gist options
  • Save nwillc/8b62dd17c440abb2b2d668519a1e3375 to your computer and use it in GitHub Desktop.
Save nwillc/8b62dd17c440abb2b2d668519a1e3375 to your computer and use it in GitHub Desktop.
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