|
The mi_row_create() creates a row, based a row descriptor and column data.
The mi_row_create() function takes the column data that the col_values and col_nulls arrays hold and creates a row structure that holds this data, based on the column information in the row descriptor that row_desc references. It returns a pointer to the new row structure (MI_ROW) that it creates.
The mi_row_create() function is the constructor function for the row structure. This function uses the col_values and col_nulls arrays to obtain the column values that it copies into the new row structure. The col_values array holds the values for each column of the row. This array sends the column values as MI_DATUM values.
The mi_row_create() function allocates a new row structure with the PER_COMMAND memory duration. Values in the col_values array must be pass by reference or pass by value, depending on the data type of the value.
Values in the col_values array must be pass-by-reference for all data types.
The mi_row_create() function expects an mi_lvarchar variable-length structure as the coldata value for CHAR(n) and NCHAR(n) columns.
The mi_row_create() function puts copies of the col_values and col_nulls arrays into a row buffer that is associated with the row_desc row descriptor. If you call mi_row_create() twice with the same row descriptor, the second call overwrites the results of the first call.
MI_ROW * | is a pointer to the newly created row. |
NULL | indicates that the function was not successful. |
See the descriptions of the following functions: mi_row_desc_create() and mi_row_free().
For more information, see Creating a Row Structure.