Open topic with navigation

TIBCO BusinessEvents® Enterprise Edition 6.3.1

# Operators for Binary Expressions

Various logical, mathematical and string operators are provided to created queries using binary expressions.

Operators for Binary Expressions in Queries (Sheet of )
Operator | Description and Examples | Datatypes | Result type
--- | --- | --- | ---
Relational Expression Operators |
`=` | equality `x = y` | x and y can be any type | Boolean
`!=` `<>` | inequality `x != y` `x <> y` | x and y can be any type. | Boolean
`>` `<` `>=` `<=` | Greater than Less than Greater than or equal to Less than or equal to `x > y` (and so on) Generically known as comparison operators | x and y must both be number types, or both be Datetime types. | Boolean
Logical Operators |
`and` `or` | Logical (Boolean) and, or. `x and y` `x or y` | x and y must be Boolean | Boolean
Mathematical Operators Also used in the projection (`select` clause) |
`*` | Multiplication `x * y` | x and y must both be numbers. | Either the type of x or y, whichever has the larger capacity.
`\` | Division `x \ y` | x and y must both be numbers. | double
`mod` | Remainder `x mod y` | x and y must both be numbers. | Either the type of x or y, whichever has the larger capacity.
`+` | Addition `x + y` | x and y must both be numbers. | Either the type of x or y, whichever has the larger capacity.
`-` | Subtraction `x - y` | x and y must both be numbers. | Either the type of x or y, whichever has the larger capacity.
Postfix Operators |
`[]` | Array dereferencing, to access an array element. `x[y]` | x must be an array and y must be an int. | Type of the array element.
`.` | For object graph traversal, to access a property `x.y` | x must be an entity and y must be a property. | Type of y.
`@` | For object graph traversal, to access an attribute `customer@extId` | x must be an entity and y must be a attribute. | Type of y.
String Operator |
`||` | String concatenation `x || y` | x and y must be String | String
`like` | The like operator matches all strings that match the regular expression provided in double quotes. With the TIBCO cache provider, you can use `"*.*"` syntax, for example: `select symbol from /ConceptModel/StockTick where symbol like ".*T.*"` Results: TIBX, MSFT, `where symbol like ".*T"` Results: MSFT `where symbol like "TIBX"` Results: TIBX `where symbol like "TIB."` Results: TIBX `where symbol like ".*"` Results: JNJ, VMW, TIBX, HPQ, MSFT, HPQ | String | Boolean

Did you find this helpful?

YesNo
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO BusinessEvents® Enterprise Edition

Copyright © 2004-2024. Cloud Software Group, Inc. All Rights Reserved.