in src/main/java/com/aliyun/odps/jdbc/OdpsConnection.java [709:742]
public OdpsStatement createStatement(int resultSetType, int resultSetConcurrency)
throws SQLException {
checkClosed();
boolean isResultSetScrollable;
switch (resultSetType) {
case ResultSet.TYPE_FORWARD_ONLY:
isResultSetScrollable = false;
break;
case ResultSet.TYPE_SCROLL_INSENSITIVE:
isResultSetScrollable = true;
break;
default:
throw new SQLFeatureNotSupportedException(
"only support statement with ResultSet type: TYPE_SCROLL_INSENSITIVE, ResultSet.TYPE_FORWARD_ONLY");
}
switch (resultSetConcurrency) {
case ResultSet.CONCUR_READ_ONLY:
break;
default:
throw new SQLFeatureNotSupportedException(
"only support statement with ResultSet concurrency: CONCUR_READ_ONLY");
}
OdpsStatement stmt;
if (async) {
stmt = new OdpsAsyncStatement(this, isResultSetScrollable);
} else {
stmt = new OdpsStatement(this, isResultSetScrollable);
}
stmtHandles.add(stmt);
return stmt;
}