OpenDNSSEC-enforcer  1.4.9
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)
 
int DbQuoteString (DB_HANDLE handle, const char *in, char *buffer, size_t buflen)
 
int DbDateDiff (const char *start, int delta, int sign, char *buffer, size_t buflen)
 

Macro Definition Documentation

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

Definition at line 50 of file database_support_mysql.c.

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

Definition at line 49 of file database_support_mysql.c.

Function Documentation

int DbDateDiff ( const char *  start,
int  delta,
int  sign,
char *  buffer,
size_t  buflen 
)

Definition at line 537 of file database_support_mysql.c.

References DBS_INVARG, and MsgLog().

const char* DbErrmsg ( DB_HANDLE  handle)

Definition at line 422 of file database_support_mysql.c.

int DbErrno ( DB_HANDLE  handle)

Definition at line 399 of file database_support_mysql.c.

int DbExecuteSqlNoResult ( DB_HANDLE  handle,
const char *  stmt_str 
)

Definition at line 76 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 159 of file database_support_mysql.c.

References DBS_NOTINT, DbString(), DbStringFree(), MsgLog(), and StrStrtoi().

Referenced by DbIntQuery().

int DbIntQuery ( DB_HANDLE  handle,
int *  value,
const char *  query 
)
int DbLastRowId ( DB_HANDLE  handle,
DB_ID id 
)

Definition at line 453 of file database_support_mysql.c.

References DBS_INVARG, DBS_NOSUCHROW, and MsgLog().

int DbQuoteString ( DB_HANDLE  handle,
const char *  in,
char *  buffer,
size_t  buflen 
)

Definition at line 495 of file database_support_mysql.c.

References DBS_INVARG, and MsgLog().

int DbRowId ( DB_ROW  row,
DB_ID id 
)

Definition at line 118 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 221 of file database_support_mysql.c.

References DBS_NOTINT, DbString(), DbStringFree(), MsgLog(), and StrStrtoul().

Referenced by DbRowId().