30 #ifndef GNUNET_MYSQL_LIB_H
31 #define GNUNET_MYSQL_LIB_H
35 #include <mysql/mysql.h>
static const struct GNUNET_CONFIGURATION_Handle * cfg
Configuration we are using.
static struct SolverHandle * sh
static unsigned int num_values
static struct GNUNET_TESTBED_Controller * mc
Handle to the master controller.
static struct GNUNET_CONTAINER_MultiHashMap * values
Collection of all values (represented with ValueSet).
struct GNUNET_MYSQL_StatementHandle * GNUNET_MYSQL_statement_prepare(struct GNUNET_MYSQL_Context *mc, const char *query)
Prepare a statement.
int(* GNUNET_MYSQL_DataProcessor)(void *cls, unsigned int num_values, MYSQL_BIND *values)
Type of a callback that will be called for each data set returned from MySQL.
MYSQL_STMT * GNUNET_MYSQL_statement_get_stmt(struct GNUNET_MYSQL_StatementHandle *sh)
Get internal handle for a prepared statement.
struct GNUNET_MYSQL_Context * GNUNET_MYSQL_context_create(const struct GNUNET_CONFIGURATION_Handle *cfg, const char *section)
Create a mysql context.
void GNUNET_MYSQL_statements_invalidate(struct GNUNET_MYSQL_Context *mc)
Close database connection and all prepared statements (we got a DB error).
void GNUNET_MYSQL_context_destroy(struct GNUNET_MYSQL_Context *mc)
Destroy a mysql context.
int GNUNET_MYSQL_statement_run(struct GNUNET_MYSQL_Context *mc, const char *sql)
Run a SQL statement.
const char * section
Our section.
Handle for a prepared statement.
char * query
Original query string.