CUBRID Engine  latest
cas_dbms_util.h File Reference

Go to the source code of this file.

Classes

struct  database_info
 
struct  cache_time
 

Macros

#define free_and_init(ptr)
 
#define MAX_DIAG_DATA_VALUE   0xfffffffffffffLL
 
#define DBINFO_MAX_LENGTH   8192
 

Typedefs

typedef struct database_info DB_INFO
 
typedef struct cache_time CACHE_TIME
 

Enumerations

enum  CUBRID_STMT_TYPE {
  CUBRID_STMT_NONE = -1, CUBRID_STMT_ALTER_CLASS, CUBRID_STMT_ALTER_SERIAL, CUBRID_STMT_COMMIT_WORK,
  CUBRID_STMT_REGISTER_DATABASE, CUBRID_STMT_CREATE_CLASS, CUBRID_STMT_CREATE_INDEX, CUBRID_STMT_CREATE_TRIGGER,
  CUBRID_STMT_CREATE_SERIAL, CUBRID_STMT_DROP_DATABASE, CUBRID_STMT_DROP_CLASS, CUBRID_STMT_DROP_INDEX,
  CUBRID_STMT_DROP_LABEL, CUBRID_STMT_DROP_TRIGGER, CUBRID_STMT_DROP_SERIAL, CUBRID_STMT_EVALUATE,
  CUBRID_STMT_RENAME_CLASS, CUBRID_STMT_ROLLBACK_WORK, CUBRID_STMT_GRANT, CUBRID_STMT_REVOKE,
  CUBRID_STMT_UPDATE_STATS, CUBRID_STMT_INSERT, CUBRID_STMT_SELECT, CUBRID_STMT_UPDATE,
  CUBRID_STMT_DELETE, CUBRID_STMT_CALL, CUBRID_STMT_GET_ISO_LVL, CUBRID_STMT_GET_TIMEOUT,
  CUBRID_STMT_GET_OPT_LVL, CUBRID_STMT_SET_OPT_LVL, CUBRID_STMT_SCOPE, CUBRID_STMT_GET_TRIGGER,
  CUBRID_STMT_SET_TRIGGER, CUBRID_STMT_SAVEPOINT, CUBRID_STMT_PREPARE, CUBRID_STMT_ATTACH,
  CUBRID_STMT_USE, CUBRID_STMT_REMOVE_TRIGGER, CUBRID_STMT_RENAME_TRIGGER, CUBRID_STMT_ON_LDB,
  CUBRID_STMT_GET_LDB, CUBRID_STMT_SET_LDB, CUBRID_STMT_GET_STATS, CUBRID_STMT_CREATE_USER,
  CUBRID_STMT_DROP_USER, CUBRID_STMT_ALTER_USER, CUBRID_STMT_SET_SYS_PARAMS, CUBRID_STMT_ALTER_INDEX,
  CUBRID_STMT_CREATE_STORED_PROCEDURE, CUBRID_STMT_DROP_STORED_PROCEDURE, CUBRID_STMT_SELECT_UPDATE, CUBRID_STMT_ALTER_STORED_PROCEDURE,
  CUBRID_STMT_ALTER_STORED_PROCEDURE_OWNER = CUBRID_STMT_ALTER_STORED_PROCEDURE, CUBRID_MAX_STMT_TYPE, CUBRID_STMT_NONE = -1, CUBRID_STMT_ALTER_CLASS,
  CUBRID_STMT_ALTER_SERIAL, CUBRID_STMT_COMMIT_WORK, CUBRID_STMT_REGISTER_DATABASE, CUBRID_STMT_CREATE_CLASS,
  CUBRID_STMT_CREATE_INDEX, CUBRID_STMT_CREATE_TRIGGER, CUBRID_STMT_CREATE_SERIAL, CUBRID_STMT_DROP_DATABASE,
  CUBRID_STMT_DROP_CLASS, CUBRID_STMT_DROP_INDEX, CUBRID_STMT_DROP_LABEL, CUBRID_STMT_DROP_TRIGGER,
  CUBRID_STMT_DROP_SERIAL, CUBRID_STMT_EVALUATE, CUBRID_STMT_RENAME_CLASS, CUBRID_STMT_ROLLBACK_WORK,
  CUBRID_STMT_GRANT, CUBRID_STMT_REVOKE, CUBRID_STMT_UPDATE_STATS, CUBRID_STMT_INSERT,
  CUBRID_STMT_SELECT, CUBRID_STMT_UPDATE, CUBRID_STMT_DELETE, CUBRID_STMT_CALL,
  CUBRID_STMT_GET_ISO_LVL, CUBRID_STMT_GET_TIMEOUT, CUBRID_STMT_GET_OPT_LVL, CUBRID_STMT_SET_OPT_LVL,
  CUBRID_STMT_SCOPE, CUBRID_STMT_GET_TRIGGER, CUBRID_STMT_SET_TRIGGER, CUBRID_STMT_SAVEPOINT,
  CUBRID_STMT_PREPARE, CUBRID_STMT_ATTACH, CUBRID_STMT_USE, CUBRID_STMT_REMOVE_TRIGGER,
  CUBRID_STMT_RENAME_TRIGGER, CUBRID_STMT_ON_LDB, CUBRID_STMT_GET_LDB, CUBRID_STMT_SET_LDB,
  CUBRID_STMT_GET_STATS, CUBRID_STMT_CREATE_USER, CUBRID_STMT_DROP_USER, CUBRID_STMT_ALTER_USER,
  CUBRID_STMT_SET_SYS_PARAMS, CUBRID_STMT_ALTER_INDEX, CUBRID_STMT_CREATE_STORED_PROCEDURE, CUBRID_STMT_DROP_STORED_PROCEDURE,
  CUBRID_STMT_PREPARE_STATEMENT, CUBRID_STMT_EXECUTE_PREPARE, CUBRID_STMT_DEALLOCATE_PREPARE, CUBRID_STMT_TRUNCATE,
  CUBRID_STMT_DO, CUBRID_STMT_SELECT_UPDATE, CUBRID_STMT_SET_SESSION_VARIABLES, CUBRID_STMT_DROP_SESSION_VARIABLES,
  CUBRID_STMT_MERGE, CUBRID_STMT_SET_NAMES, CUBRID_STMT_ALTER_STORED_PROCEDURE, CUBRID_STMT_ALTER_STORED_PROCEDURE_OWNER = CUBRID_STMT_ALTER_STORED_PROCEDURE,
  CUBRID_STMT_KILL, CUBRID_STMT_VACUUM, CUBRID_STMT_SET_TIMEZONE, CUBRID_MAX_STMT_TYPE
}
 

Functions

int cfg_get_dbinfo (char *alias, char *dbinfo)
 
void cfg_free_dbinfo_all (DB_INFO *databases)
 
int cfg_read_dbinfo (DB_INFO **db_info_p)
 
DB_INFOcfg_find_db_list (DB_INFO *db_info_list_p, const char *name)
 
int char_is_delim (int c, int delim)
 
char * char_get_next (char *str_p)
 
UINT64 ntohi64 (UINT64 from)
 
int char_islower (int c)
 
int char_isupper (int c)
 
int char_isalpha (int c)
 
int char_tolower (int c)
 

Macro Definition Documentation

#define DBINFO_MAX_LENGTH   8192

Definition at line 38 of file cas_dbms_util.h.

Referenced by cfg_get_dbinfo(), and cfg_read_dbinfo().

#define free_and_init (   ptr)
Value:
do { \
if ((ptr)) { \
free ((ptr)); \
(ptr) = NULL; \
} \
} while (0)
#define NULL
Definition: freelistheap.h:34
if(extra_options)
Definition: dynamic_load.c:958

Definition at line 29 of file cas_dbms_util.h.

#define MAX_DIAG_DATA_VALUE   0xfffffffffffffLL

Definition at line 36 of file cas_dbms_util.h.

Typedef Documentation

typedef struct cache_time CACHE_TIME

Definition at line 110 of file cas_dbms_util.h.

typedef struct database_info DB_INFO

Definition at line 100 of file cas_dbms_util.h.

Enumeration Type Documentation

Enumerator
CUBRID_STMT_NONE 
CUBRID_STMT_ALTER_CLASS 
CUBRID_STMT_ALTER_SERIAL 
CUBRID_STMT_COMMIT_WORK 
CUBRID_STMT_REGISTER_DATABASE 
CUBRID_STMT_CREATE_CLASS 
CUBRID_STMT_CREATE_INDEX 
CUBRID_STMT_CREATE_TRIGGER 
CUBRID_STMT_CREATE_SERIAL 
CUBRID_STMT_DROP_DATABASE 
CUBRID_STMT_DROP_CLASS 
CUBRID_STMT_DROP_INDEX 
CUBRID_STMT_DROP_LABEL 
CUBRID_STMT_DROP_TRIGGER 
CUBRID_STMT_DROP_SERIAL 
CUBRID_STMT_EVALUATE 
CUBRID_STMT_RENAME_CLASS 
CUBRID_STMT_ROLLBACK_WORK 
CUBRID_STMT_GRANT 
CUBRID_STMT_REVOKE 
CUBRID_STMT_UPDATE_STATS 
CUBRID_STMT_INSERT 
CUBRID_STMT_SELECT 
CUBRID_STMT_UPDATE 
CUBRID_STMT_DELETE 
CUBRID_STMT_CALL 
CUBRID_STMT_GET_ISO_LVL 
CUBRID_STMT_GET_TIMEOUT 
CUBRID_STMT_GET_OPT_LVL 
CUBRID_STMT_SET_OPT_LVL 
CUBRID_STMT_SCOPE 
CUBRID_STMT_GET_TRIGGER 
CUBRID_STMT_SET_TRIGGER 
CUBRID_STMT_SAVEPOINT 
CUBRID_STMT_PREPARE 
CUBRID_STMT_ATTACH 
CUBRID_STMT_USE 
CUBRID_STMT_REMOVE_TRIGGER 
CUBRID_STMT_RENAME_TRIGGER 
CUBRID_STMT_ON_LDB 
CUBRID_STMT_GET_LDB 
CUBRID_STMT_SET_LDB 
CUBRID_STMT_GET_STATS 
CUBRID_STMT_CREATE_USER 
CUBRID_STMT_DROP_USER 
CUBRID_STMT_ALTER_USER 
CUBRID_STMT_SET_SYS_PARAMS 
CUBRID_STMT_ALTER_INDEX 
CUBRID_STMT_CREATE_STORED_PROCEDURE 
CUBRID_STMT_DROP_STORED_PROCEDURE 
CUBRID_STMT_SELECT_UPDATE 
CUBRID_STMT_ALTER_STORED_PROCEDURE 
CUBRID_STMT_ALTER_STORED_PROCEDURE_OWNER 
CUBRID_MAX_STMT_TYPE 
CUBRID_STMT_NONE 
CUBRID_STMT_ALTER_CLASS 
CUBRID_STMT_ALTER_SERIAL 
CUBRID_STMT_COMMIT_WORK 
CUBRID_STMT_REGISTER_DATABASE 
CUBRID_STMT_CREATE_CLASS 
CUBRID_STMT_CREATE_INDEX 
CUBRID_STMT_CREATE_TRIGGER 
CUBRID_STMT_CREATE_SERIAL 
CUBRID_STMT_DROP_DATABASE 
CUBRID_STMT_DROP_CLASS 
CUBRID_STMT_DROP_INDEX 
CUBRID_STMT_DROP_LABEL 
CUBRID_STMT_DROP_TRIGGER 
CUBRID_STMT_DROP_SERIAL 
CUBRID_STMT_EVALUATE 
CUBRID_STMT_RENAME_CLASS 
CUBRID_STMT_ROLLBACK_WORK 
CUBRID_STMT_GRANT 
CUBRID_STMT_REVOKE 
CUBRID_STMT_UPDATE_STATS 
CUBRID_STMT_INSERT 
CUBRID_STMT_SELECT 
CUBRID_STMT_UPDATE 
CUBRID_STMT_DELETE 
CUBRID_STMT_CALL 
CUBRID_STMT_GET_ISO_LVL 
CUBRID_STMT_GET_TIMEOUT 
CUBRID_STMT_GET_OPT_LVL 
CUBRID_STMT_SET_OPT_LVL 
CUBRID_STMT_SCOPE 
CUBRID_STMT_GET_TRIGGER 
CUBRID_STMT_SET_TRIGGER 
CUBRID_STMT_SAVEPOINT 
CUBRID_STMT_PREPARE 
CUBRID_STMT_ATTACH 
CUBRID_STMT_USE 
CUBRID_STMT_REMOVE_TRIGGER 
CUBRID_STMT_RENAME_TRIGGER 
CUBRID_STMT_ON_LDB 
CUBRID_STMT_GET_LDB 
CUBRID_STMT_SET_LDB 
CUBRID_STMT_GET_STATS 
CUBRID_STMT_CREATE_USER 
CUBRID_STMT_DROP_USER 
CUBRID_STMT_ALTER_USER 
CUBRID_STMT_SET_SYS_PARAMS 
CUBRID_STMT_ALTER_INDEX 
CUBRID_STMT_CREATE_STORED_PROCEDURE 
CUBRID_STMT_DROP_STORED_PROCEDURE 
CUBRID_STMT_PREPARE_STATEMENT 
CUBRID_STMT_EXECUTE_PREPARE 
CUBRID_STMT_DEALLOCATE_PREPARE 
CUBRID_STMT_TRUNCATE 
CUBRID_STMT_DO 
CUBRID_STMT_SELECT_UPDATE 
CUBRID_STMT_SET_SESSION_VARIABLES 
CUBRID_STMT_DROP_SESSION_VARIABLES 
CUBRID_STMT_MERGE 
CUBRID_STMT_SET_NAMES 
CUBRID_STMT_ALTER_STORED_PROCEDURE 
CUBRID_STMT_ALTER_STORED_PROCEDURE_OWNER 
CUBRID_STMT_KILL 
CUBRID_STMT_VACUUM 
CUBRID_STMT_SET_TIMEZONE 
CUBRID_MAX_STMT_TYPE 

Definition at line 40 of file cas_dbms_util.h.

Function Documentation

DB_INFO* cfg_find_db_list ( DB_INFO db_info_list_p,
const char *  name 
)
void cfg_free_dbinfo_all ( DB_INFO databases)

Definition at line 51 of file cas_dbms_util.c.

References database_info::alias, database_info::dbinfo, free_and_init, database_info::next, and NULL.

Referenced by cfg_read_dbinfo().

Here is the caller graph for this function:

char* char_get_next ( char *  str_p)

Definition at line 268 of file cas_dbms_util.c.

References char_is_delim(), and p.

Referenced by cfg_read_dbinfo().

Here is the caller graph for this function:

int char_is_delim ( int  c,
int  delim 
)

Definition at line 255 of file cas_dbms_util.c.

Referenced by cfg_pop_token(), and char_get_next().

Here is the caller graph for this function:

int char_islower ( int  c)

Definition at line 37 of file chartype.c.

Referenced by char_isalpha(), char_islower_iso8859(), and char_toupper().

Here is the caller graph for this function:

int char_isupper ( int  c)

Definition at line 49 of file chartype.c.

Referenced by char_isalpha(), char_isupper_iso8859(), char_tolower(), and locale_alloc_collation_id().

Here is the caller graph for this function:

UINT64 ntohi64 ( UINT64  from)

Definition at line 328 of file cas_dbms_util.c.