Setting Up Dynamic Queries and Streams with the C/C++ SDK

The Sybase CEP C/C++ SDK includes a way to register a query.

Note: Before reading this section, please read Creating Streams and CCL Statements from Inside A Program if you have not already done so.

Registering a query includes:

To register a query, use the C8RegisterQuery() function.

You must use a C8StreamInfo object to specify information about each of the streams used in the query. The information about each stream must include the following:

Important:

The project whose streams are bound by the registered query binds must be up and running for the C8RegisterQuery() function to succeed.

If databases or user-defined extensions are used in the queries, the databases and extensions must be configured in the server and in the compiler for the query to work properly.

The query can use any of the streams in a project (query module) as well as any streams the query defines locally. The only restriction is that the local streams must be defined in such a way that the CCL compiler can deduce their schemas automatically. Also, the streams defined locally for this query are not available in any other queries. The query can also create new input streams and output streams.

Note: LOCAL streams and LOCAL windows are not listed in the results of query tools.