Skip to content

Commit e9d1c2a

Browse files
committed
IGNITE-26314 (minor) Set default fetchSize.
1 parent 8abb725 commit e9d1c2a

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

modules/jdbc/src/main/java/org/apache/ignite/internal/jdbc2/JdbcStatement2.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,8 @@ public int getFetchDirection() throws SQLException {
512512

513513
/**
514514
* Gives the JDBC driver a hint as to the number of rows that should
515-
* be fetched from the database.
515+
* be fetched from the database. If the value specified is zero, then
516+
* the hint is ignored. The default value is zero.
516517
*
517518
* <p>Note: the current implementation does not provide any means to change the number
518519
* of rows after the statement has executed. Thus, changing this value after the statement

modules/jdbc/src/test/java/org/apache/ignite/internal/jdbc2/JdbcStatement2SelfTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,9 @@ public void setFetchSize() throws SQLException {
263263
stmt.setFetchSize(1000);
264264
assertEquals(1000, stmt.getFetchSize());
265265

266+
stmt.setFetchSize(0);
267+
assertEquals(0, stmt.getFetchSize());
268+
266269
assertThrowsSqlException(SQLException.class,
267270
"Invalid fetch size.",
268271
() -> stmt.setFetchSize(-1)

0 commit comments

Comments
 (0)