Examples of childrenWithName()


Examples of org.modeshape.sequencer.ddl.node.AstNode.childrenWithName()

                // find appropriate table nodes
                if (tableIndex) {
                    // table index so find table node
                    final String tableName = (String)indexNode.getProperty(OracleDdlLexicon.TABLE_NAME);
                    final AstNode parent = indexNode.getParent();
                    final List<AstNode> nodes = parent.childrenWithName(tableName);

                    if (!nodes.isEmpty()) {
                        if (nodes.size() == 1) {
                            tableNodes = nodes;
                        } else {
View Full Code Here

Examples of org.modeshape.sequencer.ddl.node.AstNode.childrenWithName()

        final AstNode tableNode = this.rootNode.getChildren().get(0);
        assertThat(tableNode.getName(), is("EL$VIS"));
        assertThat(tableNode.getChildCount(), is(3)); // 3 columns

        assertThat(tableNode.childrenWithName("COL_A").size(), is(1));
        assertThat(tableNode.childrenWithName("COL@B").size(), is(1));
        assertThat(tableNode.childrenWithName("COL#C").size(), is(1));
    }

}
View Full Code Here

Examples of org.modeshape.sequencer.ddl.node.AstNode.childrenWithName()

        final AstNode tableNode = this.rootNode.getChildren().get(0);
        assertThat(tableNode.getName(), is("EL$VIS"));
        assertThat(tableNode.getChildCount(), is(3)); // 3 columns

        assertThat(tableNode.childrenWithName("COL_A").size(), is(1));
        assertThat(tableNode.childrenWithName("COL@B").size(), is(1));
        assertThat(tableNode.childrenWithName("COL#C").size(), is(1));
    }

}
View Full Code Here

Examples of org.modeshape.sequencer.ddl.node.AstNode.childrenWithName()

        assertThat(tableNode.getName(), is("EL$VIS"));
        assertThat(tableNode.getChildCount(), is(3)); // 3 columns

        assertThat(tableNode.childrenWithName("COL_A").size(), is(1));
        assertThat(tableNode.childrenWithName("COL@B").size(), is(1));
        assertThat(tableNode.childrenWithName("COL#C").size(), is(1));
    }

}
View Full Code Here

Examples of org.modeshape.sequencer.ddl.node.AstNode.childrenWithName()

        assertThat(alterOptionsNode.getName(), is("myProc"));
        assertMixinType(alterOptionsNode, TeiidDdlLexicon.AlterOptions.PROCEDURE_STATEMENT);
        assertProperty(alterOptionsNode, TeiidDdlLexicon.SchemaElement.TYPE, SchemaElementType.FOREIGN.toDdl());
        assertProperty(alterOptionsNode, TeiidDdlLexicon.AlterOptions.REFERENCE, this.procedureRefNode);
        assertThat(alterOptionsNode.childrenWithName("p1").size(), is(1));
    }

    @Test
    public void shouldParseAlterForeignProcedureWithOptionsList() {
        final String content = "ALTER FOREIGN PROCEDURE myProc OPTIONS (ADD cardinality 100)";
View Full Code Here

Examples of org.modeshape.sequencer.ddl.node.AstNode.childrenWithName()

        assertThat(alterOptionsNode.getName(), is("myProc"));
        assertMixinType(alterOptionsNode, TeiidDdlLexicon.AlterOptions.PROCEDURE_STATEMENT);
        assertProperty(alterOptionsNode, TeiidDdlLexicon.SchemaElement.TYPE, SchemaElementType.FOREIGN.toDdl());
        assertProperty(alterOptionsNode, TeiidDdlLexicon.AlterOptions.REFERENCE, this.procedureRefNode);
        assertThat(alterOptionsNode.childrenWithName(TeiidDdlLexicon.AlterOptions.ALTERS).size(), is(1));
    }

    @Test
    public void shouldParseAlterForeignTableWithColumnOptions() {
        final String content = "ALTER FOREIGN TABLE foo ALTER COLUMN bar OPTIONS (ADD cardinality 100)";
View Full Code Here

Examples of org.modeshape.sequencer.ddl.node.AstNode.childrenWithName()

        assertThat(alterOptionsNode.getName(), is("foo"));
        assertMixinType(alterOptionsNode, TeiidDdlLexicon.AlterOptions.TABLE_STATEMENT);
        assertProperty(alterOptionsNode, TeiidDdlLexicon.SchemaElement.TYPE, SchemaElementType.FOREIGN.toDdl());
        assertProperty(alterOptionsNode, TeiidDdlLexicon.AlterOptions.REFERENCE, this.tableRefNode);
        assertThat(alterOptionsNode.childrenWithName("bar").size(), is(1));
    }

    @Test
    public void shouldParseAlterForeignTableWithOptionsList() {
        final String content = "ALTER FOREIGN TABLE foo OPTIONS (ADD cardinality 100)";
View Full Code Here

Examples of org.modeshape.sequencer.ddl.node.AstNode.childrenWithName()

        assertThat(alterOptionsNode.getName(), is("foo"));
        assertMixinType(alterOptionsNode, TeiidDdlLexicon.AlterOptions.TABLE_STATEMENT);
        assertProperty(alterOptionsNode, TeiidDdlLexicon.SchemaElement.TYPE, SchemaElementType.FOREIGN.toDdl());
        assertProperty(alterOptionsNode, TeiidDdlLexicon.AlterOptions.REFERENCE, this.tableRefNode);
        assertThat(alterOptionsNode.childrenWithName(TeiidDdlLexicon.AlterOptions.ALTERS).size(), is(1));
    }

    @Test
    public void shouldParseAlterForeignViewWithColumnOptions() {
        final String content = "ALTER FOREIGN VIEW G1 ALTER COLUMN e1 OPTIONS (ADD cardinality 100)";
View Full Code Here

Examples of org.modeshape.sequencer.ddl.node.AstNode.childrenWithName()

        assertThat(alterOptionsNode.getName(), is("G1"));
        assertMixinType(alterOptionsNode, TeiidDdlLexicon.AlterOptions.VIEW_STATEMENT);
        assertProperty(alterOptionsNode, TeiidDdlLexicon.SchemaElement.TYPE, SchemaElementType.FOREIGN.toDdl());
        assertProperty(alterOptionsNode, TeiidDdlLexicon.AlterOptions.REFERENCE, this.viewRefNode);
        assertThat(alterOptionsNode.childrenWithName("e1").size(), is(1));
    }

    @Test
    public void shouldParseAlterForeignViewWithOptionsList() {
        final String content = "ALTER FOREIGN VIEW G1 OPTIONS (ADD cardinality 100)";
View Full Code Here

Examples of org.modeshape.sequencer.ddl.node.AstNode.childrenWithName()

        assertThat(alterOptionsNode.getName(), is("G1"));
        assertMixinType(alterOptionsNode, TeiidDdlLexicon.AlterOptions.VIEW_STATEMENT);
        assertProperty(alterOptionsNode, TeiidDdlLexicon.SchemaElement.TYPE, SchemaElementType.FOREIGN.toDdl());
        assertProperty(alterOptionsNode, TeiidDdlLexicon.AlterOptions.REFERENCE, this.viewRefNode);
        assertThat(alterOptionsNode.childrenWithName(TeiidDdlLexicon.AlterOptions.ALTERS).size(), is(1));
    }

    @Test
    public void shouldParseAlterImplicitProcedureWithColumnOptions() {
        final String content = "ALTER PROCEDURE myProc ALTER PARAMETER p1 OPTIONS (ADD cardinality 100)";
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.