This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/MYDDAS/myddas_util.h
2005-12-19 13:48:42 +00:00

114 lines
2.9 KiB
C
Executable File

#ifndef __MYDDAS_UTIL_H__
#define __MYDDAS_UTIL_H__
#include <stdio.h>
#ifdef MYDDAS_ODBC
#include <sql.h>
#endif
#ifdef MYDDAS_STATS
#include <time.h>
#include <sys/time.h>
#endif
typedef struct myddas_global *MYDDAS_GLOBAL;
#ifdef MYDDAS_STATS
typedef struct myddas_global_stats *MYDDAS_GLOBAL_STATS;
#endif
typedef struct list_connection *MYDDAS_UTIL_CONNECTION;
typedef struct list_preds *MYDDAS_UTIL_PREDICATE;
typedef struct myddas_temp_tables *MYDDAS_TEMP_TABLES;
char *
myddas_util_delete_all_temp_table(void);
char *
myddas_util_get_table_name(void *);
/* Returns the connection type (mysql -> 1 or odbc -> 2) */
short int
myddas_util_connection_type(void *);
/* Adds a connection identifier to the MYDDAS connections list*/
MYDDAS_UTIL_CONNECTION
myddas_util_add_connection(void *,void *);
/* Search for the node of the specified connection*/
MYDDAS_UTIL_CONNECTION
myddas_util_search_connection(void *);
/* Deletes a connection node from the MYDDAS connections list*/
void
myddas_util_delete_connection(void *);
/* Adds a new predicate to it's connection node list*/
MYDDAS_UTIL_CONNECTION
myddas_util_add_predicate(char *,int , char *,void *);
/* Search for a predicate node in it's connection list*/
MYDDAS_UTIL_PREDICATE
myddas_util_search_predicate(char *,int , char *);
#ifdef MYDDAS_ODBC
/* Return enviromment identifier*/
SQLHENV
myddas_util_get_odbc_enviromment(SQLHDBC);
#endif
void *
myddas_util_get_list_pred(MYDDAS_UTIL_CONNECTION);
void *
myddas_util_get_pred_next(void *);
char *
myddas_util_get_pred_module(void *);
char *
myddas_util_get_pred_name(void *);
int
myddas_util_get_pred_arity(void *);
#ifdef MYDDAS_STATS
int
myddas_util_get_conn_total_rows(MYDDAS_UTIL_CONNECTION);
void
myddas_util_set_conn_total_rows(MYDDAS_UTIL_CONNECTION,int);
unsigned long
myddas_util_get_conn_total_time_DBServer(MYDDAS_UTIL_CONNECTION);
void
myddas_util_set_conn_total_time_DBServer(MYDDAS_UTIL_CONNECTION,unsigned long);
unsigned long
myddas_util_get_conn_last_time_DBServer(MYDDAS_UTIL_CONNECTION);
void
myddas_util_set_conn_last_time_DBServer(MYDDAS_UTIL_CONNECTION,unsigned long);
unsigned long
myddas_util_get_conn_total_time_transfering_from_DBServer(MYDDAS_UTIL_CONNECTION);
void
myddas_util_set_conn_total_time_transfering_from_DBServer(MYDDAS_UTIL_CONNECTION,unsigned long);
unsigned long
myddas_util_get_conn_last_transfering_from_DBServer(MYDDAS_UTIL_CONNECTION);
void
myddas_util_set_conn_last_transfering_from_DBServer(MYDDAS_UTIL_CONNECTION,unsigned long);
unsigned long
myddas_util_get_conn_total_transfering_from_DBServer(MYDDAS_UTIL_CONNECTION);
void
myddas_util_set_conn_total_transfering_from_DBServer(MYDDAS_UTIL_CONNECTION,unsigned long);
unsigned long
myddas_util_get_total_db_row_function(void);
void
myddas_util_set_total_db_row_function(unsigned long);
unsigned long
myddas_current_time(void);
#endif /* MYDDAS_STATS */
#ifdef DEBUG
void check_int(void);
#endif
#endif /*__MYDDAS_UTIL_H__*/