Answer the question
In order to leave comments, you need to log in
Is it possible to get data from ResultSet without deleting it from ResultSet?
Good day to all.
Tell me, please, is it possible to read data from the ResultSet without extracting it from the ResultSet using getSomeType?
If not, are there any workarounds?
Answer the question
In order to leave comments, you need to log in
ResultSet is an iterator, data is not removed from it, it does not contain it at all. Roughly speaking, the call to next shifts the base cursor, which returns a new row of the selection. The workaround is to store the results in a list if you're sure the query didn't return more data than will fit in memory.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question