00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #include <stdio.h>
00028 #include <stdlib.h>
00029 #include <string.h>
00030
00031 #include "mysql.h"
00032 #include "mysql_com.h"
00033
00034 #include "cinterf.h"
00035 #include "driver_manager_defs.h"
00036
00037 #define MAX_HANDLES 25
00038 #define MAX_QUERIES 25
00039
00040
00041
00042 struct driverMySQL_connectionInfo
00043 {
00044 MYSQL* mysql;
00045 char* handle;
00046 };
00047
00048 struct driverMySQL_queryInfo
00049 {
00050 char* query;
00051 char* handle;
00052 MYSQL_RES* resultSet;
00053 struct driverMySQL_connectionInfo* connection;
00054 };
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067 DllExport int call_conv driverMySQL_initialise();
00068 DllExport int call_conv driverMySQL_connect(struct xsb_connectionHandle* handle);
00069 DllExport int call_conv driverMySQL_disconnect(struct xsb_connectionHandle* handle);
00070 DllExport struct xsb_data** call_conv driverMySQL_query(struct xsb_queryHandle* handle);
00071 DllExport int call_conv driverMySQL_register();
00072 DllExport char* call_conv driverMySQL_errorMesg();
00073
00074
00075
00076
00077
00078 extern DllExport int call_conv registerXSBDriver(char* dr, int num);
00079 extern DllExport int call_conv registerXSBFunction(char* dr, int type, union functionPtrs* func);
00080
00081