Package adipe.translate.sql

Examples of adipe.translate.sql.ColumnNamesImpl


    public ColumnNamesImpl getIc(String tableNameIc) throws AmbiguousNameException, IndexOutOfBoundsException {
        List<ColumnNamesImpl> ts = tablesHere.get(tableNameIc.toLowerCase());
        if (ts.size() > 1) {
            throw new AmbiguousNameException(String.format("The table name '%s' is ambiguous", tableNameIc));
        }
        ColumnNamesImpl table = ts.isEmpty() ? null : ts.get(0);
        if (table == null && outer != null) {
            table = outer.getIc(tableNameIc);
        }
        if (table == null) {
            throw new IndexOutOfBoundsException(String.format("No table '%s' in scope",tableNameIc));
View Full Code Here


                // also add labels with column names
                // TODO refactor this and move to QuietSpreadsheetLayout
                Result result = inputTable.execute();
                ColumnLabels labels = result.getLabels();
                String tableName = tableNamesIter.next();
                ColumnNamesImpl cn = databaseSchema.schemaTable(tableName);
                ColumnIndexesImpl ci = cn.asColumnIndexesLookup();
                Iterator<SimpleColumn> scs = ci.iterator();
                for (Column c : result.getResultRelation()) {
                    SimpleColumn sc = scs.next();
                    labels.put(c, tableName+"."+sc.name());
                }
View Full Code Here

    }

    public ColumnNamesImpl renameColumns(List<String> derivedColumnList) {
        checkState(columns().equals(expandedColumns()));

        ColumnNamesImpl ret = new ColumnNamesImpl();
        Iterator<String> sit = derivedColumnList.iterator();
        for (SimpleColumn sc : columns()) {
            ret.addColumn(sit.next(), sc);
        }
        return ret;
    }
View Full Code Here

TOP

Related Classes of adipe.translate.sql.ColumnNamesImpl

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.