Literals for 5800 system data types, Canonical string format – Sun Microsystems Sun StorageTek 5800 User Manual
Page 119
Literals for 5800 System Data Types
For each 5800 system data type, there is a syntax to include literals of that type in a query string.
The syntax is {type_name ’stringliteral’}. For example, consider the query:
timestamp_field<{timestamp
’2006-10-26T12:00:00Z’}
In particular, this syntax can be used to query for a particular object ID:
system.object_id = {objectid
’0200011e61c159bdfa654e11db8a45cafecafecafe000000000200000000’}
For comparing against binary values, either of the following forms may be used:
binary_field = x
’beeffeed’
binary_field = {binary
’beeffeed’}
For more information, see
“Canonical String Format” on page 119
Canonical String Format
Each type in a 5800 system has a canonical representation as a string value. The canonical
string
representation of each type is shown in
TABLE 4–1
Canonical String Representation of Data Types
Data Type
Canonical String Representation
STRING
The string itself.
CHAR
The string itself.
BINARY
Hexadecimal dump of the value with two hex digits per byte.
LONG
Result of Long.toString. For example, 88991 or -7975432785.
DOUBLE
Result of Double.toString. For example, 1.45 or NaN or -Infinity or -1.56E200.
DATE
YYYY-mm-dd
. For example, 2001-01-01.
TIME
HH:mm:sss
. For example, 12:02:01.
TIMESTAMP
YYYY-mm-ddThh:mm:ss.fffZ
(time relative to UTC). For example,
1969-12-31T23:59:59.999Z
.
OBJECTID
60-digit hexadecimal dump of the objectid.
This canonical string encoding is used in the following places:
■
When exposing the field as a directory component or a filename component in a virtual view
Canonical String Format
Chapter 4 • Sun StorageTek 5800 System Query Language
119