- Subject: [slang-users] Re: Mysql and SLang
- From: Michael Noble <mnoble@xxxxxxxxxxxxx>
- Date: Tue, 30 Dec 2003 00:48:26 -0500
Dear Jeremy,
Have you looked at SLIRP?
http://space.mit.edu/%7Emnoble/slirp
I've never used MySQL before, but with SLIRP [the acronym
stands for (SL)ang (I)nterface (P)ackage] I was able to
wrap more than 40 functions from the MySQL api (in just
a few minutes) and succesfully ping a mysql server.
Appended below are the slirprc file used in my test, and
a sample S-Lang script. Perhaps you will find them useful.
Regards,
Mike Noble
------- slirprc -------
slirp_define_opaque("MYSQL");
slirp_define_opaque("MYSQL_RES");
accepts_null_args["mysql_init"] = [1];
ignored_functions =
[
"mysql_ssl_set",
"mysql_ssl_cipher",
"mysql_ssl_clear",
ignored_functions
];
------- test.sl -------
import("mysql");
variable conn = mysql_init(NULL);
vmessage("mysql_init returned: %S",conn);
conn = mysql_connect(conn, "", "", "");
vmessage("mysql_onnect returned: %S",conn);
vmessage("mysql_ping returned: %S",mysql_ping(conn));
_______________________________________________
To unsubscribe, visit http://jedsoft.org/slang/mailinglists.html
[2003 date index]
[2003 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]