Created
July 20, 2015 07:06
-
-
Save rj-hwang/66fa895024c957409e0c to your computer and use it in GitHub Desktop.
ResultSet to Object[]
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 Object[] mapRow(ResultSet rs, int rowNum) throws SQLException { | |
Object[] r = new Object[rs.getMetaData().getColumnCount()]; | |
for (int i = 0; i < r.length; i++) { | |
r[i] = rs.getObject(i + 1); | |
} | |
return r; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment