
Canonical String Format
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
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
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 |
|
|
DOUBLE | Result of Double.toString. For example, 1.45 or NaN or |
|
|
DATE | |
|
|
TIME | HH:mm:sss. For example, 12:02:01. |
|
|
TIMESTAMP | |
| |
|
|
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
Chapter 4 • Sun StorageTek 5800 System Query Language | 119 |