Package org.hsqldb

Examples of org.hsqldb.Result


                isInsert = true;

                break;
            }

            Result result = session.sqlExecuteDirectNoPreChecks(statement);

            if (result != null && result.mode == ResultConstants.ERROR) {
                db.logger.appLog.logContext(result.getException());

                /** @todo fredt - if unavaialble external functions are to be ignored */
                throw Trace.error(Trace.ERROR_IN_SCRIPT_FILE,
                                  Trace.DatabaseScriptReader_readDDL,
                                  new Object[] {
                    new Integer(lineCount), result.getMainString()
                });
            }
        }
    }
View Full Code Here


     */
    protected void finishStream() throws IOException {}

    protected void writeDDL() throws IOException, HsqlException {

        Result ddlPart = DatabaseScript.getScript(database,
            !includeCachedData);

        writeSingleColumnResult(ddlPart);
    }
View Full Code Here

     */
//#ifdef JDBC3
    public synchronized Savepoint setSavepoint(String name)
    throws SQLException {

        Result req;

        checkClosed();

        if (name == null) {
            String msg = "name is null";
View Full Code Here

    public synchronized void rollback(Savepoint savepoint)
    throws SQLException {

        String        msg;
        jdbcSavepoint sp;
        Result        req;

        checkClosed();

        if (savepoint == null) {
            msg = "savepoint is null";

            throw Util.sqlException(Trace.INVALID_JDBC_ARGUMENT, msg);
        }

        try {
            if (sessionProxy.isAutoCommit()) {
                msg = "connection is autocommit";

                throw Util.sqlException(Trace.INVALID_JDBC_ARGUMENT, msg);
            }
        } catch (HsqlException e) {
            throw Util.sqlException(e);
        }

// fredt - might someone call this with a Savepoint from a different driver???
        if (!(savepoint instanceof jdbcSavepoint)) {
            throw Util.sqlException(Trace.INVALID_JDBC_ARGUMENT);
        }

        sp = (jdbcSavepoint) savepoint;

        if (this != sp.connection) {
            msg = savepoint + " was not issued on this connection";

            throw Util.sqlException(Trace.INVALID_JDBC_ARGUMENT, msg);
        }

        req = Result.newRollbackToSavepointRequest(sp.name);

        try {
            Result result = sessionProxy.execute(req);

            if (result.mode == ResultConstants.ERROR) {
                Util.throwError(result);
            }
        } catch (HsqlException e) {
View Full Code Here

    public synchronized void releaseSavepoint(Savepoint savepoint)
    throws SQLException {

        String        msg;
        jdbcSavepoint sp;
        Result        req;

        checkClosed();

        if (savepoint == null) {
            msg = "savepoint is null";

            throw Util.sqlException(Trace.INVALID_JDBC_ARGUMENT, msg);
        }

// fredt - might someone call this with a Savepoint from a different driver???
        if (!(savepoint instanceof jdbcSavepoint)) {
            throw Util.sqlException(Trace.INVALID_JDBC_ARGUMENT);
        }

        sp = (jdbcSavepoint) savepoint;

        if (this != sp.connection) {
            msg = savepoint.getSavepointName()
                  + " was not issued on this connection";

            throw Util.sqlException(Trace.INVALID_JDBC_ARGUMENT, msg);
        }

        req = Result.newReleaseSavepointRequest(sp.name);

        try {
            Result result = sessionProxy.execute(req);

            if (result.mode == ResultConstants.ERROR) {
                Util.throwError(result);
            }
        } catch (HsqlException e) {
View Full Code Here

        if (isEscapeProcessing) {
            sql = connection.nativeSQL(sql);
        }

        if (batchResultOut == null) {
            batchResultOut = new Result(ResultConstants.BATCHEXECDIRECT,
                                        new int[]{ Types.VARCHAR }, 0);
        }

        batchResultOut.add(new Object[]{ sql });
    }
View Full Code Here

        checkClosed();
        connection.clearWarningsNoCheck();

        if (batchResultOut == null) {
            batchResultOut = new Result(ResultConstants.BATCHEXECDIRECT,
                                        new int[]{ Types.VARCHAR }, 0);
        }

        batchCount = batchResultOut.getSize();
View Full Code Here

  }

  protected void readDDL(Session paramSession)
    throws IOException, HsqlException
  {
    Result localResult1 = Result.read(this.rowIn, this.dataStreamIn);
    Iterator localIterator = localResult1.iterator();
    while (localIterator.hasNext())
    {
      Object[] arrayOfObject = (Object[])localIterator.next();
      String str = (String)arrayOfObject[0];
      Result localResult2 = paramSession.sqlExecuteDirectNoPreChecks(str);
      if (!localResult2.isError())
        continue;
      this.db.logger.appLog.logContext(SimpleLog.LOG_ERROR, localResult2.getMainString());
      throw Trace.error(localResult2);
    }
  }
View Full Code Here

      {
        this.isInsert = true;
      }
      else
      {
        Result localResult = paramSession.sqlExecuteDirectNoPreChecks(this.statement);
        if ((localResult == null) || (!localResult.isError()))
          continue;
        this.db.logger.appLog.logContext(SimpleLog.LOG_ERROR, localResult.getMainString());
        HsqlException localHsqlException = Trace.error(78, 113, new Object[] { new Integer(this.lineCount), localResult.getMainString() });
        throw localHsqlException;
      }
  }
View Full Code Here

  }

  protected void writeDDL()
    throws IOException, HsqlException
  {
    Result localResult = DatabaseScript.getScript(this.database, !this.includeCachedData);
    writeSingleColumnResult(localResult);
  }
View Full Code Here

TOP

Related Classes of org.hsqldb.Result

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.