]> gitweb.factorcode.org Git - factor.git/blob - unmaintained/db/mysql/ffi/ffi.factor
tools.test: Make the flag public. Finish porting tester changes to fuzzer.
[factor.git] / unmaintained / db / mysql / ffi / ffi.factor
1 ! Copyright (C) 2007 Berlin Brown, 2008 Doug Coleman.
2 ! See http://factorcode.org/license.txt for BSD license.
3 ! Adapted from mysql.h and mysql.c
4 ! Tested with MySQL version - 5.0.24a
5 USING: alien alien.syntax combinators kernel system ;
6 IN: db.mysql.ffi
7
8 << "mysql" {
9     { [ os winnt? ] [ "libmySQL.dll" stdcall ] }
10     { [ os macosx? ] [ "libmysqlclient.14.dylib" cdecl ] }
11     { [ os unix? ] [ "libmysqlclient.so.14" cdecl ] }
12 } cond add-library >>
13
14 LIBRARY: mysql
15
16 FUNCTION: void* mysql_init ( void* mysql ) ;
17 FUNCTION: char* mysql_error ( void* mysql ) ;
18 FUNCTION: void* mysql_real_connect ( void* mysql, char* host, char* user, char* passwd, char* db, int port, char* unixsocket, long clientflag ) ;
19 FUNCTION: void mysql_close ( void* sock ) ;
20 FUNCTION: int mysql_query ( void* mysql, char* q ) ;
21 FUNCTION: void* mysql_use_result ( void* mysql ) ;
22 FUNCTION: void mysql_free_result ( void* result ) ;
23 FUNCTION: char** mysql_fetch_row ( void* result ) ;
24 FUNCTION: int mysql_num_fields ( void* result ) ;
25 FUNCTION: ulong mysql_affected_rows ( void* mysql ) ;