2 #include "../acl_cpp_define.hpp" 3 #include "../stdlib/string.hpp" 4 #include "../db/db_handle.hpp" 6 #if !defined(ACL_CLIENT_ONLY) && !defined(ACL_DB_DISABLE) 8 typedef struct st_mysql
MYSQL;
30 db_mysql(
const char* dbaddr,
const char* dbname,
31 const char* dbuser,
const char* dbpass,
32 unsigned long dbflags = 0,
bool auto_commit =
true,
33 int conn_timeout = 60,
int rw_timeout = 60,
34 const char* charset =
"utf8");
47 unsigned long mysql_libversion(
void)
const;
53 const char* mysql_client_info(
void)
const;
71 static void load(
void);
80 const char* dbtype(
void)
const;
85 int get_errno(
void)
const;
90 const char* get_error(
void)
const;
95 bool dbopen(
const char* charset = NULL);
100 bool is_opened(
void)
const;
110 bool tbl_exists(
const char* tbl_name);
115 bool sql_select(
const char* sql,
db_rows* result = NULL);
120 bool sql_update(
const char* sql);
125 int affect_count(
void)
const;
132 bool begin_transaction(
void);
151 unsigned long dbflags_;
157 bool sane_mysql_query(
const char* sql);
158 void sane_mysql_init(
const char* dbaddr,
const char* dbname,
159 const char* dbuser,
const char* dbpass,
160 unsigned long dbflags,
bool auto_commit,
161 int conn_timeout,
int rw_timeout,
162 const char* charset);
167 #endif // !defined(ACL_CLIENT_ONLY) && !defined(ACL_DB_DISABLE)
MYSQL * get_conn(void) const