Re: Using DataBlade API Functions
Posted in 1998
Carlos (carlosfe@aludra.usc.edu) wrote: : : Can we add this to the FAQ? Q: I'm writng a user-defined function in 'C'. The documentation examples all include files like "mi.h". Where is milib.a? A: The various functions defined in the mi.h headers and documented in the DataBlade API Guide are actually implemented in the kernel of the DBMS server itself. Recall the basic idea behind UDO extensibility: your code runs inside the server. When you write your function and compile it, you need to to create a 'shared library' file. In a shared library, the compiler stores the names of the various functions that you have created and a list of functions that need to be resolved at link time. When UDO invokes your function, it links this shared library into the kernel and resolves all of these symbols. Then when you run your UDR, it might actually call-back into the server for things like memory, files, and to make SQL calls. The details of how to do this vary from compiler to compiler and platform to platform. Your best bet is to use the DataBlade Developers Kit to generate the functions and the makefiles and then use them.