2005-12-19 13:48:42 +00:00
|
|
|
#ifndef __MYDDAS_STRUCTS_H__
|
|
|
|
#define __MYDDAS_STRUCTS_H__
|
|
|
|
|
2006-05-22 16:31:47 +00:00
|
|
|
#include "myddas.h"
|
|
|
|
#ifdef MYDDAS_STATS
|
|
|
|
#include "myddas_statistics_structs.h"
|
|
|
|
#endif
|
2006-01-17 22:54:02 +00:00
|
|
|
|
2005-12-19 13:48:42 +00:00
|
|
|
struct myddas_global {
|
|
|
|
MYDDAS_UTIL_CONNECTION myddas_top_connections;
|
2006-02-05 02:11:56 +00:00
|
|
|
#ifdef MYDDAS_TOP_LEVEL
|
|
|
|
MYDDAS_UTIL_CONNECTION myddas_top_level_connection;
|
|
|
|
#endif
|
2005-12-19 13:48:42 +00:00
|
|
|
#ifdef MYDDAS_STATS
|
|
|
|
MYDDAS_GLOBAL_STATS myddas_statistics;
|
|
|
|
#endif
|
|
|
|
};
|
|
|
|
|
2006-01-17 22:54:02 +00:00
|
|
|
struct myddas_list_preds {
|
2005-12-19 13:48:42 +00:00
|
|
|
char *pred_module;
|
|
|
|
char *pred_name;
|
|
|
|
short pred_arity;
|
2006-04-30 10:07:44 +00:00
|
|
|
//void *pe;
|
2006-01-17 22:54:02 +00:00
|
|
|
MYDDAS_UTIL_PREDICATE next;
|
|
|
|
MYDDAS_UTIL_PREDICATE previous;
|
2005-12-19 13:48:42 +00:00
|
|
|
};
|
|
|
|
|
2006-01-17 22:54:02 +00:00
|
|
|
struct myddas_list_connection {
|
2005-12-19 13:48:42 +00:00
|
|
|
void *connection;
|
2006-02-05 02:11:56 +00:00
|
|
|
|
2005-12-19 13:48:42 +00:00
|
|
|
/*If variable env is NULL, then it's a
|
|
|
|
MySQL connection, if not then it as the pointer
|
|
|
|
to the ODBC enviromment variable */
|
|
|
|
void *odbc_enviromment;
|
2006-05-22 16:31:47 +00:00
|
|
|
|
2005-12-19 13:48:42 +00:00
|
|
|
#ifdef MYDDAS_STATS
|
2006-05-22 16:31:47 +00:00
|
|
|
MYDDAS_STATS_STRUCT stats;
|
|
|
|
#endif
|
|
|
|
/* #ifdef MYDDAS_STATS */
|
|
|
|
/* /\* Total number of Rows returnes from the DataBase Server *\/ */
|
|
|
|
/* unsigned long totalNumberOfRows; */
|
2005-12-19 13:48:42 +00:00
|
|
|
|
2006-05-22 16:31:47 +00:00
|
|
|
/* /\* Total Time spent by the DataBase Server */
|
|
|
|
/* processing all querys *\/ */
|
|
|
|
/* MYDDAS_STATS_TIME totalTimeofDBServer; */
|
|
|
|
/* /\* Time spent by the DataBase Server, processing */
|
|
|
|
/* the last query *\/ */
|
|
|
|
/* MYDDAS_STATS_TIME lastTimeofDBServer; */
|
2005-12-19 13:48:42 +00:00
|
|
|
|
2006-05-22 16:31:47 +00:00
|
|
|
/* /\* Total Time spent by the DataBase Server, */
|
|
|
|
/* transfering all the data to the client *\/ */
|
|
|
|
/* MYDDAS_STATS_TIME totalFromDBServer; */
|
|
|
|
/* /\* Time spent by the DataBase Server, */
|
|
|
|
/* transfering the data of the last query *\/ */
|
|
|
|
/* MYDDAS_STATS_TIME lastFromDBServer; */
|
2005-12-19 13:48:42 +00:00
|
|
|
|
2006-05-22 16:31:47 +00:00
|
|
|
/* /\* Last bytes transfered from the server *\/ */
|
|
|
|
/* unsigned long totalBytesTransfered; */
|
|
|
|
/* /\* Total bytes transfered from the server *\/ */
|
|
|
|
/* unsigned long lastBytesTransfered; */
|
2006-01-08 16:12:42 +00:00
|
|
|
|
2006-05-22 16:31:47 +00:00
|
|
|
/* /\* Number of querys made to the Server*\/ */
|
|
|
|
/* unsigned long total_querys_made; */
|
2006-05-03 18:02:29 +00:00
|
|
|
|
2006-05-22 16:31:47 +00:00
|
|
|
/* #endif */
|
2005-12-19 13:48:42 +00:00
|
|
|
MYDDAS_UTIL_PREDICATE predicates;
|
|
|
|
|
2006-02-05 02:11:56 +00:00
|
|
|
/* Multi Queries Section */
|
2006-01-17 22:54:02 +00:00
|
|
|
unsigned long total_number_queries;
|
|
|
|
unsigned long actual_number_queries;
|
|
|
|
MYDDAS_UTIL_QUERY *queries;
|
2005-12-19 13:48:42 +00:00
|
|
|
|
2006-02-05 02:11:56 +00:00
|
|
|
/* List Integrety */
|
2006-01-17 22:54:02 +00:00
|
|
|
MYDDAS_UTIL_CONNECTION next;
|
|
|
|
MYDDAS_UTIL_CONNECTION previous;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct myddas_util_query{
|
|
|
|
char *query;
|
|
|
|
MYDDAS_UTIL_QUERY next;
|
|
|
|
};
|
2005-12-19 13:48:42 +00:00
|
|
|
|
|
|
|
#endif
|