Lexical Conventions Oracle CQL Statements

1-20 Oracle Complex Event Processing CQL Language Reference When writing Oracle CQL queries in an Oracle CQL processor component configuration file, observe the following rules: ■ You may specify one Oracle CQL statement per view or query element. ■ You must not terminate Oracle CQL statements with a semicolon ;. ■ You must enclose each Oracle CQL statement in [CDATA[ and ]] as Example 1–13 shows. ■ When you issue an Oracle CQL statement, you can include one or more tabs, carriage returns, or spaces anywhere a space occurs within the definition of the statement. Thus, Oracle CEP evaluates the Oracle CQL statement in Example 1–14 and Example 1–15 in the same manner. Example 1–14 Oracle CQL: Without Whitespace Formatting processor namecqlProcessorname rules query id=QTollStr[CDATA[ RSTREAMselect cars.car_id, SegToll.toll from CarSegEntryStr[now] as cars, SegToll where cars.exp_way = SegToll.exp_way and cars.lane = SegToll.lane and cars.dir = SegToll.dir and cars.seg = SegToll.seg ]]query rules processor Example 1–15 Oracle CQL: With Whitespace Formatting processor namecqlProcessorname rules query id=QTollStr[CDATA[ RSTREAM select cars.car_id, SegToll.toll from CarSegEntryStr[now] as cars, SegToll where cars.exp_way = SegToll.exp_way and cars.lane = SegToll.lane and cars.dir = SegToll.dir and cars.seg = SegToll.seg ]]query rules processor ■ Case is insignificant in reserved words, keywords, identifiers and parameters. However, case is significant in function names, text literals, and quoted names. For more information, see: – Section 1.1.11, Functions – Section 2.4, Literals – Section 2.9, Schema Object Names and Qualifiers Introduction to Oracle CQL 1-21 ■ Comments are not permitted in Oracle CQL statements. For more information, see Section 2.7, Comments .

1.2.2 Syntactic Shortcuts and Defaults

When writing Oracle CQL queries, views, and joins, consider the syntactic shortcuts and defaults that Oracle CQL provides to simplify your queries. For more information, see: ■ Section 1.1.3.3, Default Stream-to-Relation Operator ■ Section 1.1.4.1, Default Relation-to-Stream Operator ■ HelloWorld Example in the Oracle Complex Event Processing Getting Started

1.2.3 Documentation Conventions

All Oracle CQL statements in this reference see Chapter 20, Oracle CQL Statements are organized into the following sections: Syntax The syntax diagrams show the keywords and parameters that make up the statement. Purpose The Purpose section describes the basic uses of the statement. Prerequisites The Prerequisites section lists privileges you must have and steps that you must take before using the statement. Semantics The Semantics section describes the purpose of the keywords, parameter, and clauses that make up the syntax, and restrictions and other usage notes that may apply to them. The conventions for keywords and parameters used in this chapter are explained in the Preface of this reference. Examples The Examples section shows how to use the various clauses and parameters of the statement.

1.3 Oracle CQL and SQL Standards

Oracle CQL is a new technology but it is based on a subset of SQL99. Oracle strives to comply with industry-accepted standards and participates actively in SQL standards committees. Oracle is actively pursuing Oracle CQL standardization. Note: Throughout the Oracle Complex Event Processing CQL Language Reference, Oracle CQL statements are shown only with their view or query element for clarity. Caution: Not all keywords and parameters are valid in all circumstances. Be sure to refer to the Semantics section of each statement and clause to learn about any restrictions on the syntax. 1-22 Oracle Complex Event Processing CQL Language Reference

1.4 Oracle CEP Server and Tools Support

Using the Oracle CEP server and tools, you can efficiently create, package, deploy, debug, and manage Oracle CEP applications that use Oracle CQL.

1.4.1 Oracle CEP Server

Oracle CEP server provides the light-weight Spring container for Oracle CEP applications and manages server and application lifecycle, provides a JRockit real-time JVM with deterministic garbage collection, and a wide variety of essential services such as security, Jetty, JMX, JDBC, HTTP publish-subscribe, and logging and debugging. For more information on Oracle CEP server, see Oracle Complex Event Processing Administrators Guide.

1.4.2 Oracle CEP Tools

Oracle CEP provides the following tools to facilitate your Oracle CQL development process: ■ Section 1.4.2.1, Oracle CEP IDE for Eclipse ■ Section 1.4.2.2, Oracle CEP Visualizer

1.4.2.1 Oracle CEP IDE for Eclipse

Oracle CEP IDE for Eclipse is targeted specifically to programmers that want to develop Oracle CEP applications as Figure 1–6 shows.