path_info_len * sizeof (struct GNUNET_PeerIdentity)),
GNUNET_PQ_query_param_end
};
- enum GNUNET_PQ_QueryStatus ret;
+ enum GNUNET_DB_QueryStatus ret;
ret = GNUNET_PQ_eval_prepared_non_select (plugin->dbh,
"put",
GNUNET_PQ_query_param_uint32 (&type32),
GNUNET_PQ_query_param_end
};
- enum GNUNET_PQ_QueryStatus res;
+ enum GNUNET_DB_QueryStatus res;
struct HandleResultContext hr_ctx;
hr_ctx.iter = iter;
&key),
GNUNET_PQ_result_spec_end
};
- enum GNUNET_PQ_QueryStatus res;
+ enum GNUNET_DB_QueryStatus res;
struct GNUNET_PQ_QueryParam dparam[] = {
GNUNET_PQ_query_param_uint32 (&oid),
GNUNET_PQ_query_param_end
rs);
if (0 > res)
return GNUNET_SYSERR;
- if (GNUNET_PQ_STATUS_SUCCESS_NO_RESULTS == res)
+ if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS == res)
{
/* no result */
LOG (GNUNET_ERROR_TYPE_DEBUG,
struct GNUNET_PeerIdentity *path;
struct GNUNET_HashCode key;
uint32_t type;
- enum GNUNET_PQ_QueryStatus res;
+ enum GNUNET_DB_QueryStatus res;
struct GNUNET_PQ_QueryParam params[] = {
GNUNET_PQ_query_param_uint32 (&off),
GNUNET_PQ_query_param_end
GNUNET_break (0);
return 0;
}
- if (GNUNET_PQ_STATUS_SUCCESS_NO_RESULTS == res)
+ if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS == res)
{
GNUNET_break (0);
return 0;
GNUNET_PQ_query_param_uint32 (&num_results32),
GNUNET_PQ_query_param_end
};
- enum GNUNET_PQ_QueryStatus res;
+ enum GNUNET_DB_QueryStatus res;
struct ExtractResultContext erc;
erc.iter = iter;
"Ending iteration (postgres error)\n");
return 0;
}
- if (GNUNET_PQ_STATUS_SUCCESS_NO_RESULTS == res)
+ if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS == res)
{
/* no result */
LOG (GNUNET_ERROR_TYPE_DEBUG,
&total),
GNUNET_PQ_result_spec_end
};
- enum GNUNET_PQ_QueryStatus ret;
+ enum GNUNET_DB_QueryStatus ret;
if (NULL == estimate)
return;
"estimate_size",
params,
rs);
- if (GNUNET_PQ_STATUS_SUCCESS_ONE_RESULT != ret)
+ if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT != ret)
{
*estimate = 0LL;
return;
{
struct Plugin *plugin = cls;
struct GNUNET_HashCode vhash;
- enum GNUNET_PQ_QueryStatus ret;
+ enum GNUNET_DB_QueryStatus ret;
GNUNET_CRYPTO_hash (data,
size,
GNUNET_PQ_query_param_end
};
struct ProcessResultContext prc;
- enum GNUNET_PQ_QueryStatus res;
+ enum GNUNET_DB_QueryStatus res;
if (random)
{
GNUNET_PQ_query_param_end
};
struct ProcessResultContext prc;
- enum GNUNET_PQ_QueryStatus res;
+ enum GNUNET_DB_QueryStatus res;
prc.plugin = plugin;
prc.proc = proc;
GNUNET_PQ_query_param_uint32 (&oid),
GNUNET_PQ_query_param_end
};
- enum GNUNET_PQ_QueryStatus qret;
+ enum GNUNET_DB_QueryStatus qret;
ret = rc->proc (rc->proc_cls,
key,
};
struct ReplCtx rc;
struct ProcessResultContext prc;
- enum GNUNET_PQ_QueryStatus res;
+ enum GNUNET_DB_QueryStatus res;
rc.plugin = plugin;
rc.proc = proc;
void *cont_cls)
{
struct Plugin *plugin = cls;
- enum GNUNET_PQ_QueryStatus ret;
+ enum GNUNET_DB_QueryStatus ret;
struct GNUNET_PQ_QueryParam params[] = {
GNUNET_PQ_query_param_auto_from_type (key),
GNUNET_PQ_query_param_fixed_size (data, size),
_("Postgress exec failure"));
return;
}
- if (GNUNET_PQ_STATUS_SUCCESS_NO_RESULTS == ret)
+ if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS == ret)
{
cont (cont_cls,
key,
gnunet_datacache_plugin.h \
gnunet_datastore_service.h \
gnunet_datastore_plugin.h \
+ gnunet_db_lib.h \
gnunet_dht_service.h \
gnunet_disk_lib.h \
gnunet_dnsparser_lib.h \
--- /dev/null
+/*
+ This file is part of GNUnet
+ Copyright (C) 2017 GNUnet e.V.
+
+ GNUnet is free software; you can redistribute it and/or modify it under the
+ terms of the GNU General Public License as published by the Free Software
+ Foundation; either version 3, or (at your option) any later version.
+
+ GNUnet is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along with
+ GNUnet; see the file COPYING. If not, If not, see <http://www.gnu.org/licenses/>
+*/
+/**
+ * @file include/gnunet_db_lib.h
+ * @brief shared defintions for transactional databases
+ * @author Christian Grothoff
+ */
+#ifndef GNUNET_DB_LIB_H
+#define GNUNET_DB_LIB_H
+
+
+/**
+ * Status code returned from functions running database commands.
+ * Can be combined with a function that returns the number
+ * of results, so non-negative values indicate success.
+ */
+enum GNUNET_DB_QueryStatus
+{
+ /**
+ * A hard error occurred, retrying will not help.
+ */
+ GNUNET_DB_STATUS_HARD_ERROR = -2,
+
+ /**
+ * A soft error occurred, retrying the transaction may succeed.
+ */
+ GNUNET_DB_STATUS_SOFT_ERROR = -1,
+
+ /**
+ * The transaction succeeded, but yielded zero results.
+ */
+ GNUNET_DB_STATUS_SUCCESS_NO_RESULTS = 0,
+
+ /**
+ * The transaction succeeded, and yielded one result.
+ */
+ GNUNET_DB_STATUS_SUCCESS_ONE_RESULT = 1
+
+};
+
+#endif
/*
This file is part of GNUnet
- Copyright (C) 2016 GNUnet e.V.
+ Copyright (C) 2016, 2017 GNUnet e.V.
GNUnet is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
#include <libpq-fe.h>
#include "gnunet_util_lib.h"
-
+#include "gnunet_db_lib.h"
/* ************************* pq_query_helper.c functions ************************ */
/* ******************** pq_eval.c functions ************** */
-/**
- * Status code returned from functions running PQ commands.
- * Can be combined with a function that returns the number
- * of results, so non-negative values indicate success.
- */
-enum GNUNET_PQ_QueryStatus
-{
- /**
- * A hard error occurred, retrying will not help.
- */
- GNUNET_PQ_STATUS_HARD_ERROR = -2,
-
- /**
- * A soft error occurred, retrying the transaction may succeed.
- */
- GNUNET_PQ_STATUS_SOFT_ERROR = -1,
-
- /**
- * The transaction succeeded, but yielded zero results.
- */
- GNUNET_PQ_STATUS_SUCCESS_NO_RESULTS = 0,
-
- /**
- * The transaction succeeded, and yielded one result.
- */
- GNUNET_PQ_STATUS_SUCCESS_ONE_RESULT = 1
-
-};
-
-
/**
* Check the @a result's error code to see what happened.
* Also logs errors.
* @param statement_name name of the statement that created @a result
* @param result result to check
* @return status code from the result, mapping PQ status
- * codes to `enum GNUNET_PQ_QueryStatus`. Never
+ * codes to `enum GNUNET_DB_QueryStatus`. Never
* returns positive values as this function does
* not look at the result set.
* @deprecated (low level, let's see if we can do with just the high-level functions)
*/
-enum GNUNET_PQ_QueryStatus
+enum GNUNET_DB_QueryStatus
GNUNET_PQ_eval_result (PGconn *connection,
const char *statement_name,
PGresult *result);
* @param statement_name name of the statement
* @param params parameters to give to the statement (#GNUNET_PQ_query_param_end-terminated)
* @return status code from the result, mapping PQ status
- * codes to `enum GNUNET_PQ_QueryStatus`. If the
+ * codes to `enum GNUNET_DB_QueryStatus`. If the
* statement was a DELETE or UPDATE statement, the
* number of affected rows is returned; if the
* statment was an INSERT statement, and no row
* was added due to a UNIQUE violation, we return
* zero; if INSERT was successful, we return one.
*/
-enum GNUNET_PQ_QueryStatus
+enum GNUNET_DB_QueryStatus
GNUNET_PQ_eval_prepared_non_select (PGconn *connection,
const char *statement_name,
const struct GNUNET_PQ_QueryParam *params);
* @param rh function to call with the result set, NULL to ignore
* @param rh_cls closure to pass to @a rh
* @return status code from the result, mapping PQ status
- * codes to `enum GNUNET_PQ_QueryStatus`.
+ * codes to `enum GNUNET_DB_QueryStatus`.
*/
-enum GNUNET_PQ_QueryStatus
+enum GNUNET_DB_QueryStatus
GNUNET_PQ_eval_prepared_multi_select (PGconn *connection,
const char *statement_name,
const struct GNUNET_PQ_QueryParam *params,
* which must return a single result in @a connection using the given
* @a params. Stores the result (if any) in @a rs, which the caller
* must then clean up using #GNUNET_PQ_cleanup_result() if the return
- * value was #GNUNET_PQ_STATUS_SUCCESS_ONE_RESULT. Returns the
+ * value was #GNUNET_DB_STATUS_SUCCESS_ONE_RESULT. Returns the
* resulting session status.
*
* @param connection connection to execute the statement in
* @param params parameters to give to the statement (#GNUNET_PQ_query_param_end-terminated)
* @param[in,out] rs result specification to use for storing the result of the query
* @return status code from the result, mapping PQ status
- * codes to `enum GNUNET_PQ_QueryStatus`.
+ * codes to `enum GNUNET_DB_QueryStatus`.
*/
-enum GNUNET_PQ_QueryStatus
+enum GNUNET_DB_QueryStatus
GNUNET_PQ_eval_prepared_singleton_select (PGconn *connection,
const char *statement_name,
const struct GNUNET_PQ_QueryParam *params,
GNUNET_PQ_query_param_absolute_time (&now),
GNUNET_PQ_query_param_end
};
- enum GNUNET_PQ_QueryStatus res;
+ enum GNUNET_DB_QueryStatus res;
res = GNUNET_PQ_eval_prepared_non_select (plugin->dbh,
"expire_blocks",
params);
- GNUNET_break (GNUNET_PQ_STATUS_HARD_ERROR != res);
+ GNUNET_break (GNUNET_DB_STATUS_HARD_ERROR != res);
}
GNUNET_PQ_query_param_absolute_time_nbo (&expiration_time),
GNUNET_PQ_query_param_end
};
- enum GNUNET_PQ_QueryStatus res;
+ enum GNUNET_DB_QueryStatus res;
res = GNUNET_PQ_eval_prepared_non_select (plugin->dbh,
"delete_block",
params);
- GNUNET_break (GNUNET_PQ_STATUS_HARD_ERROR != res);
+ GNUNET_break (GNUNET_DB_STATUS_HARD_ERROR != res);
}
GNUNET_PQ_query_param_absolute_time_nbo (&block->expiration_time),
GNUNET_PQ_query_param_end
};
- enum GNUNET_PQ_QueryStatus res;
+ enum GNUNET_DB_QueryStatus res;
namecache_postgres_expire_blocks (plugin);
GNUNET_CRYPTO_hash (&block->derived_key,
&bsize),
GNUNET_PQ_result_spec_end
};
- enum GNUNET_PQ_QueryStatus res;
+ enum GNUNET_DB_QueryStatus res;
res = GNUNET_PQ_eval_prepared_singleton_select (plugin->dbh,
"lookup_block",
"Failing lookup block in namecache (postgres error)\n");
return GNUNET_SYSERR;
}
- if (GNUNET_PQ_STATUS_SUCCESS_NO_RESULTS == res)
+ if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS == res)
{
/* no result */
LOG (GNUNET_ERROR_TYPE_DEBUG,
GNUNET_PQ_query_param_string (label),
GNUNET_PQ_query_param_end
};
- enum GNUNET_PQ_QueryStatus res;
+ enum GNUNET_DB_QueryStatus res;
if (data_size !=
GNUNET_GNSRECORD_records_serialize (rd_count, rd,
res = GNUNET_PQ_eval_prepared_non_select (plugin->dbh,
"store_records",
params);
- if (GNUNET_PQ_STATUS_SUCCESS_NO_RESULTS != res)
+ if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS != res)
return GNUNET_SYSERR;
}
return GNUNET_OK;
GNUNET_PQ_query_param_end
};
struct ParserContext pc;
- enum GNUNET_PQ_QueryStatus res;
+ enum GNUNET_DB_QueryStatus res;
pc.iter = iter;
pc.iter_cls = iter_cls;
void *iter_cls)
{
struct Plugin *plugin = cls;
- enum GNUNET_PQ_QueryStatus res;
+ enum GNUNET_DB_QueryStatus res;
struct ParserContext pc;
pc.iter = iter;
GNUNET_PQ_query_param_auto_from_type (value_zone),
GNUNET_PQ_query_param_end
};
- enum GNUNET_PQ_QueryStatus res;
+ enum GNUNET_DB_QueryStatus res;
struct ParserContext pc;
pc.iter = iter;
* @param statement_name name of the statement that created @a result
* @param result result to check
* @return status code from the result, mapping PQ status
- * codes to `enum GNUNET_PQ_QueryStatus`. Never
+ * codes to `enum GNUNET_DB_QueryStatus`. Never
* returns positive values as this function does
* not look at the result set.
* @deprecated (low level, let's see if we can do with just the high-level functions)
*/
-enum GNUNET_PQ_QueryStatus
+enum GNUNET_DB_QueryStatus
GNUNET_PQ_eval_result (PGconn *connection,
const char *statement_name,
PGresult *result)
{
/* very unexpected... */
GNUNET_break (0);
- return GNUNET_PQ_STATUS_HARD_ERROR;
+ return GNUNET_DB_STATUS_HARD_ERROR;
}
if ( (0 == strcmp (sqlstate,
PQ_DIAG_SQLSTATE_DEADLOCK)) ||
PQresultErrorMessage (result),
PQresStatus (PQresultStatus (result)),
PQerrorMessage (connection));
- return GNUNET_PQ_STATUS_SOFT_ERROR;
+ return GNUNET_DB_STATUS_SOFT_ERROR;
}
if (0 == strcmp (sqlstate,
PQ_DIAG_SQLSTATE_UNIQUE_VIOLATION))
PQresultErrorMessage (result),
PQresStatus (PQresultStatus (result)),
PQerrorMessage (connection));
- return GNUNET_PQ_STATUS_SUCCESS_NO_RESULTS;
+ return GNUNET_DB_STATUS_SUCCESS_NO_RESULTS;
}
GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR,
"pq",
PQresultErrorMessage (result),
PQresStatus (PQresultStatus (result)),
PQerrorMessage (connection));
- return GNUNET_PQ_STATUS_HARD_ERROR;
+ return GNUNET_DB_STATUS_HARD_ERROR;
}
- return GNUNET_PQ_STATUS_SUCCESS_NO_RESULTS;
+ return GNUNET_DB_STATUS_SUCCESS_NO_RESULTS;
}
* @param statement_name name of the statement
* @param params parameters to give to the statement (#GNUNET_PQ_query_param_end-terminated)
* @return status code from the result, mapping PQ status
- * codes to `enum GNUNET_PQ_QueryStatus`. If the
+ * codes to `enum GNUNET_DB_QueryStatus`. If the
* statement was a DELETE or UPDATE statement, the
* number of affected rows is returned.; if the
* statment was an INSERT statement, and no row
* was added due to a UNIQUE violation, we return
* zero; if INSERT was successful, we return one.
*/
-enum GNUNET_PQ_QueryStatus
+enum GNUNET_DB_QueryStatus
GNUNET_PQ_eval_prepared_non_select (PGconn *connection,
const char *statement_name,
const struct GNUNET_PQ_QueryParam *params)
{
PGresult *result;
- enum GNUNET_PQ_QueryStatus qs;
+ enum GNUNET_DB_QueryStatus qs;
result = GNUNET_PQ_exec_prepared (connection,
statement_name,
qs = GNUNET_PQ_eval_result (connection,
statement_name,
result);
- if (GNUNET_PQ_STATUS_SUCCESS_NO_RESULTS == qs)
+ if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS == qs)
{
const char *tuples;
* @param rh function to call with the result set, NULL to ignore
* @param rh_cls closure to pass to @a rh
* @return status code from the result, mapping PQ status
- * codes to `enum GNUNET_PQ_QueryStatus`.
+ * codes to `enum GNUNET_DB_QueryStatus`.
*/
-enum GNUNET_PQ_QueryStatus
+enum GNUNET_DB_QueryStatus
GNUNET_PQ_eval_prepared_multi_select (PGconn *connection,
const char *statement_name,
const struct GNUNET_PQ_QueryParam *params,
void *rh_cls)
{
PGresult *result;
- enum GNUNET_PQ_QueryStatus qs;
+ enum GNUNET_DB_QueryStatus qs;
unsigned int ret;
result = GNUNET_PQ_exec_prepared (connection,
* which must return a single result in @a connection using the given
* @a params. Stores the result (if any) in @a rs, which the caller
* must then clean up using #GNUNET_PQ_cleanup_result() if the return
- * value was #GNUNET_PQ_STATUS_SUCCESS_ONE_RESULT. Returns the
+ * value was #GNUNET_DB_STATUS_SUCCESS_ONE_RESULT. Returns the
* resulting session status.
*
* @param connection connection to execute the statement in
* @param params parameters to give to the statement (#GNUNET_PQ_query_param_end-terminated)
* @param[in,out] rs result specification to use for storing the result of the query
* @return status code from the result, mapping PQ status
- * codes to `enum GNUNET_PQ_QueryStatus`.
+ * codes to `enum GNUNET_DB_QueryStatus`.
*/
-enum GNUNET_PQ_QueryStatus
+enum GNUNET_DB_QueryStatus
GNUNET_PQ_eval_prepared_singleton_select (PGconn *connection,
const char *statement_name,
const struct GNUNET_PQ_QueryParam *params,
struct GNUNET_PQ_ResultSpec *rs)
{
PGresult *result;
- enum GNUNET_PQ_QueryStatus qs;
+ enum GNUNET_DB_QueryStatus qs;
result = GNUNET_PQ_exec_prepared (connection,
statement_name,
if (0 == PQntuples (result))
{
PQclear (result);
- return GNUNET_PQ_STATUS_SUCCESS_NO_RESULTS;
+ return GNUNET_DB_STATUS_SUCCESS_NO_RESULTS;
}
if (1 != PQntuples (result))
{
/* more than one result, but there must be at most one */
GNUNET_break (0);
PQclear (result);
- return GNUNET_PQ_STATUS_HARD_ERROR;
+ return GNUNET_DB_STATUS_HARD_ERROR;
}
if (GNUNET_OK !=
GNUNET_PQ_extract_result (result,
0))
{
PQclear (result);
- return GNUNET_PQ_STATUS_HARD_ERROR;
+ return GNUNET_DB_STATUS_HARD_ERROR;
}
PQclear (result);
- return GNUNET_PQ_STATUS_SUCCESS_ONE_RESULT;
+ return GNUNET_DB_STATUS_SUCCESS_ONE_RESULT;
}
GNUNET_PQ_query_param_end
};
- if (GNUNET_PQ_STATUS_SUCCESS_NO_RESULTS !=
+ if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS !=
GNUNET_PQ_eval_prepared_non_select (plugin->dbh, stmt, params))
return GNUNET_SYSERR;
GNUNET_PQ_query_param_end
};
- if (GNUNET_PQ_STATUS_SUCCESS_NO_RESULTS !=
+ if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS !=
GNUNET_PQ_eval_prepared_non_select (plugin->dbh, "transaction_begin", params))
return GNUNET_SYSERR;
GNUNET_PQ_query_param_end
};
- if (GNUNET_PQ_STATUS_SUCCESS_NO_RESULTS !=
+ if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS !=
GNUNET_PQ_eval_prepared_non_select (plugin->dbh, "transaction_commit", params))
return GNUNET_SYSERR;
GNUNET_PQ_query_param_end
};
- if (GNUNET_PQ_STATUS_SUCCESS_NO_RESULTS !=
+ if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS !=
GNUNET_PQ_eval_prepared_non_select (plugin->dbh, "transaction_rollback", params))
return GNUNET_SYSERR;
GNUNET_PQ_query_param_end
};
- if (GNUNET_PQ_STATUS_SUCCESS_NO_RESULTS !=
+ if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS !=
GNUNET_PQ_eval_prepared_non_select (plugin->dbh, "insert_channel_key", params))
return GNUNET_SYSERR;
GNUNET_PQ_query_param_end
};
- if (GNUNET_PQ_STATUS_SUCCESS_NO_RESULTS !=
+ if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS !=
GNUNET_PQ_eval_prepared_non_select (plugin->dbh, "insert_slave_key", params))
return GNUNET_SYSERR;
GNUNET_PQ_query_param_end
};
- if (GNUNET_PQ_STATUS_SUCCESS_NO_RESULTS !=
+ if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS !=
GNUNET_PQ_eval_prepared_non_select (plugin->dbh, "insert_membership", params))
return GNUNET_SYSERR;
GNUNET_PQ_result_spec_end
};
- if (GNUNET_PQ_STATUS_SUCCESS_ONE_RESULT !=
+ if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
GNUNET_PQ_eval_prepared_singleton_select (plugin->dbh, "select_membership",
params_select, results_select))
return GNUNET_SYSERR;
GNUNET_PQ_query_param_end
};
- if (GNUNET_PQ_STATUS_SUCCESS_NO_RESULTS !=
+ if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS !=
GNUNET_PQ_eval_prepared_non_select (plugin->dbh, "insert_fragment", params_insert))
return GNUNET_SYSERR;
GNUNET_PQ_query_param_end
};
- if (GNUNET_PQ_STATUS_SUCCESS_NO_RESULTS !=
+ if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS !=
GNUNET_PQ_eval_prepared_non_select (plugin->dbh, "update_message_flags", params_update))
return GNUNET_SYSERR;
GNUNET_PQ_result_spec_end
};
- if (GNUNET_PQ_STATUS_SUCCESS_ONE_RESULT !=
+ if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
GNUNET_PQ_eval_prepared_singleton_select (plugin->dbh, stmt,
params_select, results_select))
return GNUNET_SYSERR;
GNUNET_PQ_result_spec_end
};
- if (GNUNET_PQ_STATUS_SUCCESS_ONE_RESULT !=
+ if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
GNUNET_PQ_eval_prepared_singleton_select (plugin->dbh, stmt,
params_select, results_select))
return GNUNET_SYSERR;
GNUNET_PQ_query_param_end
};
- if (GNUNET_PQ_STATUS_SUCCESS_NO_RESULTS !=
+ if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS !=
GNUNET_PQ_eval_prepared_non_select (plugin->dbh, stmt, params))
return GNUNET_SYSERR;
GNUNET_PQ_query_param_end
};
- if (GNUNET_PQ_STATUS_SUCCESS_NO_RESULTS !=
+ if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS !=
GNUNET_PQ_eval_prepared_non_select (plugin->dbh, stmt, params))
return GNUNET_SYSERR;
GNUNET_PQ_result_spec_end
};
- if (GNUNET_PQ_STATUS_SUCCESS_ONE_RESULT !=
+ if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
GNUNET_PQ_eval_prepared_singleton_select (plugin->dbh, stmt,
params_select, results_select))
return GNUNET_SYSERR;