Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding ability to read result sets row-by-row for MySql driver [SPR-14028] #18600

Closed
spring-projects-issues opened this issue Mar 8, 2016 · 1 comment
Assignees
Labels
in: data Issues in data modules (jdbc, orm, oxm, tx) type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

Uladzimir Zhuraulevich opened SPR-14028 and commented

In org.springframework.jdbc.core.JdbcTemplate:

protected void applyStatementSettings(Statement stmt) throws SQLException {
int fetchSize = getFetchSize();
if (fetchSize >= 0) {
stmt.setFetchSize(fetchSize);
}
int maxRows = getMaxRows();
if (maxRows >= 0) {
stmt.setMaxRows(maxRows);
}
DataSourceUtils.applyTimeout(stmt, getDataSource(), getQueryTimeout());
}

There is no ability to set streaming mode for fetching row-by-row.
Look at ResultSet here http://dev.mysql.com/doc/connector-j/en/connector-j-reference-implementation-notes.html


Referenced from: commits 0b1639d

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

As of 4.3, JdbcTemplate passes negative values other than -1 on to the driver. -1 is defined to have special semantics in JdbcTemplate itself, namely using the JDBC driver's own configuration (not setting any specific value on our end).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: data Issues in data modules (jdbc, orm, oxm, tx) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants