[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-anastasis] branch master updated: removed taler entr
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-anastasis] branch master updated: removed taler entries |
Date: |
Wed, 16 Oct 2019 15:08:24 +0200 |
This is an automated email from the git hooks/post-receive script.
ds-meister pushed a commit to branch master
in repository anastasis.
The following commit(s) were added to refs/heads/master by this push:
new f99074f removed taler entries
f99074f is described below
commit f99074f8f9e9e5f065ce9a2b14bd76f2d246a7c3
Author: Dominik Meister <address@hidden>
AuthorDate: Wed Oct 16 15:08:16 2019 +0200
removed taler entries
---
src/backup-db/plugin_anastasis_postgres.c | 169 ------------------------------
1 file changed, 169 deletions(-)
diff --git a/src/backup-db/plugin_anastasis_postgres.c
b/src/backup-db/plugin_anastasis_postgres.c
index 8e698bf..ae1ebaa 100644
--- a/src/backup-db/plugin_anastasis_postgres.c
+++ b/src/backup-db/plugin_anastasis_postgres.c
@@ -256,45 +256,6 @@ postgres_store_recovery_document (void *cls,
params);
}
-
-/**
- * FIXME
- * Retrieve proposal data given its proposal data's hashcode
- *
- * @param cls closure
- * @param contract_terms where to store the retrieved proposal data
- * @param h_contract_terms proposal data's hashcode that will be used to
- * perform the lookup
- * @return transaction status
- */
-static enum GNUNET_DB_QueryStatus
-postgres_find_contract_terms_from_hash (void *cls,
- json_t **contract_terms,
- const struct
- GNUNET_HashCode *h_contract_terms,
- const struct
- ANASTASIS_AccountPubP *anastasis_pub)
-{
- struct PostgresClosure *pg = cls;
- struct GNUNET_PQ_QueryParam params[] = {
- GNUNET_PQ_query_param_auto_from_type (h_contract_terms),
- GNUNET_PQ_query_param_auto_from_type (anastasis_pub),
- GNUNET_PQ_query_param_end
- };
- struct GNUNET_PQ_ResultSpec rs[] = {
- TALER_PQ_result_spec_json ("contract_terms",
- contract_terms),
- GNUNET_PQ_result_spec_end
- };
-
- check_connection (pg);
- return GNUNET_PQ_eval_prepared_singleton_select (pg->conn,
-
"find_contract_terms_from_hash",
- params,
- rs);
-}
-
-
/**
* FIXME
* Insert proposal data and its hashcode into db
@@ -343,136 +304,6 @@ postgres_record_payment (void *cls,
params);
}
-/**
- * FIXME
- * Function to be called with the results of a SELECT statement
- * that has returned @a num_results results.
- *
- * @param cls of type `struct FindContractsContext *`
- * @param result the postgres result
- * @param num_result the number of results in @a result
- */
-static void
-find_contracts_cb (void *cls,
- PGresult *result,
- unsigned int num_results)
-{
- struct FindContractsContext *fcctx = cls;
-
- for (unsigned int i = 0; i < num_results; i++)
- {
- char *order_id;
- json_t *contract_terms;
- uint64_t row_id;
- struct GNUNET_PQ_ResultSpec rs[] = {
- GNUNET_PQ_result_spec_string ("order_id",
- &order_id),
- TALER_PQ_result_spec_json ("contract_terms",
- &contract_terms),
- GNUNET_PQ_result_spec_uint64 ("row_id",
- &row_id),
- GNUNET_PQ_result_spec_end
- };
-
- if (GNUNET_OK !=
- GNUNET_PQ_extract_result (result,
- rs,
- i))
- {
- GNUNET_break (0);
- fcctx->qs = GNUNET_DB_STATUS_HARD_ERROR;
- return;
- }
- fcctx->qs = i + 1;
- fcctx->cb (fcctx->cb_cls,
- order_id,
- row_id,
- contract_terms);
- GNUNET_PQ_cleanup_result (rs);
- }
-}
-
-
-/**
- * FIXME
- * Return proposals whose timestamp are older than `date`.
- * Among those proposals, only those ones being between the
- * start-th and (start-nrows)-th record are returned. The rows
- * are sorted having the youngest first.
- *
- * @param cls our plugin handle.
- * @param date only results older than this date are returned.
- * @param anastasis_pub instance's public key; only rows related to this
- * instance are returned.
- * @param start only rows with serial id less than start are returned.
- * In other words, you lower `start` to get older records. The tipical
- * usage is to firstly call `find_contract_terms_by_date`, so that you get
- * the `nrows` youngest records. The oldest of those records will tell you
- * from which timestamp and `start` you can query the DB in order to get
- * furtherly older records, and so on. Alternatively, you can use always
- * the same timestamp and just go behind in history by tuning `start`.
- * @param nrows only nrows rows are returned.
- * @param past if set to #GNUNET_YES, retrieves rows older than `date`.
- * @param ascending if GNUNET_YES, results will be sorted in chronological
order.
- * This is tipically used to show live updates on the anastasis's backoffice
- * Web interface.
- * @param cb function to call with transaction data, can be NULL.
- * @param cb_cls closure for @a cb
- * @return transaction status
- */
-static enum GNUNET_DB_QueryStatus
-postgres_find_contract_terms_by_date_and_range (void *cls,
- struct GNUNET_TIME_Absolute
- date,
- const struct
- AnastasisPublicKeyP *
- anastasis_pub,
- uint64_t start,
- uint64_t nrows,
- int past,
- unsigned int ascending,
-
ANASTASIS_DB_ProposalDataCallback
- cb,
- void *cb_cls)
-{
- struct PostgresClosure *pg = cls;
- struct GNUNET_PQ_QueryParam params[] = {
- GNUNET_PQ_query_param_absolute_time (&date),
- GNUNET_PQ_query_param_auto_from_type (anastasis_pub),
- GNUNET_PQ_query_param_uint64 (&start),
- GNUNET_PQ_query_param_uint64 (&nrows),
- GNUNET_PQ_query_param_end
- };
- const char *stmt;
- enum GNUNET_DB_QueryStatus qs;
- struct FindContractsContext fcctx = {
- .cb = cb,
- .cb_cls = cb_cls
- };
-
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "DB serving /history with date %s\n",
- GNUNET_STRINGS_absolute_time_to_string (date));
- stmt =
- (GNUNET_YES == past)
- ? ( (GNUNET_YES == ascending)
- ? "find_contract_terms_by_date_and_range_past_asc"
- : "find_contract_terms_by_date_and_range_past")
- : ( (GNUNET_YES == ascending)
- ? "find_contract_terms_by_date_and_range_asc"
- : "find_contract_terms_by_date_and_range");
- check_connection (pg);
- qs = GNUNET_PQ_eval_prepared_multi_select (pg->conn,
- stmt,
- params,
- &find_contracts_cb,
- &fcctx);
- if (0 >= qs)
- return qs;
- return fcctx.qs;
-}
-
-
/**
* Initialize Postgres database subsystem.
*
--
To stop receiving notification emails like this one, please contact
address@hidden.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [taler-anastasis] branch master updated: removed taler entries,
gnunet <=