Nov 2nd, 2008, 01:40 AM
RowMapper and Oracle Cursor expression
is there an efficient way to implement a RowMapper to handle SQL queries like the following (returned as OUT parameters in a StoredProcedure)
FROM USER_TAB_COLUMNS b
WHERE a.TABLE_NAME = b.TABLE_NAME
FROM USER_TABLES a
So far, I haven't found a way other than casting COLUMN_LIST (rs.getObject(2)) to a ResultSet and iterating using a hand-written loop.
It would be far more intuitive if it could somehow be mapped using another RowMapper - maybe nested within the existing one.
Also, if the hand-written loop is the only way to go, do I need to close the ResultSet in the end, or will it be done automatically when the RowMapper is destoyed ?
Thanks in advance for the help
Last edited by mouratos; Nov 2nd, 2008 at 04:36 AM.
Nov 2nd, 2008, 08:05 PM
Have you taken a look at JdbcCursorItemReader in spring batch? It might satisfy your requirement.
Tags for this Thread