Character strings in opaque-type support functions
The client application performs code-set conversion of non-opaque-type data that is transferred to and from the client, but the database server does not know about the internal format of an opaque data type.
Therefore, for opaque data types, the support functions are responsible for explicitly converting any string that is not in the code set of the server-processing locale.
You might need to perform code-set conversion in the following
opaque-type support functions:
- In the input and output support functions: to convert the external format of the opaque type between the code sets of the client locale and the server-processing-locale
- In the receive and send support functions: to convert any character fields in the internal structure of the opaque type
Tip: The
code that the OneDB®
DataBlade® Developers Kit
(DBDK) (DBDK)
generates for opaque-type input and output support functions handles
external formats from nondefault locales.
The DataBlade
API provides
the following functions for code-set conversion in the support functions
of an opaque data type.
Code-set conversion on an opaque type | DataBlade API function |
---|---|
Perform code-set conversion on a string argument from the code set of the server-processing locale to that of the client locale | mi_put_string( ) |
Perform code-set conversion on a string from the code set of the client locale to that of the server-processing locale | mi_get_string( ) |
For more information about the syntax of these DataBlade API functions, see the function reference in the HCL OneDB DataBlade API Programmer's Guide.