@Override public void setFetchDirection(int direction) throws SQLException { rawStatement.setFetchDirection(direction); }
@Override public void setFetchDirection(int direction) throws SQLException { rawStatement.setFetchDirection(direction); }
/** {@inheritDoc} */ @Override public void setFetchDirection(int direction) throws SQLException { delegate.setFetchDirection(direction); }
/** * Prepare the given JDBC Statement (or PreparedStatement or * CallableStatement), applying statement settings such as fetch size, max * rows, and query timeout. @param stmt the JDBC Statement to prepare * * @param stmt {@link java.sql.PreparedStatement} to be configured * * @throws SQLException if interactions with provided stmt fail * * @see #setFetchSize * @see #setMaxRows * @see #setQueryTimeout */ protected void applyStatementSettings(PreparedStatement stmt) throws SQLException { if (fetchSize != VALUE_NOT_SET) { stmt.setFetchSize(fetchSize); stmt.setFetchDirection(ResultSet.FETCH_FORWARD); } if (maxRows != VALUE_NOT_SET) { stmt.setMaxRows(maxRows); } if (queryTimeout != VALUE_NOT_SET) { stmt.setQueryTimeout(queryTimeout); } }
stmt.setFetchDirection(defaultFetchDirection); currentFetchDirection = defaultFetchDirection;
@Override public void setFetchDirection(int direction) throws SQLException { ps.setFetchDirection(direction); }
@Override public void setFetchDirection(int direction) throws SQLException { ps.setFetchDirection(direction); }
pstmt.setFetchDirection( fetch_mode );
ps.setFetchDirection( ResultSet.FETCH_FORWARD );
stmt.setFetchDirection(defaultFetchDirection); currentFetchDirection = defaultFetchDirection;
/** * Facade for PreparedStatement */ public void setFetchDirection(int direction) throws SQLException { ps.setFetchDirection(direction); }
@Override public void beforeExecution(final PreparedStatement stmt, final StatementContext ctx) throws SQLException { stmt.setFetchDirection(direction); } };
public void setFetchDirection(int direction) throws SQLException { delegate.setFetchDirection(direction); }
@Override public void beforeExecution(final PreparedStatement stmt, final StatementContext ctx) throws SQLException { stmt.setFetchDirection(direction); }
public void setFetchDirection(int direction) throws SQLException { ps.setFetchDirection(direction); currentFetchDirection = direction; }
@Override public void setFetchDirection(int direction) throws SQLException { checkClosed(); delegate.setFetchDirection(direction); }
public void setFetchDirection(int arg0) throws SQLException { try { pstmt.setFetchDirection(arg0); } catch (SQLException e) { this.abort(); throw e; } }
public void setFetchDirection(int direction) throws SQLException { //preInvoke(); try { ps.setFetchDirection(direction); } catch (SQLException e) { catchInvoke(e); } }
public void setFetchDirection(int direction) throws SQLException { Profiler profiler = _profilerPoint.start(); try { _preparedStatement.setFetchDirection(direction); } finally { profiler.finish(); } }
@Test public void testStatementConfiguration() throws Exception { StatementConfiguration stmtConfig = new StatementConfiguration(1, 2, 3, 4, 5); QueryRunner queryRunner = new QueryRunner(stmtConfig); queryRunner.prepareStatement(conn, "select 1"); verify(stmt).setFetchDirection(eq(1)); verify(stmt).setFetchSize(eq(2)); verify(stmt).setMaxFieldSize(eq(3)); verify(stmt).setMaxRows(eq(4)); verify(stmt).setQueryTimeout(eq(5)); }