[plt-scheme] Re: PLT and MySQL

From: David Van Horn (dvanhorn at cs.brandeis.edu)
Date: Thu Sep 6 09:24:01 EDT 2007

Robert Nikander wrote:
> If you can't find anything else... I have some scripts that connect to 
> MySQL using an FFI module that I downloaded from somewhere I can't 
> remember.  The file is libmysqlclient.ss, and if you want I can email it 
> to you.  It has been working fine for scripts that run for 30 seconds.  
> I read the docs for the MySQL C API to know what functions to call.

Riverbot (riverbot.com) uses a simple FFI wrapper to connect to MySQL. 
The problem with this approach is a) you have to compile the module 
before using it and b) you have to hack the file to fit your version of 
mysql.h.  So I did this once and stopped worrying about it years ago.

Those files can be found here:

    http://www.cs.brandeis.edu/~dvanhorn/tmp/mysqlclient.ss
    http://www.cs.brandeis.edu/~dvanhorn/tmp/c-syntax.ss
    http://www.cs.brandeis.edu/~dvanhorn/tmp/c-syntax-transformer.ss

David



Posted on the users mailing list.