You can call any registered UDR in an SQL statement. When your UDR is called in an SQL statement, the database server parses the statement and produces a query plan. It then automatically performs any routine resolution necessary and loads the shared-object file in which that UDR resides into shared memory (if it is not already loaded) when it parses and compiles the SQL statement. For more information on how the database server executes a UDR in an SQL statement, see Executing a UDR.
Within the DataBlade API, you can execute SQL statements with the mi_exec( ) function and execute prepared SQL statements with the mi_exec_prepared_statement( ) function. For example, the following call to mi_exec( ) sends the EXECUTE FUNCTION statement to the database server to execute the myfunc( ) user-defined function:
mi_exec(conn, "EXECUTE FUNCTION myfunc(5,5);", MI_QUERY_BINARY);
For more information on the use of mi_exec( ) and mi_exec_prepared_statement( ), see Handling Connections.
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]