Control modes for query data
- In text representation, the query data is represented as null-terminated strings. Data in its text representation is often called a literal value.
- In binary representation, the query data is represented in its internal format; that is, in the format that the database server uses to store the value.
Type of data | Text representation | Binary representation |
---|---|---|
Character | Null-terminated string | Varying-length structure: mi_lvarchar |
Date | mm/dd/yyyy Nondefault locale: End-user date format |
Integer number of days since December 31, 1899 (DATE, mi_date) |
Date/time | yyyy-mm-dd HH:MM:SS Nondefault locale: End-user date and time format |
dtime_t (DATETIME, mi_datetime) |
Interval | yyyy-mm
Nondefault locale: End-user date and time format |
intrvl_t (INTERVAL, mi_interval) |
Integer | Integer value as a string: thousands separator = "," Nondefault locale: End-user numeric format |
Internal format:
|
Decimal | Fixed-point value as a string: thousands separator = "," decimal separator = "." Nondefault locale: End-user numeric format |
dec_t (DECIMAL, mi_decimal) |
Monetary | Fixed-point value as a string: thousands separator = "," decimal separator = "." currency symbol = "$" Nondefault locale: End-user monetary format |
dec_t (MONEY, mi_money) |
Floating-point | Floating-point value as a string: thousands separator = "," decimal separator = "." Nondefault locale: End-user numeric format |
Internal format:
|
Boolean | "t" or "T" "f" or "F" |
MI_TRUE, MI_FALSE (BOOLEAN, mi_boolean) |
Smart large object | Text representation of the LO handle (obtained with mi_lo_to_string()) | LO handle (CLOB, BLOB; MI_LO_HANDLE) |
Row type | Unnamed row type: "ROW(fld_value1, fld_value2, ...)" Named row type: "row_type(fld_value1, fld_value2, ...)" |
Row structure (ROW, named row type; MI_ROW) |
Collection type | "SET{elmnt_value, elmnt_value, ...}" "MULTISET{elmnt_value, elmnt_value, ...}" "LIST{elmnt_value, elmnt_value, ...}" |
Collection structure (SET, LIST, MULTISET; MI_COLLECTION) |
Varying-length opaque type | External format of opaque type (as returned by output support function) | Varying-length structure: mi_bitvarying (which contains the internal C data type) |
Fixed-length opaque type | External format of opaque type (as returned by output support function) | Internal C data type |
Distinct type | Text representation of its source data type | Binary representation of its source data type |
Control mode | Control-flag value |
---|---|
Text representation | MI_QUERY_NORMAL |
Binary representation | MI_QUERY_BINARY |
In the send_statement() function, mi_exec() sets the control mode of the query data to text representation.
To determine the control mode for query data, use the mi_binary_query() function. The mi_binary_query() function determines the control mode for data of the current statement.