/** * Sets the limit for the maximum number of rows that any ResultSet object can contain to the given number. * If the limit is exceeded, the excess rows are silently dropped. Zero means there is no limit. * @see Statement#setMaxRows(int) */ public Q setMaxRows(final int maxRows) { checkNotClosed(); this.maxRows = maxRows; if (statement != null) { try { statement.setMaxRows(maxRows); } catch (SQLException sex) { throw new DbSqlException(this, "Unable to set max rows: " + maxRows, sex); } } return _this(); }
/** * Gives the JDBC driver a hint as to the number of rows that should be fetched from the database when * more rows are needed. The number of rows specified affects only result sets created using this statement. * If the value specified is zero, then the hint is ignored. The default value is zero. * @see Statement#setFetchSize(int) */ public Q setFetchSize(final int rows) { checkNotClosed(); this.fetchSize = rows; if (statement != null) { try { statement.setFetchSize(fetchSize); } catch (SQLException sex) { throw new DbSqlException(this, "Unable to set fetch size: " + fetchSize, sex); } } return _this(); }
/** * Initializes the query if not already initialized. * Usually, user doesn't have to invoke it at all, since it will * be called before all methods that deals directly with JDBC statement. * Throws an exception if called on closed query. */ public final void init() { checkNotClosed(); if (queryState == INITIALIZED) { return; } initializeJdbc(); queryState = INITIALIZED; prepareQuery(); }
/** * Sets the limit for the maximum number of rows that any ResultSet object can contain to the given number. * If the limit is exceeded, the excess rows are silently dropped. Zero means there is no limit. * @see Statement#setMaxRows(int) */ public void setMaxRows(int maxRows) { checkNotClosed(); this.maxRows = maxRows; if (statement != null) { try { statement.setMaxRows(maxRows); } catch (SQLException sex) { throw new DbSqlException("Unable to set max rows of: " + maxRows, sex); } } }
/** * Gives the JDBC driver a hint as to the number of rows that should be fetched from the database when * more rows are needed. The number of rows specified affects only result sets created using this statement. * If the value specified is zero, then the hint is ignored. The default value is zero. * @see Statement#setFetchSize(int) */ public void setFetchSize(int rows) { checkNotClosed(); this.fetchSize = rows; if (statement != null) { try { statement.setFetchSize(fetchSize); } catch (SQLException sex) { throw new DbSqlException("Unable to set fetch size of: " + fetchSize, sex); } } }
/** * Sets the limit for the maximum number of rows that any ResultSet object can contain to the given number. * If the limit is exceeded, the excess rows are silently dropped. Zero means there is no limit. * @see Statement#setMaxRows(int) */ public Q setMaxRows(final int maxRows) { checkNotClosed(); this.maxRows = maxRows; if (statement != null) { try { statement.setMaxRows(maxRows); } catch (SQLException sex) { throw new DbSqlException(this, "Unable to set max rows: " + maxRows, sex); } } return _this(); }
/** * Gives the JDBC driver a hint as to the number of rows that should be fetched from the database when * more rows are needed. The number of rows specified affects only result sets created using this statement. * If the value specified is zero, then the hint is ignored. The default value is zero. * @see Statement#setFetchSize(int) */ public Q setFetchSize(final int rows) { checkNotClosed(); this.fetchSize = rows; if (statement != null) { try { statement.setFetchSize(fetchSize); } catch (SQLException sex) { throw new DbSqlException(this, "Unable to set fetch size: " + fetchSize, sex); } } return _this(); }
/** * Initializes the query if not already initialized. * Usually, user doesn't have to invoke it at all, since it will * be called before all methods that deals directly with JDBC statement. * Throws an exception if called on closed query. */ public final void init() { checkNotClosed(); if (queryState == INITIALIZED) { return; } initializeJdbc(); queryState = INITIALIZED; prepareQuery(); }
/** * Initializes the query if not already initialized. * Usually, user doesn't have to invoke it at all, since it will * be called before all methods that deals directly with JDBC statement. * Throws an exception if called on closed query. */ public final void init() { checkNotClosed(); if (queryState == QUERY_INITIALIZED) { return; } initializeJdbc(); queryState = QUERY_INITIALIZED; prepareQuery(); }