Package org.hsqldb.lib

Examples of org.hsqldb.lib.HashMappedList


            for (int i = subqueryDepth; i >= 0; i--) {
                if (namedSubqueries.size() <= i) {
                    continue;
                }

                HashMappedList set = (HashMappedList) namedSubqueries.get(i);

                if (set == null) {
                    continue;
                }

                SubQuery sq = (SubQuery) set.get(name);

                if (sq != null) {
                    return sq;
                }
            }
View Full Code Here


            String name = collation.getName().statementName;

            list.add("SET DATABASE COLLATION " + name);
        }

        HashMappedList lobTables =
            schemaManager.getTables(SqlInvariants.LOBS_SCHEMA);

        for (int i = 0; i < lobTables.size(); i++) {
            Table table = (Table) lobTables.get(i);

            if (table.isCached()) {
                StringBuffer sb = new StringBuffer();

                sb.append(Tokens.T_SET).append(' ').append(Tokens.T_TABLE);
View Full Code Here

     * Creates special users PUBLIC_USER_NAME and SYSTEM_AUTHORIZATION_NAME.
     * Sets up association with the GranteeManager for this database.
     */
    public UserManager(Database database) {
        granteeManager = database.getGranteeManager();
        userList       = new HashMappedList();
    }
View Full Code Here

        // type may have changed above for CACHED tables
        tableType         = type;
        primaryKeyCols    = null;
        primaryKeyTypes   = null;
        identityColumn    = -1;
        columnList        = new HashMappedList();
        indexList         = Index.emptyArray;
        constraintList    = Constraint.emptyArray;
        fkConstraints     = Constraint.emptyArray;
        fkMainConstraints = Constraint.emptyArray;
        checkConstraints  = Constraint.emptyArray;
View Full Code Here

                        tables = new Table[]{ table };

                        StatementSchema.checkSchemaUpdateAuthorisation(session,
                                name.schema);
                    } else {
                        HashMappedList list =
                            session.database.schemaManager.getTables(
                                name.name);

                        tables = new Table[list.size()];

                        list.toValuesArray(tables);
                        StatementSchema.checkSchemaUpdateAuthorisation(session,
                                name);
                    }

                    for (int i = 0; i < tables.length; i++) {
View Full Code Here

            case SchemaObject.PROCEDURE :
            case SchemaObject.FUNCTION :
            case SchemaObject.SPECIFIC_ROUTINE :
            case SchemaObject.ASSERTION :
            case SchemaObject.TRIGGER :
                map = new HashMappedList();
                break;

            case SchemaObject.COLUMN :
            case SchemaObject.CONSTRAINT :
            case SchemaObject.INDEX :
View Full Code Here

                if (SqlInvariants.isSystemSchemaName(name)) {
                    continue;
                }

                HashMappedList current = getTables(name);

                alltables.addAll(current.values());
            }

            return alltables;
        } finally {
            readLock.unlock();
View Full Code Here

    }

    //
    private void setVariables() {

        HashMappedList list = new HashMappedList();

        if (variables.length == 0) {
            if (parent == null) {
                rangeVariables = root.getParameterRangeVariables();
            } else {
                rangeVariables = parent.rangeVariables;
            }

            scopeVariables = list;

            return;
        }

        if (parent != null && parent.scopeVariables != null) {
            for (int i = 0; i < parent.scopeVariables.size(); i++) {
                list.add(parent.scopeVariables.getKey(i),
                         parent.scopeVariables.get(i));
            }
        }

        for (int i = 0; i < variables.length; i++) {
            String  name  = variables[i].getName().name;
            boolean added = list.add(name, variables[i]);

            if (!added) {
                throw Error.error(ErrorCode.X_42606, name);
            }

            if (root.getParameterIndex(name) != -1) {
                throw Error.error(ErrorCode.X_42606, name);
            }
        }

        scopeVariables = list;

        RangeVariable[] parameterRangeVariables =
            root.getParameterRangeVariables();
        RangeVariable range = new RangeVariable(list, null, true,
            RangeVariable.VARIALBE_RANGE);

        rangeVariables = new RangeVariable[parameterRangeVariables.length + 1];

        for (int i = 0; i < parameterRangeVariables.length; i++) {
            rangeVariables[i] = parameterRangeVariables[i];
        }

        rangeVariables[parameterRangeVariables.length] = range;
        root.variableCount                             = list.size();
    }
View Full Code Here

        if (tables.length == 0) {
            return;
        }

        HashMappedList list = new HashMappedList();

        if (parent != null && parent.scopeTables != null) {
            for (int i = 0; i < parent.scopeTables.size(); i++) {
                list.add(parent.scopeTables.getKey(i),
                         parent.scopeTables.get(i));
            }
        }

        for (int i = 0; i < tables.length; i++) {
            String  name  = tables[i].getName().name;
            boolean added = list.add(name, tables[i]);

            if (!added) {
                throw Error.error(ErrorCode.X_42606, name);
            }
        }
View Full Code Here

    }

    void createResultTable(Session session) {

        HsqlName       tableName;
        HashMappedList columnList;
        int            tableType;

        tableName = session.database.nameManager.getSubqueryTableName();
        tableType = persistenceScope == TableBase.SCOPE_STATEMENT
                    ? TableBase.SYSTEM_SUBQUERY
View Full Code Here

TOP

Related Classes of org.hsqldb.lib.HashMappedList

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.