本文整理汇总了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());
}
示例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());
}
示例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());
}
示例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());
}
示例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());
}
示例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());
}
示例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());
}
示例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());
}
示例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());
}
示例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());
}
示例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());
}