factor/unmaintained/db/mysql/ffi/ffi.factor

26 lines
1.0 KiB
Factor
Raw Normal View History

2008-08-31 04:07:23 -04:00
! Copyright (C) 2007 Berlin Brown, 2008 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
! Adapted from mysql.h and mysql.c
! Tested with MySQL version - 5.0.24a
USING: alien alien.syntax combinators kernel system ;
IN: db.mysql.ffi
<< "mysql" {
2010-03-31 22:29:04 -04:00
{ [ os winnt? ] [ "libmySQL.dll" stdcall ] }
2010-03-31 22:20:35 -04:00
{ [ os macosx? ] [ "libmysqlclient.14.dylib" cdecl ] }
{ [ os unix? ] [ "libmysqlclient.so.14" cdecl ] }
2008-08-31 04:07:23 -04:00
} cond add-library >>
LIBRARY: mysql
FUNCTION: void* mysql_init ( void* mysql ) ;
FUNCTION: char* mysql_error ( void* mysql ) ;
FUNCTION: void* mysql_real_connect ( void* mysql, char* host, char* user, char* passwd, char* db, int port, char* unixsocket, long clientflag ) ;
FUNCTION: void mysql_close ( void* sock ) ;
FUNCTION: int mysql_query ( void* mysql, char* q ) ;
FUNCTION: void* mysql_use_result ( void* mysql ) ;
FUNCTION: void mysql_free_result ( void* result ) ;
FUNCTION: char** mysql_fetch_row ( void* result ) ;
FUNCTION: int mysql_num_fields ( void* result ) ;
FUNCTION: ulong mysql_affected_rows ( void* mysql ) ;