Package org.hsqldb.RangeGroup

Examples of org.hsqldb.RangeGroup.RangeGroupSimple


        if (token.tokenType == Tokens.WHERE) {
            read();

            condition = XreadBooleanValueExpression();

            RangeGroup rangeGroup = new RangeGroupSimple(rangeVariables,
                false);
            HsqlList unresolved = condition.resolveColumnReferences(session,
                rangeGroup, rangeGroups, null);

            ExpressionColumn.checkColumnsResolved(unresolved);
View Full Code Here


        Table           baseTable;

        targetRange =
            readRangeVariableForDataChange(StatementTypes.UPDATE_WHERE);
        rangeVariables = new RangeVariable[]{ targetRange };
        rangeGroup     = new RangeGroupSimple(rangeVariables, false);
        table          = rangeVariables[0].rangeTable;
        baseTable      = table.isTriggerUpdatable() ? table
                                                    : table.getBaseTable();

        readThis(Tokens.SET);
View Full Code Here

        sourceRange = readTableOrSubquery();

        RangeVariable[] targetRanges = new RangeVariable[]{ targetRange };

        sourceRange.resolveRangeTable(
            session, new RangeGroupSimple(targetRanges, false), rangeGroups);;
        sourceRange.resolveRangeTableTypes(session, targetRanges);
        compileContext.setOuterRanges(RangeGroup.emptyArray);

        // parse ON search conditions
        readThis(Tokens.ON);

        mergeCondition = XreadBooleanValueExpression();

        RangeVariable[] fullRangeVars   = new RangeVariable[] {
            sourceRange, targetRange
        };
        RangeVariable[] sourceRangeVars = new RangeVariable[]{ sourceRange };
        RangeVariable[] targetRangeVars = new RangeVariable[]{ targetRange };
        RangeGroup fullRangeGroup = new RangeGroupSimple(fullRangeVars, false);
        RangeGroup sourceRangeGroup = new RangeGroupSimple(sourceRangeVars,
            false);

        // parse WHEN clause(s) and convert lists to arrays
        insertColumnMap       = table.getColumnMap();
        insertColumnCheckList = table.getNewColumnCheckList();
View Full Code Here

            if (rangeVariables[i].isLateral) {
                RangeVariable[] rangeVars =
                    (RangeVariable[]) ArrayUtil.resizeArray(rangeVariables, i);

                rangeGroup = new RangeGroupSimple(rangeVars, this);
            } else if (rangeGroups == RangeGroup.emptyArray) {
                rangeGroup = RangeGroup.emptyGroup;
            } else {
                rangeGroup = new RangeGroupSimple(RangeVariable.emptyArray,
                                                  this);
            }

            rangeVariables[i].resolveRangeTable(session, rangeGroup,
                                                rangeGroups);
View Full Code Here

        sessionVariables      = new HashMappedList();
        sessionVariablesRange = new RangeVariable[1];
        sessionVariablesRange[0] = new RangeVariable(sessionVariables, null,
                true, RangeVariable.VARIALBE_RANGE);
        sessionVariableRangeGroups = new RangeGroup[]{
            new RangeGroupSimple(sessionVariablesRange, true) };
        isAutoCommit = Boolean.FALSE;
        isReadOnly   = Boolean.FALSE;
        noSQL        = Boolean.FALSE;
        isInRoutine  = Boolean.FALSE;
    }
View Full Code Here

        }

        generatingExpression.resetColumnReferences();
        generatingExpression.resolveCheckOrGenExpression(
            session,
            new RangeGroupSimple(((Table) table).getDefaultRanges(), false),
            false);

        if (dataType.typeComparisonGroup
                != generatingExpression.getDataType().typeComparisonGroup) {
            throw Error.error(ErrorCode.X_42561);
View Full Code Here

        QuerySpecification s = new QuerySpecification(compileContext);
        RangeVariable range = new RangeVariable(t, null, null, null,
            compileContext);
        RangeVariable[] ranges     = new RangeVariable[]{ range };
        RangeGroup      rangeGroup = new RangeGroupSimple(ranges, false);

        e.resolveCheckOrGenExpression(session, rangeGroup, true);

        if (Type.SQL_BOOLEAN != e.getDataType()) {
            throw Error.error(ErrorCode.X_42568);
View Full Code Here

        if (sourceSet == null) {
            return targetSet;
        }

        RangeGroup rangeGroup = new RangeGroupSimple(rangeVars, false);

        for (int i = 0; i < sourceSet.size(); i++) {
            Expression e = (Expression) sourceSet.get(i);

            targetSet = e.resolveColumnReferences(session, rangeGroup,
View Full Code Here

                    if (rangeGroup.getRangeVariables().length > rangeCount) {
                        RangeVariable[] rangeVars =
                            (RangeVariable[]) ArrayUtil.resizeArray(
                                rangeGroup.getRangeVariables(), rangeCount);

                        rangeGroup = new RangeGroupSimple(rangeVars,
                                                          rangeGroup);
                    }

                    rangeGroups =
                        (RangeGroup[]) ArrayUtil.toAdjustedArray(rangeGroups,
                            rangeGroup, rangeGroups.length, 1);
                    rangeGroup = new RangeGroupSimple(table);
                    rangeCount = 0;
                }

                for (int i = 0; i < nodes.length; i++) {
                    if (nodes[i] == null) {
                        continue;
                    }

                    unresolvedSet = nodes[i].resolveColumnReferences(session,
                            rangeGroup, rangeCount, rangeGroups,
                            unresolvedSet, acceptsSequences);
                }

                return unresolvedSet;
            }
        }

        for (int i = 0; i < nodes.length; i++) {
            if (nodes[i] == null) {
                continue;
            }

            unresolvedSet = nodes[i].resolveColumnReferences(session,
                    rangeGroup, rangeCount, rangeGroups, unresolvedSet,
                    acceptsSequences);
        }

        switch (opType) {

            case OpTypes.ARRAY :
                break;

            case OpTypes.ARRAY_SUBQUERY :
            case OpTypes.ROW_SUBQUERY :
            case OpTypes.TABLE_SUBQUERY : {
                RangeVariable[] rangeVars = rangeGroup.getRangeVariables();

                if (rangeVars.length > rangeCount) {
                    rangeVars =
                        (RangeVariable[]) ArrayUtil.resizeArray(rangeVars,
                            rangeCount);
                    rangeGroup = new RangeGroupSimple(rangeVars, rangeGroup);
                }

                rangeGroups =
                    (RangeGroup[]) ArrayUtil.toAdjustedArray(rangeGroups,
                        rangeGroup, rangeGroups.length, 1);
View Full Code Here

TOP

Related Classes of org.hsqldb.RangeGroup.RangeGroupSimple

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.