#include <stdarg.h>
#include <string.h>
#include <stdio.h>
#include <time.h>
#include <mysql.h>
#include "ksm/dbsdef.h"
#include "ksm/database.h"
#include "ksm/debug.h"
#include "ksm/message.h"
#include "ksm/string_util.h"
#include "ksm/string_util2.h"
Go to the source code of this file.
Defines | |
#define | MIN(x, y) ((x) < (y) ? (x) : (y)) |
#define | MAX(x, y) ((x) > (y) ? (x) : (y)) |
Functions | |
int | DbExecuteSqlNoResult (DB_HANDLE handle, const char *stmt_str) |
int | DbRowId (DB_ROW row, DB_ID *id) |
int | DbInt (DB_ROW row, int field_index, int *value) |
int | DbUnsignedLong (DB_ROW row, int field_index, unsigned long *value) |
int | DbIntQuery (DB_HANDLE handle, int *value, const char *query) |
int | DbStringBuffer (DB_ROW row, int field_index, char *buffer, size_t buflen) |
int | DbErrno (DB_HANDLE handle) |
const char * | DbErrmsg (DB_HANDLE handle) |
int | DbLastRowId (DB_HANDLE handle, DB_ID *id) |
#define MAX | ( | x, | ||
y | ||||
) | ((x) > (y) ? (x) : (y)) |
Definition at line 52 of file database_support_mysql.c.
#define MIN | ( | x, | ||
y | ||||
) | ((x) < (y) ? (x) : (y)) |
Definition at line 51 of file database_support_mysql.c.
const char* DbErrmsg | ( | DB_HANDLE | handle | ) |
Definition at line 424 of file database_support_mysql.c.
int DbErrno | ( | DB_HANDLE | handle | ) |
Definition at line 401 of file database_support_mysql.c.
int DbExecuteSqlNoResult | ( | DB_HANDLE | handle, | |
const char * | stmt_str | |||
) |
Definition at line 78 of file database_support_mysql.c.
References DbExecuteSql(), DbFreeResult(), DBS_UNEXRES, and MsgLog().
int DbInt | ( | DB_ROW | row, | |
int | field_index, | |||
int * | value | |||
) |
Definition at line 161 of file database_support_mysql.c.
References DBS_NOTINT, DbString(), DbStringFree(), MsgLog(), and StrStrtoi().
int DbIntQuery | ( | DB_HANDLE | handle, | |
int * | value, | |||
const char * | query | |||
) |
Definition at line 291 of file database_support_mysql.c.
References DbExecuteSql(), DbFetchRow(), DbFreeResult(), DbFreeRow(), DbInt(), DBS_NORESULT, DBS_TOOMANYROW, and MsgLog().
Definition at line 455 of file database_support_mysql.c.
References DBS_INVARG, and MsgLog().
Definition at line 120 of file database_support_mysql.c.
References DBS_INVARG, DbUnsignedLong(), and MsgLog().
int DbStringBuffer | ( | DB_ROW | row, | |
int | field_index, | |||
char * | buffer, | |||
size_t | buflen | |||
) |
Definition at line 354 of file database_support_mysql.c.
References DB_ROW_MAGIC, DBS_INVARG, DbString(), DbStringFree(), db_row::magic, MsgLog(), and StrStrncpy().
int DbUnsignedLong | ( | DB_ROW | row, | |
int | field_index, | |||
unsigned long * | value | |||
) |
Definition at line 223 of file database_support_mysql.c.
References DBS_NOTINT, DbString(), DbStringFree(), MsgLog(), and StrStrtoul().