29#include <mstdlib/base/m_defs.h>
30#include <mstdlib/base/m_types.h>
333struct M_sql_connpool;
struct M_buf M_buf_t
Definition: m_buf.h:77
M_sql_connpool_flags_t
Definition: m_sql.h:338
const char * M_sql_connpool_driver_name(M_sql_connpool_t *pool)
struct M_sql_connpool M_sql_connpool_t
Definition: m_sql.h:335
M_sql_error_t M_sql_connpool_add_readonly_pool(M_sql_connpool_t *pool, const char *conn_str, size_t max_conns, char *error, size_t error_size)
M_sql_error_t M_sql_connpool_create(M_sql_connpool_t **pool, const char *driver, const char *conn_str, const char *username, const char *password, size_t max_conns, M_uint32 flags, char *error, size_t error_size)
void M_sql_connpool_set_timeouts(M_sql_connpool_t *pool, M_time_t reconnect_time_s, M_time_t max_idle_time_s, M_time_t fallback_s)
size_t M_sql_connpool_active_conns(M_sql_connpool_t *pool, M_bool readonly)
const char * M_sql_connpool_driver_version(M_sql_connpool_t *pool)
M_sql_error_t M_sql_connpool_start(M_sql_connpool_t *pool, char *error, size_t error_size)
const char * M_sql_connpool_server_version(M_sql_connpool_t *pool)
const char * M_sql_connpool_driver_display_name(M_sql_connpool_t *pool)
M_sql_error_t M_sql_connpool_destroy(M_sql_connpool_t *pool)
@ M_SQL_CONNPOOL_FLAG_NONE
Definition: m_sql.h:339
@ M_SQL_CONNPOOL_FLAG_PRESPAWN_ALL
Definition: m_sql.h:340
@ M_SQL_CONNPOOL_FLAG_NO_AUTORETRY_QUERY
Definition: m_sql.h:342
@ M_SQL_CONNPOOL_FLAG_LOAD_BALANCE
Definition: m_sql.h:348
M_bool M_sql_error_is_fatal(M_sql_error_t err)
const char * M_sql_error_string(M_sql_error_t err)
M_bool M_sql_error_is_rollback(M_sql_error_t err)
M_bool M_sql_error_is_disconnect(M_sql_error_t err)
M_sql_error_t
Definition: m_sql.h:190
M_bool M_sql_error_is_error(M_sql_error_t err)
M_sql_data_type_t
Definition: m_sql.h:256
@ M_SQL_ERROR_CONN_PARAMS
Definition: m_sql.h:202
@ M_SQL_ERROR_SUCCESS_ROW
Definition: m_sql.h:196
@ M_SQL_ERROR_CONN_BADAUTH
Definition: m_sql.h:204
@ M_SQL_ERROR_USER_BYPASS
Definition: m_sql.h:237
@ M_SQL_ERROR_CONN_DRIVERVER
Definition: m_sql.h:201
@ M_SQL_ERROR_INVALID_TYPE
Definition: m_sql.h:228
@ M_SQL_ERROR_UNSET
Definition: m_sql.h:252
@ M_SQL_ERROR_QUERY_CONSTRAINT
Definition: m_sql.h:219
@ M_SQL_ERROR_PREPARE_NOMULITQUERY
Definition: m_sql.h:210
@ M_SQL_ERROR_SUCCESS
Definition: m_sql.h:191
@ M_SQL_ERROR_CONN_FAILED
Definition: m_sql.h:203
@ M_SQL_ERROR_CONN_DRIVERLOAD
Definition: m_sql.h:200
@ M_SQL_ERROR_INUSE
Definition: m_sql.h:225
@ M_SQL_ERROR_USER_SUCCESS
Definition: m_sql.h:231
@ M_SQL_ERROR_QUERY_DEADLOCK
Definition: m_sql.h:218
@ M_SQL_ERROR_USER_FAILURE
Definition: m_sql.h:246
@ M_SQL_ERROR_CONN_LOST
Definition: m_sql.h:205
@ M_SQL_ERROR_CONN_NODRIVER
Definition: m_sql.h:199
@ M_SQL_ERROR_QUERY_WRONGNUMPARAMS
Definition: m_sql.h:214
@ M_SQL_ERROR_INVALID_USE
Definition: m_sql.h:227
@ M_SQL_ERROR_QUERY_FAILURE
Definition: m_sql.h:220
@ M_SQL_ERROR_QUERY_NOTPREPARED
Definition: m_sql.h:213
@ M_SQL_ERROR_USER_RETRY
Definition: m_sql.h:241
@ M_SQL_ERROR_PREPARE_INVALID
Definition: m_sql.h:208
@ M_SQL_ERROR_PREPARE_STRNOTBOUND
Definition: m_sql.h:209
@ M_SQL_ERROR_QUERY_PREPARE
Definition: m_sql.h:215
@ M_SQL_DATA_TYPE_UNKNOWN
Definition: m_sql.h:257
@ M_SQL_DATA_TYPE_TEXT
Definition: m_sql.h:262
@ M_SQL_DATA_TYPE_INT32
Definition: m_sql.h:260
@ M_SQL_DATA_TYPE_INT64
Definition: m_sql.h:261
@ M_SQL_DATA_TYPE_INT16
Definition: m_sql.h:259
@ M_SQL_DATA_TYPE_BINARY
Definition: m_sql.h:263
@ M_SQL_DATA_TYPE_BOOL
Definition: m_sql.h:258
M_int64 M_sql_gen_timerand_id(M_sql_connpool_t *pool, size_t max_len)
M_uint64 M_sql_rollback_delay_ms(M_sql_connpool_t *pool)
M_sql_query_bitop_t
Definition: m_sql.h:706
M_sql_query_updlock_type_t
Definition: m_sql.h:623
M_bool M_sql_query_append_bitop(M_sql_connpool_t *pool, M_buf_t *query, M_sql_query_bitop_t op, const char *exp1, const char *exp2)
void M_sql_query_append_datatype(M_sql_connpool_t *pool, M_buf_t *query, M_sql_data_type_t type, size_t max_len, M_bool is_cast)
void M_sql_query_append_updlock(M_sql_connpool_t *pool, M_buf_t *query, M_sql_query_updlock_type_t type, const char *table_name)
@ M_SQL_BITOP_AND
Definition: m_sql.h:707
@ M_SQL_BITOP_OR
Definition: m_sql.h:708
@ M_SQL_QUERY_UPDLOCK_TABLE
Definition: m_sql.h:624
@ M_SQL_QUERY_UPDLOCK_QUERYEND
Definition: m_sql.h:628
M_int64 M_time_t
Definition: m_time.h:161