OpenDNSSEC-enforcer  1.3.14
Macros | Functions
database_support_mysql.c File Reference
#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"
Include dependency graph for database_support_mysql.c:

Go to the source code of this file.

Macros

#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)
 

Macro Definition Documentation

#define MAX (   x,
 
)    ((x) > (y) ? (x) : (y))

Definition at line 52 of file database_support_mysql.c.

#define MIN (   x,
 
)    ((x) < (y) ? (x) : (y))

Definition at line 51 of file database_support_mysql.c.

Function Documentation

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 
)
int DbLastRowId ( DB_HANDLE  handle,
DB_ID id 
)

Definition at line 455 of file database_support_mysql.c.

References DBS_INVARG, DBS_NOSUCHROW, and MsgLog().

int DbRowId ( DB_ROW  row,
DB_ID id 
)

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 
)
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().