1 #ifndef ACL_DBPOOL_INCLUDE_H 2 #define ACL_DBPOOL_INCLUDE_H 4 #ifndef ACL_CLIENT_ONLY 10 #include "../stdlib/acl_define.h" 12 #include "../stdlib/acl_stdlib.h" 14 #define ACL_DB_DEBUG_MEM (1<<0) 46 #define ACL_DBH_STATUS_NULL 0 47 #define ACL_DBH_STATUS_READY 1 48 #define ACL_DBH_STATUS_INUSE 2 56 int (*walk_fn)(
const void** result_row,
void *arg),
void *arg);
58 int (*callback)(
const void** result_row,
void *arg),
void *arg);
95 #define ACL_DB_AUTO_COMMIT(_db_pool_) (_db_pool_ ? _db_pool_->db_info.auto_commit : 0) int(* sql_results)(ACL_DB_HANDLE *handle, const char *sql, int *error, int(*walk_fn)(const void **result_row, void *arg), void *arg)
int(* db_after_connect)(ACL_DB_HANDLE *db_handle, void *ctx)
void(* destroy)(ACL_DB_POOL *)
ACL_API void acl_dbpool_destroy(ACL_DB_POOL *db_pool)
int(* sql_update)(ACL_DB_HANDLE *handle, const char *sql, int *error)
ACL_API void acl_dbpool_set_ping(ACL_DB_POOL *db_pool, int(*ping_fn)(ACL_DB_HANDLE *))
ACL_API void acl_dbpool_close(ACL_DB_HANDLE *db_handle)
ACL_API ACL_DB_HANDLE * acl_dbpool_peek(ACL_DB_POOL *db_pool)
int(* dbh_ping)(ACL_DB_HANDLE *)
void(* dbh_check)(ACL_DB_POOL *)
void(* dbh_close)(ACL_DB_HANDLE *)
struct ACL_DB_INFO ACL_DB_INFO
ACL_API void acl_dbpool_check(ACL_DB_POOL *db_pool)
ACL_API void * acl_dbpool_export(ACL_DB_HANDLE *db_handle)
ACL_API void acl_dbpool_release(ACL_DB_HANDLE *db_handle)
void(* dbh_release)(ACL_DB_HANDLE *)
int(* sql_result)(ACL_DB_HANDLE *handle, const char *sql, int *error, int(*callback)(const void **result_row, void *arg), void *arg)
int(* db_before_connect)(ACL_DB_HANDLE *db_handle, void *ctx)
ACL_API ACL_DB_POOL * acl_dbpool_create(const char *db_type, const ACL_DB_INFO *db_info)
void(* free_result)(ACL_SQL_RES *res)