27 #include <mysql/mysql.h>
63 qbind->buffer = (
void *) qp->
data;
65 qbind->buffer_type = MYSQL_TYPE_BLOB;
110 qbind->buffer = (
void *) qp->
data;
111 qbind->buffer_length = qp->
data_len;
112 qbind->buffer_type = MYSQL_TYPE_STRING;
153 qbind->buffer = (
void *) qp->
data;
154 qbind->buffer_length =
sizeof(uint16_t);
155 qbind->buffer_type = MYSQL_TYPE_SHORT;
156 qbind->is_unsigned = 1;
175 .data_len =
sizeof(*x)
197 qbind->buffer = (
void *) qp->
data;
198 qbind->buffer_length =
sizeof(uint32_t);
199 qbind->buffer_type = MYSQL_TYPE_LONG;
200 qbind->is_unsigned = 1;
219 .data_len =
sizeof(*x)
241 qbind->buffer = (
void *) qp->
data;
242 qbind->buffer_length =
sizeof(uint64_t);
243 qbind->buffer_type = MYSQL_TYPE_LONGLONG;
244 qbind->is_unsigned = 1;
263 .data_len =
sizeof(*x)
292 qbind->buffer_length = buf_size;
293 qbind->buffer_type = MYSQL_TYPE_BLOB;
344 qbind->buffer_length = buf_size;
345 qbind->buffer_type = MYSQL_TYPE_BLOB;
Helper library to access a MySQL database.
size_t GNUNET_CRYPTO_rsa_public_key_encode(const struct GNUNET_CRYPTO_RsaPublicKey *key, void **buffer)
Encode the public key in a format suitable for storing it into a file.
size_t GNUNET_CRYPTO_rsa_signature_encode(const struct GNUNET_CRYPTO_RsaSignature *sig, void **buffer)
Encode the given signature in a format suitable for storing it into a file.
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
#define GNUNET_free(ptr)
Wrapper around free.
struct GNUNET_MY_QueryParam GNUNET_MY_query_param_absolute_time(const struct GNUNET_TIME_Absolute *x)
Generate query parameter for an absolute time value.
#define GNUNET_MY_query_param_auto_from_type(x)
Generate fixed-size query parameter with size determined by variable type.
struct GNUNET_MY_QueryParam GNUNET_MY_query_param_absolute_time_nbo(const struct GNUNET_TIME_AbsoluteNBO *x)
Generate query parameter for an absolute time value.
struct GNUNET_MY_QueryParam GNUNET_MY_query_param_uint64(const uint64_t *x)
Generate query parameter for an uint64_t in host byte order.
struct GNUNET_MY_QueryParam GNUNET_MY_query_param_string(const char *ptr)
Generate query parameter for a string.
struct GNUNET_MY_QueryParam GNUNET_MY_query_param_fixed_size(const void *ptr, size_t ptr_size)
Generate query parameter for a buffer ptr of ptr_size bytes.
struct GNUNET_MY_QueryParam GNUNET_MY_query_param_uint16(const uint16_t *x)
Generate query parameter for an uint16_t in host byte order.
struct GNUNET_MY_QueryParam GNUNET_MY_query_param_uint32(const uint32_t *x)
Generate query parameter for an uint32_t in host byte order.
struct GNUNET_MY_QueryParam GNUNET_MY_query_param_rsa_signature(const struct GNUNET_CRYPTO_RsaSignature *x)
Generate query parameter for an RSA signature.
struct GNUNET_MY_QueryParam GNUNET_MY_query_param_rsa_public_key(const struct GNUNET_CRYPTO_RsaPublicKey *x)
Generate query parameter for an RSA public key.
static int my_conv_string(void *cls, const struct GNUNET_MY_QueryParam *qp, MYSQL_BIND *qbind)
Function called to convert input argument into SQL parameters.
static void my_clean_query(void *cls, MYSQL_BIND *qbind)
Function called to clean up memory allocated by a GNUNET_MY_QueryConverter.
static int my_conv_fixed_size(void *cls, const struct GNUNET_MY_QueryParam *qp, MYSQL_BIND *qbind)
Function called to convert input argument into SQL parameters.
static int my_conv_rsa_signature(void *cls, const struct GNUNET_MY_QueryParam *qp, MYSQL_BIND *qbind)
Function called to convert input argument into SQL parameters.
static int my_conv_uint64(void *cls, const struct GNUNET_MY_QueryParam *qp, MYSQL_BIND *qbind)
Function called to convert input argument into SQL parameters.
static int my_conv_uint32(void *cls, const struct GNUNET_MY_QueryParam *qp, MYSQL_BIND *qbind)
Function called to convert input argument into SQL parameters.
static int my_conv_uint16(void *cls, const struct GNUNET_MY_QueryParam *qp, MYSQL_BIND *qbind)
Function called to convert input argument into SQL parameters.
static int my_conv_rsa_public_key(void *cls, const struct GNUNET_MY_QueryParam *qp, MYSQL_BIND *qbind)
Function called to convert input argument into SQL parameters.
The public information of an RSA key pair.
Information we pass to GNUNET_MY_exec_prepared() to initialize the arguments of the prepared statemen...
unsigned long data_len
Information to pass to conv.
const void * data
Information to pass to conv.
unsigned int num_params
Number of arguments the conv converter expects to initialize.
GNUNET_MY_QueryConverter conv
Function to call for the type conversion.
Time for absolute time used by GNUnet, in microseconds and in network byte order.
Time for absolute times used by GNUnet, in microseconds.