谁能告诉我 JDBC ResultSet Scroll Sensitive Type 和 Result Set Scroll Insensitive Type 之间的区别?
我们通常在项目中的什么地方使用这些?
最佳答案
ResultSet 对象的类型决定了它在两个方面的功能级别:操作游标的方式,以及 ResultSet 对象如何反射(reflect)对基础数据源所做的并发更改。
TYPE_SCROLL_INSENSITIVE:
The result can be scrolled; its cursor can move both forward and backward relative to the current position, and it can move to an absolute position. The result set is insensitive to changes made to the underlying data source while it is open. It contains the rows that satisfy the query at either the time the query is executed or as the rows are retrieved.
TYPE_SCROLL_SENSITIVE:
The result can be scrolled; its cursor can move both forward and backward relative to the current position, and it can move to an absolute position. The result set reflects changes made to the underlying data source while the result set remains open.
引用javase tutorial了解更多详情。
关于java - JDBC ResultSet Scroll Sensitive 类型和Result Set Scroll Insensitive 类型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11795670/