Package com.foundationdb.sql.optimizer.plan

Examples of com.foundationdb.sql.optimizer.plan.TableSource


        JoinEnumerator.addTables(joins, tables);
        Map<Table, TableSource> sources = new HashMap<>();

        for (Joinable table: tables) {
            if (table instanceof TableSource) {
                TableSource tableSource = (TableSource)table;
                sources.put(tableSource.getTable().getTable(), tableSource);
            }
        }
       
        for (Joinable table: tables) {
            if (table instanceof TableSource) {
                TableSource tableSource = (TableSource) table;
                checkFKParents (tableSource.getTable().getTable(), tableSource, sources, equivalencies);
            }
        }
    }
View Full Code Here


    }
   
    private void checkFKParents(Table child, TableSource tableSource,  Map<Table, TableSource> sources, EquivalenceFinder<ColumnExpression> equivelances) {
        for (ForeignKey key : child.getReferencingForeignKeys()) {
            if (checkParentFKIsPK (key, child)) {
                TableSource parentSource = sources.get(key.getReferencedTable());
                if (parentSource == null) {
                    parentSource = generateTableSource(key.getReferencedTable());
                    sources.put(key.getReferencedTable(), parentSource);
                }
                checkFKParents (key.getReferencedTable(), parentSource, sources, equivelances);
View Full Code Here

        }
        return false;
    }
   
    private TableSource generateTableSource (Table table) {
        return new TableSource (new TableNode (table, new TableTree()), true, table.getName().toString());
    }
View Full Code Here

    private ColumnExpression expressionFromColumn(Column col, TableSource source) {
       
        if (source == null) {
            Table table = col.getTable();
            TableNode node = new TableNode(table, new TableTree());
            source = new TableSource(node, true, table.getName().toString());
        }
        return new ColumnExpression(source, col);
    }
View Full Code Here

TOP

Related Classes of com.foundationdb.sql.optimizer.plan.TableSource

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.