An MI_DATUM structure holds a value that is transferred to or from the database server. DataBlade API functions handle MI_DATUM structures consistently. The following table lists uses of MI_DATUM structures.
Use of MI_DATUM Structures | Description | More Information |
---|---|---|
Routine arguments for a UDR | When a UDR is called, the routine manager passes UDR arguments as datums. The data type of each argument determines whether the routine manager passes the argument by reference or by value. | MI_DATUM Arguments |
Return value from a user-defined function | When a user-defined function exits, the routine manager passes the return value as a datum. The return-value data type determines whether the routine manager passes the return value by reference or by value. | Returning a Value |
OUT parameter from a user-defined function | When a user-defined function sets an OUT parameter, the routine manager passes the parameter back as a datum. The routine manager always passes an OUT parameter by reference. | Using an OUT Parameter |
Routine arguments for a UDR that you execute with the Fastpath interface | When you execute a UDR with the Fastpath interface, the mi_routine_exec( ) function passes UDR arguments as datums. The data type of each argument determines whether this function passes the argument by reference or by value. | Passing in Argument Values |
Return value from a UDR that you execute with the Fastpath interface | When a user-defined function that you execute with the Fastpath interface returns, the mi_routine_exec( ) function passes the return value as a datum. The return-value data type determines whether this function passes the return value by reference or by value. | Receiving the Return Value |
Column values returned or inserted in SQL statements | When the mi_value( ) or mi_value_by_name( ) function returns
a column value for a query in binary representation, it returns
this value as a datum.
When the mi_row_create( ) function creates a row structure, it accepts column values as datums. |
Obtaining Column Values |
Element values retrieved or inserted in SQL collections | When
the mi_collection_fetch( ) function
fetches an element from a collection, it represents the element
as a datum.
When the mi_collection_insert( ) function inserts an element from a collection, it represents the element as a datum. |
Accessing Elements of a Collection |
Input-parameter values in a prepared SQL statement | When the mi_exec_prepared_statement( ) or mi_open_prepared_statement( ) function provides input-parameter values, it represents them as datums. | Assigning Values to Input Parameters |