Hello all!

I am quite a novice regarding jdbctemplate.

I need to create a generic method which allows the caller to send an sql-query and get a resultSet in return. When I, inside this method, calls jdbctemplate.query() this requires for instance a RowMapper. But the way I understand it, when using RowMapper you need to know the datatype of the column of the row it should map? But the problem is that this SQL-query could be any kind of sql-select towards any table in the database.

My question is as follows:
How can I use the jdbcTemplate.query-method when I don`t know the result of the query? All I want is to be able to return whatever ResultSet the query fetches.

Hope I was able to describe my challenge here.

Thank you in advance!