Examples of childrenWithName()


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.VIRTUAL.toDdl());
        assertProperty(alterOptionsNode, TeiidDdlLexicon.AlterOptions.REFERENCE, this.viewRefNode);
        assertThat(alterOptionsNode.childrenWithName("e1").size(), is(1));
    }

    @Test
    public void shouldParseAlterVirtualViewWithOptionsList() {
        final String content = "ALTER VIRTUAL 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.VIRTUAL.toDdl());
        assertProperty(alterOptionsNode, TeiidDdlLexicon.AlterOptions.REFERENCE, this.viewRefNode);
        assertThat(alterOptionsNode.childrenWithName(TeiidDdlLexicon.AlterOptions.ALTERS).size(), is(1));
    }

    // ********* parse alter options list clause tests ***********

    @Test
View Full Code Here

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

        final List<AstNode> nodes = this.rootNode.childrenWithName(TeiidDdlLexicon.AlterOptions.ALTERS);
        assertThat(nodes.size(), is(1));
        final AstNode optionsListNode = nodes.get(0);
        assertMixinType(optionsListNode, TeiidDdlLexicon.AlterOptions.OPTIONS_LIST);

        final List<AstNode> options = optionsListNode.childrenWithName("updatable");
        assertThat(options.size(), is(1));
        assertProperty(options.get(0), StandardDdlLexicon.VALUE, "true");
    }

    @Test
View Full Code Here

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

        final List<AstNode> nodes = this.rootNode.childrenWithName(TeiidDdlLexicon.AlterOptions.ALTERS);
        assertThat(nodes.size(), is(1));
        final AstNode optionsListNode = nodes.get(0);
        assertMixinType(optionsListNode, TeiidDdlLexicon.AlterOptions.OPTIONS_LIST);

        final List<AstNode> options = optionsListNode.childrenWithName("updatable");
        assertThat(options.size(), is(1));
        assertProperty(options.get(0), StandardDdlLexicon.VALUE, "true");
    }

    @Test
View Full Code Here

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

        // columns
        assertThat(tableNode.getChildren(TeiidDdlLexicon.CreateTable.TABLE_ELEMENT).size(), is(2));

        { // column e1
            assertThat(tableNode.childrenWithName("e1").size(), is(1));
            final AstNode e1 = tableNode.childrenWithName("e1").get(0);
            assertProperty(e1, StandardDdlLexicon.DATATYPE_NAME, TeiidDataType.INTEGER.toDdl());
            assertProperty(e1, TeiidDdlLexicon.CreateTable.AUTO_INCREMENT, true);
            assertProperty(e1, StandardDdlLexicon.NULLABLE, DdlConstants.NULL);
        }
View Full Code Here

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

        // columns
        assertThat(tableNode.getChildren(TeiidDdlLexicon.CreateTable.TABLE_ELEMENT).size(), is(2));

        { // column e1
            assertThat(tableNode.childrenWithName("e1").size(), is(1));
            final AstNode e1 = tableNode.childrenWithName("e1").get(0);
            assertProperty(e1, StandardDdlLexicon.DATATYPE_NAME, TeiidDataType.INTEGER.toDdl());
            assertProperty(e1, TeiidDdlLexicon.CreateTable.AUTO_INCREMENT, false);
            assertProperty(e1, StandardDdlLexicon.NULLABLE, DdlConstants.NULL);
        }
View Full Code Here

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

        // columns
        assertThat(tableNode.getChildren(TeiidDdlLexicon.CreateTable.TABLE_ELEMENT).size(), is(2));

        { // column e1
            assertThat(tableNode.childrenWithName("e1").size(), is(1));
            final AstNode e1 = tableNode.childrenWithName("e1").get(0);
            assertProperty(e1, StandardDdlLexicon.DATATYPE_NAME, TeiidDataType.INTEGER.toDdl());
            assertProperty(e1, TeiidDdlLexicon.CreateTable.AUTO_INCREMENT, false);
            assertProperty(e1, StandardDdlLexicon.NULLABLE, DdlConstants.NULL);
        }
View Full Code Here

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

        // columns
        assertThat(tableNode.getChildren(TeiidDdlLexicon.CreateTable.TABLE_ELEMENT).size(), is(3));

        { // column e1
            assertThat(tableNode.childrenWithName("e1").size(), is(1));
            final AstNode e1 = tableNode.childrenWithName("e1").get(0);
            assertProperty(e1, StandardDdlLexicon.DATATYPE_NAME, TeiidDataType.INTEGER.toDdl());
            assertProperty(e1, TeiidDdlLexicon.CreateTable.AUTO_INCREMENT, false);
            assertProperty(e1, StandardDdlLexicon.NULLABLE, DdlConstants.NULL);
        }
View Full Code Here

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

        // columns
        assertThat(tableNode.getChildren(TeiidDdlLexicon.CreateTable.TABLE_ELEMENT).size(), is(3));

        { // column e1
            assertThat(tableNode.childrenWithName("e1").size(), is(1));
            final AstNode e1 = tableNode.childrenWithName("e1").get(0);
            assertProperty(e1, StandardDdlLexicon.DATATYPE_NAME, TeiidDataType.INTEGER.toDdl());
            assertProperty(e1, TeiidDdlLexicon.CreateTable.AUTO_INCREMENT, false);
            assertProperty(e1, StandardDdlLexicon.NULLABLE, DdlConstants.NULL);
        }
View Full Code Here

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

        // columns
        assertThat(tableNode.getChildren(TeiidDdlLexicon.CreateTable.TABLE_ELEMENT).size(), is(3));

        { // column e1
            assertThat(tableNode.childrenWithName("e1").size(), is(1));
            final AstNode e1 = tableNode.childrenWithName("e1").get(0);
            assertProperty(e1, StandardDdlLexicon.DATATYPE_NAME, TeiidDataType.INTEGER.toDdl());
            assertProperty(e1, TeiidDdlLexicon.CreateTable.AUTO_INCREMENT, false);
            assertProperty(e1, StandardDdlLexicon.NULLABLE, DdlConstants.NULL);
        }
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.