Fabian Groffen a écrit :
On 02-02-2010 00:01:31 +0100, Guillaume Yziquel wrote:
fin and fout seem optional arguments (meaning you can pass NULL for sensible defaults). But as before, the oid of the user, and the sceanrio string are arguments whose proposed values are unclear to me. scenario is like language, e.g. mal or sql, but I doubt if you should really be using this function at all.
Here's my use case:
I want to use MALparse in order to compile MAL from OCaml. (I want to do some rather involved stuff using Camlp4 to extend the syntax definition accepted by the OCaml compiler).
And I need to pass a Client as argument to MALparse.
The Mapi interface doesn't provide a way to grab Client structs. (It is clearly not its purpose). Therefore, I need a way to grab a Client struct, and it seems that this is available in mal_client.mx.
Then, I do not know how to grab the Client:
-1- Inspected the global array of clients?
-2- Use MCfindClient? Or MCinitClient? Since you have found the code to deal with clients, you should have noticed
Guillaume Yziquel wrote: there is a global table of Client records. The first represents the admin. In an embedded setting, you can access it directly and from there you are on your own. However, as mentioned before, in an embedded system you preferrably access the kernel as a normal mclient -lmal user, which ensures proper client admin and handle all the MAL authorization, parsing, admin, and execution. There is no clear application requirement to look and work under the hood. For front-end languages the MAL layer is the abstract machine. Interaction organized through the mapi-interface of ascii text. regards, Martin
In this last case, how do I know what are the admissible values for oids?
That's the kind of issue I have interacting with MonetDB from OCaml.
All the best,