Examples of IntKeyHashMap


Examples of org.hsqldb.lib.IntKeyHashMap

            Expression e      = parseExpression();

            if (isCompilingView()) {
                if (e.getType() == Expression.ASTERISK) {
                    if (select.asteriskPositions == null) {
                        select.asteriskPositions = new IntKeyHashMap();
                    }

                    // remember the position of the asterisk. For the moment, just
                    // remember the expression, so it can later be found and replaced
                    // with the concrete column list
View Full Code Here

Examples of org.hsqldb.lib.IntKeyHashMap

      i = this.tokenizer.getPosition();
      localObject1 = parseExpression();
      if ((isCompilingView()) && (((Expression)localObject1).getType() == 6))
      {
        if (localSelect.asteriskPositions == null)
          localSelect.asteriskPositions = new IntKeyHashMap();
        localSelect.asteriskPositions.put(i, localObject1);
      }
      str = this.tokenizer.getString();
      if (this.tokenizer.wasThis("AS"))
      {
View Full Code Here

Examples of org.hsqldb.lib.IntKeyHashMap

public class ScriptRunner
{
  public static void runScript(Database paramDatabase, String paramString, int paramInt)
    throws HsqlException
  {
    IntKeyHashMap localIntKeyHashMap = new IntKeyHashMap();
    Session localSession1 = paramDatabase.getSessionManager().getSysSession();
    Session localSession2 = localSession1;
    int i = 0;
    paramDatabase.setReferentialIntegrity(false);
    ScriptReaderBase localScriptReaderBase = null;
    try
    {
      StopWatch localStopWatch = new StopWatch();
      localScriptReaderBase = ScriptReaderBase.newScriptReader(paramDatabase, paramString, paramInt);
      while (localScriptReaderBase.readLoggedStatement(localSession2))
      {
        int j = localScriptReaderBase.getSessionNumber();
        if (i != j)
        {
          i = j;
          localSession2 = (Session)localIntKeyHashMap.get(i);
          if (localSession2 == null)
          {
            localSession2 = paramDatabase.getSessionManager().newSession(paramDatabase, localSession1.getUser(), false, true);
            localIntKeyHashMap.put(i, localSession2);
          }
        }
        if (localSession2.isClosed())
        {
          localIntKeyHashMap.remove(i);
          continue;
        }
        Result localResult = null;
        Object[] arrayOfObject;
        switch (localScriptReaderBase.getStatementType())
        {
        case 1:
          localResult = localSession2.sqlExecuteDirectNoPreChecks(localScriptReaderBase.getLoggedStatement());
          if ((localResult == null) || (!localResult.isError()))
            break;
          if (localResult.getException() != null)
            throw localResult.getException();
          throw Trace.error(localResult);
        case 4:
          localScriptReaderBase.getCurrentSequence().reset(localScriptReaderBase.getSequenceValue());
          break;
        case 5:
          localSession2.commit();
          break;
        case 3:
          arrayOfObject = localScriptReaderBase.getData();
          localScriptReaderBase.getCurrentTable().insertNoCheckFromLog(localSession2, arrayOfObject);
          break;
        case 2:
          arrayOfObject = localScriptReaderBase.getData();
          localScriptReaderBase.getCurrentTable().deleteNoCheckFromLog(localSession2, arrayOfObject);
          break;
        case 7:
          localSession2.setSchema(localScriptReaderBase.getCurrentSchema());
        case 6:
        }
        if (!localSession2.isClosed())
          continue;
        localIntKeyHashMap.remove(i);
      }
    }
    catch (Throwable localThrowable)
    {
      if (!(localThrowable instanceof EOFException))
View Full Code Here

Examples of org.hsqldb.lib.IntKeyHashMap

  private int next_cs_id;

  CompiledStatementManager(Database paramDatabase)
  {
    this.database = paramDatabase;
    this.schemaMap = new IntKeyHashMap();
    this.sqlLookup = new IntKeyHashMap();
    this.csidMap = new IntKeyHashMap();
    this.sessionUseMap = new IntKeyHashMap();
    this.useMap = new IntKeyIntValueHashMap();
    this.next_cs_id = 0;
  }
View Full Code Here

Examples of org.hsqldb.lib.IntKeyHashMap

    {
      if (this.indexArrayKeepMap == null)
      {
        if (paramNode == null)
          return;
        this.indexArrayKeepMap = new IntKeyHashMap();
      }
      this.indexArrayKeepMap.put(paramHsqlName.hashCode(), paramNode);
    }
    else
    {
      if (this.indexArrayMap == null)
      {
        if (paramNode == null)
          return;
        this.indexArrayMap = new IntKeyHashMap();
      }
      this.indexArrayMap.put(paramHsqlName.hashCode(), paramNode);
    }
  }
View Full Code Here

Examples of org.hsqldb_voltpatches.lib.IntKeyHashMap

     *      manage compiled statement objects.
     */
    StatementManager(Database database) {

        this.database = database;
        schemaMap     = new IntKeyHashMap();
        sqlLookup     = new LongKeyHashMap();
        csidMap       = new LongKeyHashMap();
        sessionUseMap = new LongKeyHashMap();
        useMap        = new LongKeyIntValueHashMap();
        next_cs_id    = 0;
View Full Code Here

Examples of org.hsqldb_voltpatches.lib.IntKeyHashMap

     *  transaction rollback.
     */
    public static void runScript(Database database, String logFilename,
                                 int logType) {

        IntKeyHashMap sessionMap = new IntKeyHashMap();
        Session       current    = null;
        int           currentId  = 0;

        database.setReferentialIntegrity(false);

        ScriptReaderBase scr = null;
        String           statement;
        int              statementType;

        try {
            StopWatch sw = new StopWatch();

            scr = ScriptReaderBase.newScriptReader(database, logFilename,
                                                   logType);

            while (scr.readLoggedStatement(current)) {
                int sessionId = scr.getSessionNumber();

                if (current == null || currentId != sessionId) {
                    currentId = sessionId;
                    current   = (Session) sessionMap.get(currentId);

                    if (current == null) {
                        current =
                            database.getSessionManager().newSession(database,
                                database.getUserManager().getSysUser(), false,
                                true, 0);

                        sessionMap.put(currentId, current);
                    }
                }

                if (current.isClosed()) {
                    sessionMap.remove(currentId);

                    continue;
                }

                Result result = null;

                statementType = scr.getStatementType();

                switch (statementType) {

                    case ScriptReaderBase.ANY_STATEMENT :
                        statement = scr.getLoggedStatement();
                        result    = current.executeDirectStatement(statement);

                        if (result != null && result.isError()) {
                            if (result.getException() != null) {
                                throw result.getException();
                            }

                            throw Error.error(result);
                        }
                        break;

                    case ScriptReaderBase.SEQUENCE_STATEMENT :
                        scr.getCurrentSequence().reset(scr.getSequenceValue());
                        break;

                    case ScriptReaderBase.COMMIT_STATEMENT :
                        current.commit(false);
                        break;

                    case ScriptReaderBase.INSERT_STATEMENT : {
                        current.beginAction(null);

                        Object[] data = scr.getData();

                        scr.getCurrentTable().insertNoCheckFromLog(current,
                                data);
                        current.endAction(Result.updateOneResult);

                        break;
                    }
                    case ScriptReaderBase.DELETE_STATEMENT : {
                        current.beginAction(null);

                        Object[] data = scr.getData();

                        scr.getCurrentTable().deleteNoCheckFromLog(current,
                                data);
                        current.endAction(Result.updateOneResult);

                        break;
                    }
                    case ScriptReaderBase.SET_SCHEMA_STATEMENT : {
                        current.setSchema(scr.getCurrentSchema());
                    }
                }

                if (current.isClosed()) {
                    sessionMap.remove(currentId);
                }
            }
        } catch (Throwable e) {
            String message;

View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.