Closed albertZhangTJ closed 10 months ago
Turned out that ResultSet
s are defaulted to be forward only and cannot be reused. The computational overhead to translate it into some other data structures is deemed to be unworthy since the cache hit/miss ratio is about 50/50 in test runs. While the scroll insensitive behavior is not guaranteed to be supported in all JDBC drivers.
Therefore we believe it is sufficient to simply query the target DBMS every single time.
The result of queries that retrieves available identifiers can be cached at statement level. Since nothing other than queries will run on the target DBMS during the generation of the current statement (assuming single-threaded), this result is guaranteed to be valid.