Examples of childrenWithName()


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

            // options
            assertThat(e5.getChildren(StandardDdlLexicon.TYPE_STATEMENT_OPTION).size(), is(3));
            assertThat(e5.childrenWithName("UUID").size(), is(1));
            assertProperty(e5.childrenWithName("UUID").get(0), StandardDdlLexicon.VALUE, "uuid");
            assertThat(e5.childrenWithName("NAMEINSOURCE").size(), is(1));
            assertProperty(e5.childrenWithName("NAMEINSOURCE").get(0), StandardDdlLexicon.VALUE, "nis");
            assertThat(e5.childrenWithName("SELECTABLE").size(), is(1));
            assertProperty(e5.childrenWithName("SELECTABLE").get(0), StandardDdlLexicon.VALUE, "NO");
        }

        { // column e6
View Full Code Here

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

            assertThat(e5.getChildren(StandardDdlLexicon.TYPE_STATEMENT_OPTION).size(), is(3));
            assertThat(e5.childrenWithName("UUID").size(), is(1));
            assertProperty(e5.childrenWithName("UUID").get(0), StandardDdlLexicon.VALUE, "uuid");
            assertThat(e5.childrenWithName("NAMEINSOURCE").size(), is(1));
            assertProperty(e5.childrenWithName("NAMEINSOURCE").get(0), StandardDdlLexicon.VALUE, "nis");
            assertThat(e5.childrenWithName("SELECTABLE").size(), is(1));
            assertProperty(e5.childrenWithName("SELECTABLE").get(0), StandardDdlLexicon.VALUE, "NO");
        }

        { // column e6
            assertThat(tableNode.childrenWithName("e6").size(), is(1));
View Full Code Here

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

            assertThat(e5.childrenWithName("UUID").size(), is(1));
            assertProperty(e5.childrenWithName("UUID").get(0), StandardDdlLexicon.VALUE, "uuid");
            assertThat(e5.childrenWithName("NAMEINSOURCE").size(), is(1));
            assertProperty(e5.childrenWithName("NAMEINSOURCE").get(0), StandardDdlLexicon.VALUE, "nis");
            assertThat(e5.childrenWithName("SELECTABLE").size(), is(1));
            assertProperty(e5.childrenWithName("SELECTABLE").get(0), StandardDdlLexicon.VALUE, "NO");
        }

        { // column e6
            assertThat(tableNode.childrenWithName("e6").size(), is(1));
            final AstNode e6 = tableNode.childrenWithName("e6").get(0);
View Full Code Here

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

        assertMixinType(tableNode, TeiidDdlLexicon.CreateTable.TABLE_STATEMENT);
        assertProperty(tableNode, TeiidDdlLexicon.SchemaElement.TYPE, SchemaElementType.FOREIGN.toDdl());

        // columns
        assertThat(tableNode.getChildren(TeiidDdlLexicon.Constraint.TABLE_ELEMENT).size(), is(2));
        assertThat(tableNode.childrenWithName("e1").size(), is(1));
        assertProperty(tableNode.childrenWithName("e1").get(0), StandardDdlLexicon.DATATYPE_NAME, TeiidDataType.INTEGER.toDdl());
        assertThat(tableNode.childrenWithName("e2").size(), is(1));
        assertProperty(tableNode.childrenWithName("e2").get(0), StandardDdlLexicon.DATATYPE_NAME, TeiidDataType.VARCHAR.toDdl());

        // constraints
View Full Code Here

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

        assertProperty(tableNode, TeiidDdlLexicon.SchemaElement.TYPE, SchemaElementType.FOREIGN.toDdl());

        // columns
        assertThat(tableNode.getChildren(TeiidDdlLexicon.Constraint.TABLE_ELEMENT).size(), is(2));
        assertThat(tableNode.childrenWithName("e1").size(), is(1));
        assertProperty(tableNode.childrenWithName("e1").get(0), StandardDdlLexicon.DATATYPE_NAME, TeiidDataType.INTEGER.toDdl());
        assertThat(tableNode.childrenWithName("e2").size(), is(1));
        assertProperty(tableNode.childrenWithName("e2").get(0), StandardDdlLexicon.DATATYPE_NAME, TeiidDataType.VARCHAR.toDdl());

        // constraints
        assertThat(tableNode.getChildren(TeiidDdlLexicon.Constraint.INDEX_CONSTRAINT).size(), is(0));
View Full Code Here

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

        // columns
        assertThat(tableNode.getChildren(TeiidDdlLexicon.Constraint.TABLE_ELEMENT).size(), is(2));
        assertThat(tableNode.childrenWithName("e1").size(), is(1));
        assertProperty(tableNode.childrenWithName("e1").get(0), StandardDdlLexicon.DATATYPE_NAME, TeiidDataType.INTEGER.toDdl());
        assertThat(tableNode.childrenWithName("e2").size(), is(1));
        assertProperty(tableNode.childrenWithName("e2").get(0), StandardDdlLexicon.DATATYPE_NAME, TeiidDataType.VARCHAR.toDdl());

        // constraints
        assertThat(tableNode.getChildren(TeiidDdlLexicon.Constraint.INDEX_CONSTRAINT).size(), is(0));
    }
View Full Code Here

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

        // columns
        assertThat(tableNode.getChildren(TeiidDdlLexicon.Constraint.TABLE_ELEMENT).size(), is(2));
        assertThat(tableNode.childrenWithName("e1").size(), is(1));
        assertProperty(tableNode.childrenWithName("e1").get(0), StandardDdlLexicon.DATATYPE_NAME, TeiidDataType.INTEGER.toDdl());
        assertThat(tableNode.childrenWithName("e2").size(), is(1));
        assertProperty(tableNode.childrenWithName("e2").get(0), StandardDdlLexicon.DATATYPE_NAME, TeiidDataType.VARCHAR.toDdl());

        // constraints
        assertThat(tableNode.getChildren(TeiidDdlLexicon.Constraint.INDEX_CONSTRAINT).size(), is(0));
    }
View Full Code Here

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

        assertThat(nodes.size(), is(1));
        final AstNode optionsListNode = nodes.get(0);
        assertMixinType(optionsListNode, TeiidDdlLexicon.AlterOptions.OPTIONS_LIST);

        { // first option
            final List<AstNode> options = optionsListNode.childrenWithName("sledge");
            assertThat(options.size(), is(1));
            assertProperty(options.get(0), StandardDdlLexicon.VALUE, "foo");
        }

        { // second option
View Full Code Here

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

            assertThat(options.size(), is(1));
            assertProperty(options.get(0), StandardDdlLexicon.VALUE, "foo");
        }

        { // second option
            final List<AstNode> options = optionsListNode.childrenWithName("hammer");
            assertThat(options.size(), is(1));
            assertProperty(options.get(0), StandardDdlLexicon.VALUE, "bar");
        }

        // dropped
View Full Code Here

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

        assertThat(alterColumnNode.getName(), is("bar"));
        assertMixinType(alterColumnNode, TeiidDdlLexicon.AlterOptions.COLUMN);
        assertThat(alterColumnNode.getProperty(TeiidDdlLexicon.AlterOptions.REFERENCE), is(notNullValue()));

        // option
        final List<AstNode> options = alterColumnNode.childrenWithName("x");
        assertThat(options.size(), is(1));
        assertProperty(options.get(0), StandardDdlLexicon.VALUE, "y");
    }

    @Test
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.