![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |
A message selector is string that lets a client program specify a set of messages, based on the values of message headers and properties. A selector matches a message if, after substituting header and property values from the message into the selector string, the string evaluates to true. Consumers can request that the server deliver only those messages that match a selector.An identifier is a sequence of letters and digits, of any length, that begins with a letter. As in Java, the set of letters includes _ (underscore) and $ (dollar).Certain names are exceptions, which cannot be used as identifiers. In particular, NULL, TRUE, FALSE, NOT, AND, OR, BETWEEN, LIKE, IN, IS, and ESCAPE are defined to have special meaning in message selector syntax.A string literal is enclosed in single quotes. To represent a single quote within a literal, use two single quotes; for example, 'literal''s'. String literals use the Unicode character encoding. String literals are case sensitive.An exact numeric literal is a numeric value without a decimal point, such as 57, -957, and +62; numbers in the range of long are supported.An approximate numeric literal is a numeric value with a decimal point (such as 7., -95.7, and +6.2), or a numeric value in scientific notation (such as 7E3 and -57.9E2); numbers in the range of double are supported. Approximate literals use the floating-point literal syntax of the Java programming language.Internal computations of expression values use a 3-value boolean logic similar to SQL. However, the final value of an expression is always either TRUE or FALSE—never UNKNOWN.Every selector is a conditional expression. A selector that evaluates to true matches the message; a selector that evaluates to false or unknown does not match.These operators can compare only values of comparable types. (Exact numeric values and approximate numerical values are comparable types.) Attempting to compare incomparable types yields false. If either value in a comparison evaluates to NULL, then the result is unknown (in SQL 3-valued logic).Comparison of string values is restricted to = and <>. Two strings are equal if and only if they contain the same sequence of characters. Comparison of boolean values is restricted to = and <>.
• +, - (unary)
• *, / (multiplication and division)
• +, - (addition and subtraction)The BETWEEN comparison operator includes its endpoints. For example:
• age BETWEEN 5 AND 9 is equivalent to age >= 5 AND age <= 9
• age NOT BETWEEN 5 AND 9 is equivalent to age < 5 OR age > 9The identifier must evaluate to either a string or NULL. If it is NULL, then the value of this expression is unknown.The identifier must evaluate to a string.The pattern-value is a string literal, in which some characters bear special meaning:
• _ (underscore) can match any single character.
• % (percent) can match any sequence of zero or more characters.
• escape-character preceding either of the special characters changes them into ordinary characters (which match only themselves).identifier IS NULLidentifier IS NOT NULL
![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |