Java Code Examples for java.sql.ResultSet#FETCH_FORWARD

The following examples show how to use java.sql.ResultSet#FETCH_FORWARD . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CommonRowSetTests.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
@DataProvider(name = "rowSetFetchDirection")
protected Object[][] rowSetFetchDirection() throws Exception {
    RowSet rs = newInstance();
    return new Object[][]{
        {rs, ResultSet.FETCH_FORWARD},
        {rs, ResultSet.FETCH_REVERSE},
        {rs, ResultSet.FETCH_UNKNOWN}
    };
}
 
Example 2
Source File: SnowflakeBaseResultSet.java    From snowflake-jdbc with Apache License 2.0 5 votes vote down vote up
@Override
public void setFetchDirection(int direction) throws SQLException
{
  logger.debug(
      "public void setFetchDirection(int direction)");

  raiseSQLExceptionIfResultSetIsClosed();
  if (direction != ResultSet.FETCH_FORWARD)
  {
    throw new SQLFeatureNotSupportedException();
  }
}
 
Example 3
Source File: CommonRowSetTests.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
@DataProvider(name = "rowSetFetchDirection")
protected Object[][] rowSetFetchDirection() throws Exception {
    RowSet rs = newInstance();
    return new Object[][]{
        {rs, ResultSet.FETCH_FORWARD},
        {rs, ResultSet.FETCH_REVERSE},
        {rs, ResultSet.FETCH_UNKNOWN}
    };
}
 
Example 4
Source File: CommonRowSetTests.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
@DataProvider(name = "rowSetFetchDirection")
protected Object[][] rowSetFetchDirection() throws Exception {
    RowSet rs = newInstance();
    return new Object[][]{
        {rs, ResultSet.FETCH_FORWARD},
        {rs, ResultSet.FETCH_REVERSE},
        {rs, ResultSet.FETCH_UNKNOWN}
    };
}
 
Example 5
Source File: BaseCassandraStatement.java    From cassandra-jdbc-driver with Apache License 2.0 5 votes vote down vote up
public void setFetchDirection(int direction) throws SQLException {
    validateState();

    if (direction != ResultSet.FETCH_FORWARD) {
        if (!quiet) {
            throw CassandraErrors.notSupportedException();
        }
        // this.fetchDirection = direction;
    }
}
 
Example 6
Source File: CsvResultSet.java    From jdbc-driver-csv with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
public void setFetchDirection(int direction) throws SQLException {
    checkOpen();

    if (direction == ResultSet.FETCH_FORWARD ||
            direction == ResultSet.FETCH_REVERSE ||
            direction == ResultSet.FETCH_UNKNOWN) {
        this.fetchDirection = direction;
    } else {
        throw new SQLException(CsvResources.getString("unsupportedDirection") + ": " + direction);
    }
}
 
Example 7
Source File: ClientStatement.java    From gemfirexd-oss with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
public int getFetchDirection() throws SQLException {
  if (this.attrs.isSetFetchReverse()) {
    return this.attrs.isFetchReverse() ? ResultSet.FETCH_REVERSE
        : ResultSet.FETCH_FORWARD;
  }
  else {
    return ResultSet.FETCH_UNKNOWN;
  }
}
 
Example 8
Source File: ClientStatement.java    From gemfirexd-oss with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
public void setFetchDirection(int direction) throws SQLException {
  checkClosed();
  if (direction == ResultSet.FETCH_REVERSE) {
    this.attrs.setFetchReverse(true);
  }
  else if (direction == ResultSet.FETCH_FORWARD) {
    this.attrs.setFetchReverse(false);
  }
  else if (this.attrs.isSetFetchReverse()) {
    this.attrs.setFetchReverseIsSet(false);
    this.attrs.setFetchReverse(false);
  }
}
 
Example 9
Source File: SnowflakeStatementV1.java    From snowflake-jdbc with Apache License 2.0 5 votes vote down vote up
@Override
public void setFetchDirection(int direction) throws SQLException
{
  logger.debug("setFetchDirection(int direction)");
  raiseSQLExceptionIfStatementIsClosed();
  if (direction != ResultSet.FETCH_FORWARD)
  {
    throw new SQLFeatureNotSupportedException();
  }
}
 
Example 10
Source File: PhoenixResultSet.java    From phoenix with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
@Override
public int getFetchDirection() throws SQLException {
    return ResultSet.FETCH_FORWARD;
}
 
Example 11
Source File: HerdDBStatement.java    From herddb with Apache License 2.0 4 votes vote down vote up
@Override
public int getFetchDirection() throws SQLException {
    return ResultSet.FETCH_FORWARD;
}
 
Example 12
Source File: PhoenixResultSet.java    From phoenix with Apache License 2.0 4 votes vote down vote up
@Override
public void setFetchDirection(int direction) throws SQLException {
    if (direction != ResultSet.FETCH_FORWARD) {
        throw new SQLFeatureNotSupportedException();
    }
}
 
Example 13
Source File: PhoenixStatement.java    From phoenix with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
@Override
public void setFetchDirection(int direction) throws SQLException {
    if (direction != ResultSet.FETCH_FORWARD) {
        throw new SQLFeatureNotSupportedException();
    }
}
 
Example 14
Source File: PhoenixResultSet.java    From phoenix with Apache License 2.0 4 votes vote down vote up
@Override
public int getFetchDirection() throws SQLException {
    return ResultSet.FETCH_FORWARD;
}
 
Example 15
Source File: PhoenixResultSet.java    From phoenix with Apache License 2.0 4 votes vote down vote up
@Override
public void setFetchDirection(int direction) throws SQLException {
    if (direction != ResultSet.FETCH_FORWARD) {
        throw new SQLFeatureNotSupportedException();
    }
}
 
Example 16
Source File: PhoenixStatement.java    From phoenix with Apache License 2.0 4 votes vote down vote up
@Override
public void setFetchDirection(int direction) throws SQLException {
    if (direction != ResultSet.FETCH_FORWARD) {
        throw new SQLFeatureNotSupportedException();
    }
}
 
Example 17
Source File: PhoenixStatement.java    From phoenix with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
@Override
public int getFetchDirection() throws SQLException {
    return ResultSet.FETCH_FORWARD;
}
 
Example 18
Source File: BaseStatement.java    From requery with Apache License 2.0 4 votes vote down vote up
@Override
public void setFetchDirection(int direction) throws SQLException {
    if (direction != ResultSet.FETCH_FORWARD) {
        throw new SQLFeatureNotSupportedException("only FETCH_FORWARD is supported");
    }
}
 
Example 19
Source File: TResultSet.java    From tddl with Apache License 2.0 4 votes vote down vote up
@Override
public int getFetchDirection() throws SQLException {
    return ResultSet.FETCH_FORWARD;
}
 
Example 20
Source File: AbstractStatement.java    From sis with Apache License 2.0 4 votes vote down vote up
/**
 * Defaults to {@link ResultSet#FETCH_FORWARD}.
 */
@Override
public int getFetchDirection() throws SQLException {
    return ResultSet.FETCH_FORWARD;
}