Hi,

You can read more about the syntax and annotations from the SiddhiQL guide.
For stream syntax, please refer to [1]. You can drop the
@config(async='true') annotation in Siddhi-3.0.0 since that is the default
mode and the only mode of processing currently.

[1]
https://docs.wso2.com/display/CEP400/SiddhiQL+Guide+3.0#SiddhiQLGuide3.0-EventStreamDefinition

Thanks,

On 14 October 2015 at 12:00, Lakini Senanayaka <[email protected]> wrote:

> Hi,
>
> I have read the link Lasantha gave me.[1]
>
> Is there any format of writing EventStreams and queries as strings when
> passing them to the createExecutionPlanRuntime method ?
>
> Example:-
> String cseEventStream = "@config(async = 'true') define stream
> cseEventStream (symbol string, price float, volume long);";
>
> I couldn't understand the annotations used to write them.Could you please
> give me a reference to read about them.
>
> [1]
> https://github.com/wso2/siddhi/blob/master/modules/siddhi-core/src/test/java/org/wso2/siddhi/core/query/FilterTestCase.java
>
> Thank you.
>
> On Wed, Oct 14, 2015 at 11:17 AM, Lakini Senanayaka <[email protected]>
> wrote:
>
>> Thank you Lasantha.
>> I'll refer the link which you gave me.
>>
>> On Wed, Oct 14, 2015 at 11:07 AM, Lasantha Fernando <[email protected]>
>> wrote:
>>
>>> Hi Lakini,
>>>
>>> Better use a released version of Siddhi instead of the milestone
>>> version. Siddhi-3.0.0-M1 would have very little of the actual features
>>> implemented since this is the first milestone for the rewrite of Siddhi.
>>> Siddhi-3.0.2 is already released and you can use that version instead.
>>>
>>> Also from Siddhi-3.0.0 onwards, separate methods like defineStream,
>>> defineTable were removed from the API and there is a single API method
>>> createExecutionPlanRuntime() to which you can pass in the complete query,
>>> along with stream definitions, table definitions etc. This was done so that
>>> the user can simply pass in the execution plan just as you would write the
>>> query in CEP, without the API user having to know about different methods
>>> to define different constructs of the language.
>>>
>>> You can refer to the test cases in [1] or any other test case to get a
>>> better idea on how to use the Siddhi library API.
>>>
>>> [1]
>>> https://github.com/wso2/siddhi/blob/master/modules/siddhi-core/src/test/java/org/wso2/siddhi/core/query/FilterTestCase.java
>>>
>>> Thanks,
>>> Lasantha
>>>
>>> On 14 October 2015 at 10:49, Lakini Senanayaka <[email protected]> wrote:
>>>
>>>> Hi,
>>>>
>>>>  I have used SiddhiQueryapi  3.0.0M1 and SiddhiCore 3.0.0M1 in my
>>>> android project.Now I can create siddhimanager instances.But I don't get
>>>> defineStream,addQuery methods.Instead of that I get defineFunction.But in
>>>> the siddhi user guide there are examples with defineStream method.Could you
>>>> please explain me why is that and guide me how to continue the task.
>>>> PS:I'm using siddhi queries in android.
>>>>
>>>> Thank you.
>>>> --
>>>> *Intern-Engineering*
>>>> Lakini S.Senanayaka
>>>> Mobile: +94 712295444
>>>> Email: [email protected]
>>>>
>>>
>>>
>>>
>>> --
>>> *Lasantha Fernando*
>>> Senior Software Engineer - Data Technologies Team
>>> WSO2 Inc. http://wso2.com
>>>
>>> email: [email protected]
>>> mobile: (+94) 71 5247551
>>>
>>
>>
>>
>> --
>> *Intern-Engineering*
>> Lakini S.Senanayaka
>> Mobile: +94 712295444
>> Email: [email protected]
>>
>
>
>
> --
> *Intern-Engineering*
> Lakini S.Senanayaka
> Mobile: +94 712295444
> Email: [email protected]
>



-- 
*Lasantha Fernando*
Senior Software Engineer - Data Technologies Team
WSO2 Inc. http://wso2.com

email: [email protected]
mobile: (+94) 71 5247551
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to