slang-users mailing list

[2003 Date Index] [2003 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

[slang-users] Re: Mysql and SLang


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]