Package adipe.translate.sql

Examples of adipe.translate.sql.ChainedColumnIndexes


     * @param columnScope       not null
     * @param tableScope        not null
     */
    Scope(ColumnScope columnScope, ChainedColumnIndexes outerAttributes, TableScope tableScope) {
        this.columnScope = checkNotNull(columnScope);
        this.attributes  = new ChainedColumnIndexes(outerAttributes);
        this.tableScope  = checkNotNull(tableScope);
    }
View Full Code Here


            intermediate = intermediate.filter(havingCondition, columnIndexesForHaving());
        }
    }

    private ColumnIndexes columnIndexesForHaving() {
        return new ChainedColumnIndexes(null, intermediate.columns()).columnIndexes();
    }
View Full Code Here

        List<String> selectedStrs = Lists.newArrayList();
        List<Integer> projectionInts = Lists.newArrayList();
        boolean canUseProject = true;
        boolean canOmitProjectSelect = true;
        ColumnIndexesImpl attributesAfterSelection = new ColumnIndexesImpl();
        ChainedColumnIndexes attr =
                new ChainedColumnIndexes(new ChainedColumnIndexes(null, this.columns()));

        int i = 0;

        for (Expression expr : selectElems) {
            ++ i;
            if (expr.codeRefersToConjuredColumn()) {
                try {
                    // TODO fix this - do not even attempt to add a second time here
                    attr.find(expr.conjure().column());
                } catch (IndexOutOfBoundsException ex) {
                    attr.add(expr.conjure().column());
                }
            }
            if (! expr.isSuitableForProject()) {
                canUseProject = false;
            }
            projectionInts.add(expr.conjure().conjuredIndex(attr.columnIndexes()));
            attributesAfterSelection.add(expr.conjure().column());
            if (i > columns().size() || expr.conjure().column() != columns().get(i-1)) {
                canOmitProjectSelect = false;
            }
            selectedStrs.add(expr.code(attr.columnIndexes()));
        }

        if (attributesAfterSelection.size() != columns().size()) {
            canOmitProjectSelect = false;
        }
View Full Code Here

TOP

Related Classes of adipe.translate.sql.ChainedColumnIndexes

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.