Supported Query Language Literals
Query language expressions can contain literals as well as operators and attribute names. The client supports many types of literals.
boolean. Boolean value, either
longif it is suffixed with the ASCII letter L. Otherwise it is of type
floating point.Type float if it is suffixed with an ASCII letter F. Otherwise its type is double and it can optionally be suffixed with an ASCII letter D . A double or floating point literal can optionally include an exponent suffix of E or e, followed by a signed or unsigned number.
string. Delimited by single quotation marks. Embedded single quotation marks are doubled. For example, the character string
'Hello'evaluates to the value
Hello, while the character string
'He said, ''Hello'''evaluates to
He said, 'Hello'. Embedded newlines are kept as part of the string literal.
charif it is a string literal prefixed by the keyword
CHAR; otherwise it is of type
string. The CHAR literal for the single quotation mark character is
CHAR ''''(four single quotation marks).
java.sql.Dateobject that uses the JDBC format prefixed with the
DATE yyyy-mm-dd. In the Date,
yyyyrepresents the year,
mmrepresents the month, and
ddrepresents the day. The year must be represented by four digits; a two-digit shorthand for the year is not allowed.
time. Not supported.
timestamp. Not supported.
NIL. Equivalent alternative of
NULL. Same as
UNDEFINED. Special literal that is a valid value for any data type. An
UNDEFINEDvalue is the result of accessing an attribute of a null-valued attribute. If you access an attribute that has an explicit value of null, then it is not undefined. For example, if a query accesses the attribute
address.cityand address is null, then the result is undefined. If the query accesses
address, then the result is not undefined, it is null.