本文整理汇总了Java中org.hsqldb.Statement.getType方法的典型用法代码示例。如果您正苦于以下问题:Java Statement.getType方法的具体用法?Java Statement.getType怎么用?Java Statement.getType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.hsqldb.Statement
的用法示例。
在下文中一共展示了Statement.getType方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: newPrepareResponse
import org.hsqldb.Statement; //导入方法依赖的package包/类
public static Result newPrepareResponse(Statement statement) {
Result r = newResult(ResultConstants.PREPARE_ACK);
r.statement = statement;
r.statementID = statement.getID();
int csType = statement.getType();
r.statementReturnType =
(csType == StatementTypes.SELECT_CURSOR || csType == StatementTypes
.CALL) ? StatementTypes.RETURN_RESULT
: StatementTypes.RETURN_COUNT;
r.metaData = statement.getResultMetaData();
r.parameterMetaData = statement.getParametersMetaData();
return r;
}
示例2: readDDL
import org.hsqldb.Statement; //导入方法依赖的package包/类
protected void readDDL(Session session) throws IOException {
for (; readLoggedStatement(session); ) {
Statement cs = null;
Result result = null;
if (rowIn.getStatementType() == INSERT_STATEMENT) {
isInsert = true;
break;
}
try {
cs = session.compileStatement(statement);
result = session.executeCompiledStatement(cs,
ValuePool.emptyObjectArray);
if (cs.getType() == StatementTypes.CREATE_SCHEMA) {
HsqlName name = cs.getSchemalName();
session.setSchema(name.name);
}
} catch (HsqlException e) {
result = Result.newErrorResult(e);
}
if (result.isError()) {
// handle grants on math and library routines in old versions
if (cs == null) {}
else {
if (cs.getType() == StatementTypes.GRANT) {
continue;
}
}
//
}
if (result.isError()) {
db.logger.appLog.logContext(SimpleLog.LOG_ERROR,
result.getMainString());
throw Error.error(ErrorCode.ERROR_IN_SCRIPT_FILE,
ErrorCode.M_DatabaseScriptReader_readDDL,
new Object[] {
new Integer(lineCount), result.getMainString()
});
}
}
}
示例3: readDDL
import org.hsqldb.Statement; //导入方法依赖的package包/类
protected void readDDL(Session session) {
for (; readLoggedStatement(session); ) {
Statement cs = null;
Result result = null;
if (rowIn.getStatementType() == INSERT_STATEMENT) {
isInsert = true;
break;
}
try {
cs = session.compileStatement(statement);
result = session.executeCompiledStatement(cs,
ValuePool.emptyObjectArray);
} catch (HsqlException e) {
result = Result.newErrorResult(e);
}
if (result.isError()) {
// handle grants on math and library routines in old versions
if (cs == null) {}
else if (cs.getType() == StatementTypes.GRANT) {
continue;
} else if (cs.getType() == StatementTypes.CREATE_ROUTINE) {
// ignore legacy references
if (result.getMainString().contains(
"org.hsqldb.Library")) {
continue;
}
}
}
if (result.isError()) {
database.logger.logWarningEvent(result.getMainString(),
result.getException());
if (cs != null
&& cs.getType() == StatementTypes.CREATE_ROUTINE) {
continue;
}
throw Error.error(result.getException(),
ErrorCode.ERROR_IN_SCRIPT_FILE,
ErrorCode.M_DatabaseScriptReader_read,
new Object[] {
new Integer(lineCount), result.getMainString()
});
}
}
}
示例4: newPrepareResponse
import org.hsqldb.Statement; //导入方法依赖的package包/类
public static Result newPrepareResponse(Statement statement) {
Result r = newResult(ResultConstants.PREPARE_ACK);
r.statement = statement;
r.statementID = statement.getID();
int csType = statement.getType();
r.statementReturnType = statement.getStatementReturnType();
r.metaData = statement.getResultMetaData();
r.parameterMetaData = statement.getParametersMetaData();
return r;
}