本文整理匯總了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
}