mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
Db添加FetchSize的全局设置(pr#3978@Github)
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
<parent>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-parent</artifactId>
|
||||
<version>5.8.38</version>
|
||||
<version>5.8.38-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>hutool-db</artifactId>
|
||||
|
@@ -254,9 +254,11 @@ public final class DbUtil {
|
||||
|
||||
/**
|
||||
* 设置构造结果集时每次从数据库取到的行数
|
||||
*
|
||||
* @param fetchSize 每一轮网络请求获取的行数
|
||||
* @since 5.8.39
|
||||
*/
|
||||
public static void setStatementFetchSizeGlobal(Integer fetchSize){
|
||||
public static void setStatementFetchSizeGlobal(Integer fetchSize) {
|
||||
GlobalDbConfig.setStatementFetchSize(fetchSize);
|
||||
}
|
||||
}
|
||||
|
@@ -39,7 +39,7 @@ public class GlobalDbConfig {
|
||||
/**
|
||||
* 自定义构造结果集时每次从数据库取的行数
|
||||
*/
|
||||
protected static Integer statementFetchSize=null;
|
||||
protected static Integer statementFetchSize = null;
|
||||
|
||||
/**
|
||||
* 设置全局是否在结果中忽略大小写<br>
|
||||
@@ -126,7 +126,9 @@ public class GlobalDbConfig {
|
||||
|
||||
/**
|
||||
* 设置构造结果集时每次从数据库取到的行数
|
||||
*
|
||||
* @param statementFetchSize 每一轮网络请求获取的行数
|
||||
* @since 5.8.39
|
||||
*/
|
||||
public static void setStatementFetchSize(Integer statementFetchSize) {
|
||||
GlobalDbConfig.statementFetchSize = statementFetchSize;
|
||||
|
Reference in New Issue
Block a user