The mi_current_command_name() function
The mi_current_command_name() function returns the name of the SQL statement that invoked the C UDR.
Syntax
mi_string *mi_current_command_name(*conn)
MI_CONNECTION *conn;
- conn
- A pointer to a connection descriptor established by a previous call to mi_open(), mi_server_connect(), or mi_server_reconnect().
Valid in client LIBMI application? | Valid in user-defined routine? |
---|---|
No | Yes |
Usage
The mi_current_command_name() function returns the SQL statement name as a null-terminated string in memory that the function allocates with the current memory duration. This statement name is only the verb of the statement, not the entire statement syntax.
DELETE FROM customer WHERE customer_id = 1998;
The mi_current_command_name() function
returns only the verb of this statement: delete
.
For more information about how to call a C UDR with an SQL statement, see the HCL OneDB™ DataBlade® API Programmer's Guide.
Return values
- An mi_string pointer
- A pointer to the verb of the last statement or command.
- NULL
- The function was not successful.