当前位置: 首页>>代码示例>>Java>>正文


Java Statement.getType方法代码示例

本文整理汇总了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;
    }
 
开发者ID:s-store,项目名称:sstore-soft,代码行数:19,代码来源:Result.java

示例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()
                });
            }
        }
    }
 
开发者ID:s-store,项目名称:sstore-soft,代码行数:52,代码来源:ScriptReaderText.java

示例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()
                });
            }
        }
    }
 
开发者ID:RabadanLab,项目名称:Pegasus,代码行数:55,代码来源:ScriptReaderText.java

示例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;
    }
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:16,代码来源:Result.java


注:本文中的org.hsqldb.Statement.getType方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。