本文整理汇总了Java中java.sql.Statement.CLOSE_CURRENT_RESULT属性的典型用法代码示例。如果您正苦于以下问题:Java Statement.CLOSE_CURRENT_RESULT属性的具体用法?Java Statement.CLOSE_CURRENT_RESULT怎么用?Java Statement.CLOSE_CURRENT_RESULT使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类java.sql.Statement
的用法示例。
在下文中一共展示了Statement.CLOSE_CURRENT_RESULT属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getMoreResults
@Override
public boolean getMoreResults(int current) throws SQLException
{
checkClosed();
switch(current)
{
case Statement.KEEP_CURRENT_RESULT:
this.openResults.add(this.result);
this.result = null;
this.lastUpdateCount = -1;
break;
case Statement.CLOSE_CURRENT_RESULT:
closeCurrentResult();
break;
case Statement.CLOSE_ALL_RESULTS:
closeCurrentResult();
closeAllOpenResults();
break;
default:
throw SQLError.get(SQLError.ILLEGAL_ARGUMENT, current);
}
if (current != Statement.CLOSE_ALL_RESULTS)
{
this.tableResultIndex++;
if (this.tableResultIndex < this.tableResults.length)
{
VoltTable table = this.tableResults[this.tableResultIndex];
if (VoltSQL.isUpdateResult(table)) {
this.lastUpdateCount = (int)table.fetchRow(0).getLong(0);
} else
{
this.result = createTrimmedResultSet(table);
return true;
}
}
}
return false;
}
示例2: getResultSetHoldability
public int getResultSetHoldability() throws SQLException {
try {
if (this.wrappedStmt != null) {
return this.wrappedStmt.getResultSetHoldability();
}
throw SQLError.createSQLException("Statement already closed", SQLError.SQL_STATE_ILLEGAL_ARGUMENT, this.exceptionInterceptor);
} catch (SQLException sqlEx) {
checkAndFireConnectionError(sqlEx);
}
return Statement.CLOSE_CURRENT_RESULT;
}
示例3: getHoldability
/**
* @see Connection#getHoldability()
*/
public int getHoldability() throws SQLException {
checkClosed();
try {
return this.mc.getHoldability();
} catch (SQLException sqlException) {
checkAndFireConnectionError(sqlException);
}
return Statement.CLOSE_CURRENT_RESULT; // we don't reach this code,
// compiler can't tell
}