functions to extract result values More...
#include "platform.h"
#include "gnunet_util_lib.h"
#include "gnunet_mysql_compat.h"
#include "gnunet_my_lib.h"
Go to the source code of this file.
Functions | |
static int | pre_extract_varsize_blob (void *cls, struct GNUNET_MY_ResultSpec *rs, MYSQL_STMT *stmt, unsigned int column, MYSQL_BIND *results) |
extract data from a Mysql database result at row row More... | |
static int | post_extract_varsize_blob (void *cls, struct GNUNET_MY_ResultSpec *rs, MYSQL_STMT *stmt, unsigned int column, MYSQL_BIND *results) |
extract data from a Mysql database result at row row More... | |
static void | cleanup_varsize_blob (void *cls, struct GNUNET_MY_ResultSpec *rs) |
extract data from a Mysql database result at row row More... | |
struct GNUNET_MY_ResultSpec | GNUNET_MY_result_spec_variable_size (void **dst, size_t *ptr_size) |
Variable-size result expected. More... | |
static int | pre_extract_fixed_blob (void *cls, struct GNUNET_MY_ResultSpec *rs, MYSQL_STMT *stmt, unsigned int column, MYSQL_BIND *results) |
Extract data from a Mysql database result at row row. More... | |
static int | post_extract_fixed_blob (void *cls, struct GNUNET_MY_ResultSpec *rs, MYSQL_STMT *stmt, unsigned int column, MYSQL_BIND *results) |
Check size of extracted fixed size data from a Mysql database result at row row. More... | |
struct GNUNET_MY_ResultSpec | GNUNET_MY_result_spec_fixed_size (void *ptr, size_t ptr_size) |
Fixed-size result expected. More... | |
static int | pre_extract_rsa_public_key (void *cls, struct GNUNET_MY_ResultSpec *rs, MYSQL_STMT *stmt, unsigned int column, MYSQL_BIND *results) |
Extract data from a Mysql database result at row row. More... | |
static int | post_extract_rsa_public_key (void *cls, struct GNUNET_MY_ResultSpec *rs, MYSQL_STMT *stmt, unsigned int column, MYSQL_BIND *results) |
Check size of extracted fixed size data from a Mysql database result at row row. More... | |
static void | clean_rsa_public_key (void *cls, struct GNUNET_MY_ResultSpec *rs) |
Function called to clean up memory allocated by a GNUNET_MY_ResultConverter. More... | |
struct GNUNET_MY_ResultSpec | GNUNET_MY_result_spec_rsa_public_key (struct GNUNET_CRYPTO_RsaPublicKey **rsa) |
RSA public key expected. More... | |
static int | pre_extract_rsa_signature (void *cls, struct GNUNET_MY_ResultSpec *rs, MYSQL_STMT *stmt, unsigned int column, MYSQL_BIND *results) |
Extract data from a Mysql database result at row row. More... | |
static int | post_extract_rsa_signature (void *cls, struct GNUNET_MY_ResultSpec *rs, MYSQL_STMT *stmt, unsigned int column, MYSQL_BIND *results) |
Extract data from a Mysql database result at row row. More... | |
static void | clean_rsa_signature (void *cls, struct GNUNET_MY_ResultSpec *rs) |
Function called to clean up memory allocated by a GNUNET_MY_ResultConverter. More... | |
struct GNUNET_MY_ResultSpec | GNUNET_MY_result_spec_rsa_signature (struct GNUNET_CRYPTO_RsaSignature **sig) |
RSA signature expected. More... | |
static int | pre_extract_string (void *cls, struct GNUNET_MY_ResultSpec *rs, MYSQL_STMT *stmt, unsigned int column, MYSQL_BIND *results) |
Extract data from a Mysql database result at row row. More... | |
static int | post_extract_string (void *cls, struct GNUNET_MY_ResultSpec *rs, MYSQL_STMT *stmt, unsigned int column, MYSQL_BIND *results) |
Check size of extracted fixed size data from a Mysql database. More... | |
struct GNUNET_MY_ResultSpec | GNUNET_MY_result_spec_string (char **dst) |
0- terminated string exprected. More... | |
struct GNUNET_MY_ResultSpec | GNUNET_MY_result_spec_absolute_time (struct GNUNET_TIME_Absolute *at) |
Absolute time expected. More... | |
struct GNUNET_MY_ResultSpec | GNUNET_MY_result_spec_absolute_time_nbo (struct GNUNET_TIME_AbsoluteNBO *at) |
Absolute time in network byte order expected. More... | |
static int | pre_extract_uint16 (void *cls, struct GNUNET_MY_ResultSpec *rs, MYSQL_STMT *stmt, unsigned int column, MYSQL_BIND *results) |
Extract data from a Postgres database result at row row. More... | |
static int | post_extract_uint16 (void *cls, struct GNUNET_MY_ResultSpec *rs, MYSQL_STMT *stmt, unsigned int column, MYSQL_BIND *results) |
Check size of extracted fixed size data from a Mysql database. More... | |
struct GNUNET_MY_ResultSpec | GNUNET_MY_result_spec_uint16 (uint16_t *u16) |
uint16_t expected More... | |
static int | pre_extract_uint32 (void *cls, struct GNUNET_MY_ResultSpec *rs, MYSQL_STMT *stmt, unsigned int column, MYSQL_BIND *results) |
Extract data from a MYSQL database result at row row. More... | |
static int | post_extract_uint32 (void *cls, struct GNUNET_MY_ResultSpec *rs, MYSQL_STMT *stmt, unsigned int column, MYSQL_BIND *results) |
Extract data from a MYSQL database result at row row. More... | |
struct GNUNET_MY_ResultSpec | GNUNET_MY_result_spec_uint32 (uint32_t *u32) |
uint32_t expected More... | |
static int | pre_extract_uint64 (void *cls, struct GNUNET_MY_ResultSpec *rs, MYSQL_STMT *stmt, unsigned int column, MYSQL_BIND *results) |
Extract data from a MYSQL database result at row row. More... | |
static int | post_extract_uint64 (void *cls, struct GNUNET_MY_ResultSpec *rs, MYSQL_STMT *stmt, unsigned int column, MYSQL_BIND *results) |
Check size of extracted fixed-size data from a Mysql database. More... | |
struct GNUNET_MY_ResultSpec | GNUNET_MY_result_spec_uint64 (uint64_t *u64) |
uint64_t expected. More... | |
functions to extract result values
Definition in file my_result_helper.c.
|
static |
extract data from a Mysql database result at row row
cls | closure | |
[in,out] | rs | |
stmt | the mysql statement that is being run | |
column | the column that is being processed | |
[out] | result | mysql result |
Definition at line 45 of file my_result_helper.c.
References GNUNET_OK, GNUNET_MY_ResultSpec::is_null, GNUNET_MY_ResultSpec::mysql_bind_output_length, and results.
|
static |
extract data from a Mysql database result at row row
cls | closure | |
[in,out] | rs | |
stmt | the mysql statement that is being run | |
column | the column that is being processed | |
[out] | results |
Definition at line 74 of file my_result_helper.c.
References buf, GNUNET_MY_ResultSpec::dst, GNUNET_free, GNUNET_malloc, GNUNET_OK, GNUNET_SYSERR, GNUNET_MY_ResultSpec::mysql_bind_output_length, GNUNET_MY_ResultSpec::result_size, results, and size.
|
static |
extract data from a Mysql database result at row row
cls | closure | |
[in,out] | rs |
Definition at line 120 of file my_result_helper.c.
References GNUNET_MY_ResultSpec::dst, and GNUNET_free.
|
static |
Extract data from a Mysql database result at row row.
cls | closure | |
[in,out] | rs | |
stmt | the mysql statement that is being run | |
column | the column that is being processed | |
[out] | results |
Definition at line 163 of file my_result_helper.c.
References GNUNET_MY_ResultSpec::dst, GNUNET_MY_ResultSpec::dst_size, GNUNET_OK, GNUNET_MY_ResultSpec::is_null, GNUNET_MY_ResultSpec::mysql_bind_output_length, and results.
|
static |
Check size of extracted fixed size data from a Mysql database result at row row.
cls | closure | |
[in,out] | rs | |
stmt | the mysql statement that is being run | |
column | the column that is being processed | |
[out] | results |
Definition at line 194 of file my_result_helper.c.
|
static |
Extract data from a Mysql database result at row row.
cls | closure | |
[in,out] | rs | |
stmt | the mysql statement that is being run | |
column | the column that is being processed | |
[out] | results |
Definition at line 246 of file my_result_helper.c.
References GNUNET_OK, GNUNET_MY_ResultSpec::is_null, GNUNET_MY_ResultSpec::mysql_bind_output_length, and results.
|
static |
Check size of extracted fixed size data from a Mysql database result at row row.
cls | closure | |
[in,out] | rs | |
stmt | the mysql statement that is being run | |
column | the column that is being processed | |
[out] | results |
Definition at line 277 of file my_result_helper.c.
References buf, GNUNET_MY_ResultSpec::dst, GNUNET_CRYPTO_rsa_public_key_decode(), GNUNET_ERROR_TYPE_ERROR, GNUNET_free, GNUNET_log, GNUNET_malloc, GNUNET_OK, GNUNET_SYSERR, GNUNET_MY_ResultSpec::mysql_bind_output_length, pk, results, and size.
|
static |
Function called to clean up memory allocated by a GNUNET_MY_ResultConverter.
cls | closure |
rs | result data to clean up |
Definition at line 331 of file my_result_helper.c.
References GNUNET_MY_ResultSpec::dst, GNUNET_CRYPTO_rsa_public_key_free(), and pk.
|
static |
Extract data from a Mysql database result at row row.
cls | closure | |
[in,out] | rs | |
stmt | the mysql statement that is being run | |
column | the column that is being processed | |
[out] | results |
Definition at line 380 of file my_result_helper.c.
References GNUNET_OK, GNUNET_MY_ResultSpec::is_null, GNUNET_MY_ResultSpec::mysql_bind_output_length, and results.
|
static |
Extract data from a Mysql database result at row row.
cls | closure | |
[in,out] | rs | |
stmt | the mysql statement that is being run | |
column | the column that is being processed | |
[out] | results |
Definition at line 410 of file my_result_helper.c.
References buf, GNUNET_MY_ResultSpec::dst, GNUNET_CRYPTO_rsa_signature_decode(), GNUNET_ERROR_TYPE_ERROR, GNUNET_free, GNUNET_log, GNUNET_malloc, GNUNET_OK, GNUNET_SYSERR, GNUNET_MY_ResultSpec::mysql_bind_output_length, results, and size.
|
static |
Function called to clean up memory allocated by a GNUNET_MY_ResultConverter.
cls | closure |
rd | result data to clean up |
Definition at line 462 of file my_result_helper.c.
References GNUNET_MY_ResultSpec::dst, and GNUNET_CRYPTO_rsa_signature_free().
|
static |
Extract data from a Mysql database result at row row.
cls | closure | |
[in,out] | rs | |
stmt | the mysql statement that is being run | |
column | the column that is being processed | |
[out] | results |
Definition at line 510 of file my_result_helper.c.
References GNUNET_OK, GNUNET_MY_ResultSpec::is_null, GNUNET_MY_ResultSpec::mysql_bind_output_length, and results.
|
static |
Check size of extracted fixed size data from a Mysql database.
cls | closure | |
[in,out] | rs | |
stmt | the mysql statement that is being run | |
column | the column that is being processed | |
[out] | results |
Definition at line 540 of file my_result_helper.c.
|
static |
Extract data from a Postgres database result at row row.
cls | closure | |
[in,out] | rs | |
stmt | the mysql statement that is being run | |
column | the column that is being processed | |
[out] | results |
Definition at line 642 of file my_result_helper.c.
References GNUNET_MY_ResultSpec::dst, GNUNET_MY_ResultSpec::dst_size, GNUNET_OK, GNUNET_MY_ResultSpec::is_null, GNUNET_MY_ResultSpec::mysql_bind_output_length, and results.
|
static |
Check size of extracted fixed size data from a Mysql database.
cls | closure | |
[in,out] | rs | |
stmt | the mysql statement that is being run | |
column | the column that is being processed | |
[out] | results |
Definition at line 672 of file my_result_helper.c.
|
static |
Extract data from a MYSQL database result at row row.
cls | closure | |
[in,out] | rs | |
stmt | the mysql statement that is being run | |
column | the column that is being processed | |
[out] | results |
Definition at line 721 of file my_result_helper.c.
References GNUNET_MY_ResultSpec::dst, GNUNET_MY_ResultSpec::dst_size, GNUNET_OK, GNUNET_MY_ResultSpec::is_null, GNUNET_MY_ResultSpec::mysql_bind_output_length, and results.
|
static |
Extract data from a MYSQL database result at row row.
cls | closure | |
[in,out] | rs | |
stmt | the mysql statement that is being run | |
column | the column that is being processed | |
[out] | results |
Definition at line 751 of file my_result_helper.c.
|
static |
Extract data from a MYSQL database result at row row.
cls | closure | |
[in,out] | rs | |
stmt | the mysql statement that is being run | |
column | the column that is being processed | |
[out] | results |
Definition at line 800 of file my_result_helper.c.
References GNUNET_MY_ResultSpec::dst, GNUNET_MY_ResultSpec::dst_size, GNUNET_OK, GNUNET_SYSERR, GNUNET_MY_ResultSpec::is_null, GNUNET_MY_ResultSpec::mysql_bind_output_length, and results.
|
static |
Check size of extracted fixed-size data from a Mysql database.
cls | closure | |
[in,out] | rs | |
stmt | the mysql statement that is being run | |
column | the column that is being processed | |
[out] | results |
Definition at line 832 of file my_result_helper.c.