gpt4 book ai didi

java - JDBC ResultSet Scroll Sensitive 类型和Result Set Scroll Insensitive 类型

转载 作者:塔克拉玛干 更新时间:2023-11-03 04:14:05 24 4
gpt4 key购买 nike

谁能告诉我 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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com