A datatype is one of the internal forms of data used by the Sybase CEP Engine.
The data types are:
C8Int: A signed 32-bit integer.
C8UInt: An unsigned 32-bit integer.
C8Long: A signed 64-bit integer.
C8ULong: An unsigned 64-bit integer.
C8Bool: A true/false switch. Because of C requirements, this has been defined as C8_TRUE and C8_FALSE.
C8Timestamp: Time expressed in microseconds since midnight January 1, 1970 UTC (GMT).
C8Interval: An interval expressed in microseconds.
C8Float: Double-precision floating point numbers (64-bit).
C8CharPtr: A basic character pointer, corresponding to the STRING data type in CCL.
C8Char *: Another form of a basic character pointer, corresponding to the STRING data type in CCL.
C8Blob: A BLOB.
C8BlobPtr: A pointer to a BLOB.
The C SDK treats XML data as a string and thus uses C8CharPtr rather than defining an XML datatype such as "C8XML ".
BLOB data may be stored in one of 3 formats:
raw: A raw BLOB is stored in its original format, in other words, as a byte-for-byte copy of its value. This is the most compact form and is the form in which Sybase CEP Server internally stores and processes BLOBs.
hex string: A hex string BLOB is stored as a sequence of hexadecimal digits followed by a byte with the value 0 to terminate the string. This format allows the BLOB to be transmitted and processed as a string of printable characters. This format can also be transmitted or received in situations where you cannot send data that includes control characters. Because each byte of the original data requires 2 bytes of hex digits, and because the string has a single byte as a terminator, the length of the hex BLOB is 2N + 1 bytes, where N is the length of the original BLOB. Although this format is the least compact format, utilities for converting data from raw to hex string format and vice-versa are widely available, and therefore this format is among the most portable formats.
base64 string: Base64 string encoding is another way of encoding a BLOB as a string. For every 3 bytes of the original BLOB, the base64 string uses 4 bytes. This format may be used when exchanging BLOB information with database servers that expect BLOBs to be sent or retrieved in base64 string format. For more information about base64 string encoding, see Background.
Each Sybase CEP C/C++ SDK function that uses hex string format (either for input parameters or return values) will contain "HexString" somewhere in the name, for example, C8ConvertHexStringToBlob(). If the function uses base64 string format, then the function will contain "Base64String" somewhere in the name. If the function returns or accepts BLOBs and does not have "HexString" or "Base64String" in the name, then the function handles BLOBs in raw format.
To ensure that the data types are portable, the c8types.h header file includes a typedef for each of these data types.