I have the following query:
@Select("SELECT* FROM "+MyData.TABLE_NAME+" where data_date = #{refDate}")
public List<MyData> getMyData(@Param("refDate") Date refDate);
This table data is HUGE! Loading so many rows in memory is not the best way! Is it possible to have this same query return a resultset so that I can just iterate over one item?
edit: I tried adding:
@ResultType(java.sql.ResultSet.class)
public ResultSet getMyData(@Param("refDate") Date refDate);
but it gives me:
nested exception is org.apache.ibatis.reflection.ReflectionException: Error instantiating interface java.sql.ResultSet with invalid types () or values (). Cause: java.lang.NoSuchMethodException: java.sql.ResultSet.<init>()