Created
December 13, 2016 22:00
-
-
Save christian-posta/ea2e90eeab7dd23b626fac2c107250df to your computer and use it in GitHub Desktop.
How to limit prepared statement in camel-sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.apache.camel.component.sql; | |
public class FetchLimitedPreparedStatementStrategy extends DefaultSqlPrepareStatementStrategy { | |
public FetchLimitedPreparedStatementStrategy() { | |
} | |
@Override | |
public void populateStatement(PreparedStatement ps, Iterator<?> iterator, int expectedParams) throws SQLException { | |
ps.setFetchSize(1000); | |
super.populateStatement(ps, iterator, expectedParams); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment