当前位置: 首页>>代码示例>>Java>>正文


Java SiddhiCompiler.parseTableDefinition方法代码示例

本文整理汇总了Java中org.wso2.siddhi.query.compiler.SiddhiCompiler.parseTableDefinition方法的典型用法代码示例。如果您正苦于以下问题:Java SiddhiCompiler.parseTableDefinition方法的具体用法?Java SiddhiCompiler.parseTableDefinition怎么用?Java SiddhiCompiler.parseTableDefinition使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.wso2.siddhi.query.compiler.SiddhiCompiler的用法示例。


在下文中一共展示了SiddhiCompiler.parseTableDefinition方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: Test1

import org.wso2.siddhi.query.compiler.SiddhiCompiler; //导入方法依赖的package包/类
@Test
public void Test1() throws RecognitionException, SiddhiParserException {
    TableDefinition streamDefinition = SiddhiCompiler.parseTableDefinition("define table cseStream ( symbol string, price int, volume float )");
    Assert.assertEquals(new TableDefinition().
            name("cseStream").
            attribute("symbol", Attribute.Type.STRING).
            attribute("price", Attribute.Type.INT).
            attribute("volume", Attribute.Type.FLOAT).toString(),
            streamDefinition.toString());
}
 
开发者ID:redBorder,项目名称:rb-bi,代码行数:11,代码来源:DefineTableTestCase.java

示例2: Test2

import org.wso2.siddhi.query.compiler.SiddhiCompiler; //导入方法依赖的package包/类
@Test
public void Test2() throws RecognitionException, SiddhiParserException {
    TableDefinition streamDefinition = SiddhiCompiler.parseTableDefinition("define table `define` ( `string` string, price int, volume float );");
    Assert.assertEquals(new TableDefinition().
            name("define").
            attribute("string", Attribute.Type.STRING).
            attribute("price", Attribute.Type.INT).
            attribute("volume", Attribute.Type.FLOAT).toString(),
            streamDefinition.toString());
}
 
开发者ID:redBorder,项目名称:rb-bi,代码行数:11,代码来源:DefineTableTestCase.java

示例3: Test3

import org.wso2.siddhi.query.compiler.SiddhiCompiler; //导入方法依赖的package包/类
@Test
public void Test3() throws RecognitionException, SiddhiParserException {
    TableDefinition streamDefinition = SiddhiCompiler.parseTableDefinition("define table cseStream ( symbol string, price int, volume float )");
    Assert.assertEquals(new TableDefinition().
            name("cseStream").
            attribute("symbol", Attribute.Type.STRING).
            attribute("price", Attribute.Type.INT).
            attribute("volume", Attribute.Type.FLOAT).toString(),
            streamDefinition.toString());
}
 
开发者ID:redBorder,项目名称:rb-bi,代码行数:11,代码来源:DefineTableTestCase.java

示例4: test1

import org.wso2.siddhi.query.compiler.SiddhiCompiler; //导入方法依赖的package包/类
@Test
public void test1() throws SiddhiParserException {
    TableDefinition streamDefinition = SiddhiCompiler.parseTableDefinition("define table cseStream ( symbol " +
            "string, price int, volume float )");
    AssertJUnit.assertEquals(TableDefinition.
                    id("cseStream").
                    attribute("symbol", Attribute.Type.STRING).
                    attribute("price", Attribute.Type.INT).
                    attribute("volume", Attribute.Type.FLOAT).toString(),
            streamDefinition.toString());
}
 
开发者ID:wso2,项目名称:siddhi,代码行数:12,代码来源:DefineTableTestCase.java

示例5: test2

import org.wso2.siddhi.query.compiler.SiddhiCompiler; //导入方法依赖的package包/类
@Test
public void test2() throws SiddhiParserException {
    TableDefinition streamDefinition = SiddhiCompiler.parseTableDefinition("define table `define` ( `string` " +
            "string, price int, volume float );");
    AssertJUnit.assertEquals(TableDefinition.
                    id("define").
                    attribute("string", Attribute.Type.STRING).
                    attribute("price", Attribute.Type.INT).
                    attribute("volume", Attribute.Type.FLOAT).toString(),
            streamDefinition.toString());
}
 
开发者ID:wso2,项目名称:siddhi,代码行数:12,代码来源:DefineTableTestCase.java

示例6: test3

import org.wso2.siddhi.query.compiler.SiddhiCompiler; //导入方法依赖的package包/类
@Test
public void test3() throws SiddhiParserException {
    TableDefinition streamDefinition = SiddhiCompiler.parseTableDefinition("define table cseStream ( symbol " +
            "string, price int, volume float )");
    AssertJUnit.assertEquals(TableDefinition.
                    id("cseStream").
                    attribute("symbol", Attribute.Type.STRING).
                    attribute("price", Attribute.Type.INT).
                    attribute("volume", Attribute.Type.FLOAT).toString(),
            streamDefinition.toString());
}
 
开发者ID:wso2,项目名称:siddhi,代码行数:12,代码来源:DefineTableTestCase.java

示例7: test4

import org.wso2.siddhi.query.compiler.SiddhiCompiler; //导入方法依赖的package包/类
@Test
public void test4() throws SiddhiParserException {
    TableDefinition streamDefinition = SiddhiCompiler.parseTableDefinition("" +
            " @from(datasource='MyDatabase','CUSTOM')" +
            " define table cseStream ( symbol string, price int, volume float )");
    AssertJUnit.assertEquals(TableDefinition.
                    id("cseStream").
                    attribute("symbol", Attribute.Type.STRING).
                    attribute("price", Attribute.Type.INT).
                    attribute("volume", Attribute.Type.FLOAT).annotation(Annotation.annotation("from").element
                    ("datasource", "MyDatabase").element("CUSTOM")).toString(),
            streamDefinition.toString());
}
 
开发者ID:wso2,项目名称:siddhi,代码行数:14,代码来源:DefineTableTestCase.java

示例8: Test1

import org.wso2.siddhi.query.compiler.SiddhiCompiler; //导入方法依赖的package包/类
@Test
public void Test1() throws SiddhiParserException {
    TableDefinition streamDefinition = SiddhiCompiler.parseTableDefinition("define table cseStream ( symbol string, price int, volume float )");
    Assert.assertEquals(TableDefinition.
                    id("cseStream").
                    attribute("symbol", Attribute.Type.STRING).
                    attribute("price", Attribute.Type.INT).
                    attribute("volume", Attribute.Type.FLOAT).toString(),
            streamDefinition.toString());
}
 
开发者ID:sacjaya,项目名称:siddhi-3,代码行数:11,代码来源:DefineTableTestCase.java

示例9: Test2

import org.wso2.siddhi.query.compiler.SiddhiCompiler; //导入方法依赖的package包/类
@Test
public void Test2() throws SiddhiParserException {
    TableDefinition streamDefinition = SiddhiCompiler.parseTableDefinition("define table `define` ( `string` string, price int, volume float );");
    Assert.assertEquals(TableDefinition.
                    id("define").
                    attribute("string", Attribute.Type.STRING).
                    attribute("price", Attribute.Type.INT).
                    attribute("volume", Attribute.Type.FLOAT).toString(),
            streamDefinition.toString());
}
 
开发者ID:sacjaya,项目名称:siddhi-3,代码行数:11,代码来源:DefineTableTestCase.java

示例10: Test3

import org.wso2.siddhi.query.compiler.SiddhiCompiler; //导入方法依赖的package包/类
@Test
public void Test3() throws SiddhiParserException {
    TableDefinition streamDefinition = SiddhiCompiler.parseTableDefinition("define table cseStream ( symbol string, price int, volume float )");
    Assert.assertEquals(TableDefinition.
                    id("cseStream").
                    attribute("symbol", Attribute.Type.STRING).
                    attribute("price", Attribute.Type.INT).
                    attribute("volume", Attribute.Type.FLOAT).toString(),
            streamDefinition.toString());
}
 
开发者ID:sacjaya,项目名称:siddhi-3,代码行数:11,代码来源:DefineTableTestCase.java

示例11: Test4

import org.wso2.siddhi.query.compiler.SiddhiCompiler; //导入方法依赖的package包/类
@Test
public void Test4() throws SiddhiParserException {
    TableDefinition streamDefinition = SiddhiCompiler.parseTableDefinition("" +
            " @from(datasource='MyDatabase','CUSTOM')" +
            " define table cseStream ( symbol string, price int, volume float )");
    Assert.assertEquals(TableDefinition.
                    id("cseStream").
                    attribute("symbol", Attribute.Type.STRING).
                    attribute("price", Attribute.Type.INT).
                    attribute("volume", Attribute.Type.FLOAT).annotation(Annotation.annotation("from").element("datasource", "MyDatabase").element("CUSTOM")).toString(),
            streamDefinition.toString());
}
 
开发者ID:sacjaya,项目名称:siddhi-3,代码行数:13,代码来源:DefineTableTestCase.java


注:本文中的org.wso2.siddhi.query.compiler.SiddhiCompiler.parseTableDefinition方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。