Syntax Element | Description |
listener | Optional. You can specify a listener variable to refer to the stream listener that the from statement creates. You can declare a new listener variable or a use an existing listener variable. |
streamExpr | Specifies any expression of type stream except a stream query. This can be, for example, a stream variable or a stream source template. If you want to specify a stream query, use the other form of the from statement. |
coassignment | You must coassign the stream output into a variable. You can either use the as operator to implicitly declare the variable in the scope of the following statement or the : assignment operator to coassign to a local or global variable of the same type as the stream output that has already been declared. For details about the characters you can specify, see Identifiers. The output from a stream is referred to as a lot. Like an auction lot, a stream output lot can contain one or more items. If the stream output is a lot that contains more than one item, the from statement coassigns each item, in turn, to the variable. See Working with lots that contain multiple items. A from statement cannot specify multiple coassignments. |
statement | Specifies an EPL statement. Specify a single statement or enclose multiple statements in braces. The from statement coassigns each stream output item to the specified variable and executes the statement or block once for each output item. If the stream output is a lot that contains more than one item, and you want to execute the statement or block just once for the lot rather than once for each item in the lot, coassign the result to a sequence. See Coassigning to sequences in stream listeners. |
Syntax Element | Description |
listener | Optional. You can specify a listener variable to refer to the stream listener that the from statement creates. You can declare a new listener variable or a use an existing listener variable. |
StreamQueryDefinition | Specifies a stream query. See Defining stream queries. |
coassignment | You must coassign the stream output into a variable. You can either use the as operator to implicitly declare the variable in the scope of the following statement or the : assignment operator to coassign to a local or global variable of the same type as the stream output that has already been declared. For details about the characters you can specify, see Identifiers. If the query outputs lots that contain more than one item, the from statement coassigns each item in the lot, in turn, to the variable. See Working with lots that contain multiple items. A from statement cannot specify multiple coassignments. |
statement | Specifies an EPL statement. You can specify a single statement or you can enclose multiple statements in braces. The from statement coassigns each stream output item to the specified variable and executes the statement or block once for each output item. If you want the statement to be executed once per lot rather than once per item coassign the results to a sequence. See Coassigning to sequences in stream listeners. |