Text input and output functions

The text input function is an internal support function called by the server when a user inserts data with the SQL INSERT statement. This function takes the text representation of the data type in the INSERT statement and converts it to the internal C structure of the data type. The code that BladeSmith generates for this function uses a default text representation: a string enclosed by quotation marks, containing all structure members, separated by spaces. For example, if col1 is a Pnt column, the PntInput() function can handle a query such as:
insert into mytable (col1) values ('12.3 66.9');

The PntInput() function takes a pointer to an mi_lvarchar data type, which contains the textual representation to be converted. PntInput() returns a pointer to a Pnt internal C structure that the function has filled with the input data. The contents of this structure are written to the database table.

The text output function is an internal support function called by the server when a user executes a SELECT statement. This function converts the internal C structure of the data type to the default text representation.

BladeSmith generates the complete code for these functions.

See the Informix® DataBlade® Developers Kit User's Guide for more information.