BQL Expressions are used in the where
clause of
a BQL query to further qualify a result by narrowing the set of
objects in the extent.
BQL supports the following set of operators ordered by precedence:
!, not, - | logical not, numeric negation |
*, / | multiplication, division |
+, - | addition, subtraction |
=, !=, >, >=, <, <= | comparisons |
and, or | logical operators |
Parentheses can be used to override the normal precedence.
All primitive types and BSimple types can be expressed as literals in BQL. The syntax for primitives types is:
String - single quoted string
Example: 'This is a string literal'
number - a numeric value, unquoted
Example: 10
boolean - true or false, unquoted
Example: true
enum - The enum type spec followed by the tag separated by a dot.
Example: alarm:SourceState.normal
Expressing other BSimple types in BQL is more verbose because a type specifier is required. The syntax for a BSimple value is the type spec (i.e. moduleName:typeName) followed by a string literal with the string encoding of the value (the result of encodeToString() for the type). Example: baja:RelTime '10000'
Baja types are expressed in BQL using the type spec. Any type spec that is not
followed by a quoted string refers to the type itself.
Example: where out.type = baja:StatusNumeric
Copyright © 2000-2019 Tridium Inc. All rights reserved.