Create casts for opaque data types
Support function | From | To | Type of cast |
---|---|---|---|
input | LVARCHAR | opaque data type | implicit |
output | opaque data type | LVARCHAR | explicit |
receive | SENDRECV | opaque data type | implicit |
send | opaque data type | SENDRECV | explicit |
import | IMPEXP | opaque data type | implicit |
export | opaque data type | IMPEXP | explicit |
importbinary | IMPEXPBIN | opaque data type | implicit |
exportbinary | opaque data type | IMPEXPBIN | explicit |
streamread | STREAM | opaque data type | implicit |
streamwrite | opaque data type | STREAM | explicit |
For the database server to perform these casts, you must create the casts with the CREATE CAST statement. The database server can then call the appropriate support function when it needs to cast opaque-type data to or from the LVARCHAR, SENDRECV, IMPEXP, IMPEXPBIN, or STREAM data types.
The CREATE CAST statement stores information about cast functions in the syscasts system catalog table. For more information about the CREATE CAST statement, see the description in the HCL OneDB™ Guide to SQL: Syntax. For a description of casting, see the HCL OneDB Guide to SQL: Tutorial.