java.sql.ResultSet.setFetchDirection()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(4.3k)|赞(0)|评价(0)|浏览(263)

本文整理了Java中java.sql.ResultSet.setFetchDirection方法的一些代码示例,展示了ResultSet.setFetchDirection的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ResultSet.setFetchDirection方法的具体详情如下:
包路径:java.sql.ResultSet
类名称:ResultSet
方法名:setFetchDirection

ResultSet.setFetchDirection介绍

[英]Indicates which direction (forward/reverse) will be used to process the rows of this ResultSet object. This is treated as a hint by the JDBC driver.
[中]指示将使用哪个方向(正向/反向)处理此ResultSet对象的行。JDBC驱动程序将其视为提示。

代码示例

代码示例来源:origin: apache/incubator-shardingsphere

@Override
  public void execute(final ResultSet resultSet) throws SQLException {
    resultSet.setFetchDirection(direction);
  }
});

代码示例来源:origin: querydsl/querydsl

@Override
public void setFetchDirection(int direction) throws SQLException {
  rs.setFetchDirection(direction);
}

代码示例来源:origin: codingapi/tx-lcn

@Override
public void setFetchDirection(int direction) throws SQLException {
 delegate.setFetchDirection(direction);
}

代码示例来源:origin: alibaba/druid

@Override
public void setFetchDirection(int direction) throws SQLException {
  try {
    rs.setFetchDirection(direction);
  } catch (Throwable t) {
    throw checkException(t);
  }
}

代码示例来源:origin: spotbugs/spotbugs

@NoWarning("SQL_BAD_RESULTSET_ACCESS")
void notBug2(ResultSet any) throws SQLException {
  any.setFetchDirection(0);
}

代码示例来源:origin: alibaba/druid

@Override
public void resultSet_setFetchDirection(ResultSetProxy rs, int direction) throws SQLException {
  if (this.pos < filterSize) {
    nextFilter()
        .resultSet_setFetchDirection(this, rs, direction);
    return;
  }
  rs.getResultSetRaw()
      .setFetchDirection(direction);
}

代码示例来源:origin: igniterealtime/Openfire

rs.setFetchDirection(ResultSet.FETCH_FORWARD);
rs.relative(rowNumber);

代码示例来源:origin: p6spy/p6spy

@Override
public void setFetchDirection(int direction) throws SQLException {
 delegate.setFetchDirection(direction);
}

代码示例来源:origin: Meituan-Dianping/Zebra

@Override
public void setFetchDirection(int direction) throws SQLException {
  innerResultSet.setFetchDirection(direction);
}

代码示例来源:origin: Meituan-Dianping/Zebra

@Override
public void setFetchDirection(int direction) throws SQLException {
  innerResultSet.setFetchDirection(direction);
}

代码示例来源:origin: apache/phoenix

@Override
public void setFetchDirection(int direction) throws SQLException {
  rs.setFetchDirection(direction);
}

代码示例来源:origin: com.alibaba/druid

@Override
public void setFetchDirection(int direction) throws SQLException {
  try {
    rs.setFetchDirection(direction);
  } catch (Throwable t) {
    throw checkException(t);
  }
}

代码示例来源:origin: com.alibaba/druid

@Override
public void resultSet_setFetchDirection(ResultSetProxy rs, int direction) throws SQLException {
  if (this.pos < filterSize) {
    nextFilter()
        .resultSet_setFetchDirection(this, rs, direction);
    return;
  }
  rs.getResultSetRaw()
      .setFetchDirection(direction);
}

代码示例来源:origin: future-architect/uroborosql

/**
 * {@inheritDoc}
 *
 * @see java.sql.ResultSet#setFetchDirection(int)
 */
@Override
public void setFetchDirection(final int direction) throws SQLException {
  wrapped.setFetchDirection(direction);
}

代码示例来源:origin: com.querydsl/querydsl-core

@Override
public void setFetchDirection(int direction) throws SQLException {
  rs.setFetchDirection(direction);
}

代码示例来源:origin: p6spy/p6spy

@Override
public void setFetchDirection(int direction) throws SQLException {
 delegate.setFetchDirection(direction);
}

代码示例来源:origin: com.mchange/mchange-commons-java

public synchronized void setFetchDirection(int a) throws SQLException
{
  inner.setFetchDirection(a);
}

代码示例来源:origin: com.dangdang/sharding-jdbc-core

@Override
public final void setFetchDirection(final int direction) throws SQLException {
  Collection<SQLException> exceptions = new LinkedList<>();
  for (ResultSet each : resultSets) {
    try {
      each.setFetchDirection(direction);
    } catch (final SQLException ex) {
      exceptions.add(ex);
    }
  }
  throwSQLExceptionIfNecessary(exceptions);
}

代码示例来源:origin: com.googlecode.jdbc-proc.jdbc-proc/jdbc-proc-daofactory

public Object convertResultSet(final ResultSet aResultSet, final CallableStatement aStmt) throws SQLException {
  Objects.requireNonNull(aResultSet, "ResultSet is null");
  aResultSet.setFetchDirection(ResultSet.FETCH_FORWARD);
  aResultSet.setFetchSize(1);
  
  return new CloseableIteratorImpl(aResultSet, aStmt) {
    @Override
    protected Object readCurrentRow(ResultSet resultSet) {
      return theBlock.createEntity(aResultSet);
    }
  };
}

代码示例来源:origin: org.apache.commons/commons-dbcp2

@Override
public void setFetchDirection(final int direction) throws SQLException {
  try {
    resultSet.setFetchDirection(direction);
  } catch (final SQLException e) {
    handleException(e);
  }
}

相关文章

微信公众号

最新文章

更多

ResultSet类方法