aboutsummaryrefslogtreecommitdiff
path: root/src/exchangedb/pg_insert_aml_decision.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2023-01-22 15:13:34 +0100
committerChristian Grothoff <christian@grothoff.org>2023-01-22 15:13:34 +0100
commitf8bfc4dc9d9dcb69ccdd95258aea53dabf997246 (patch)
tree22ef212d0fad68b13b74e923b56d98389066ec57 /src/exchangedb/pg_insert_aml_decision.c
parentd131951fbe09b3415c9976acd11f660d51493086 (diff)
downloadexchange-f8bfc4dc9d9dcb69ccdd95258aea53dabf997246.tar.xz
address DB FIXMEs for AML
Diffstat (limited to 'src/exchangedb/pg_insert_aml_decision.c')
-rw-r--r--src/exchangedb/pg_insert_aml_decision.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/exchangedb/pg_insert_aml_decision.c b/src/exchangedb/pg_insert_aml_decision.c
index 421628f65..85570ed85 100644
--- a/src/exchangedb/pg_insert_aml_decision.c
+++ b/src/exchangedb/pg_insert_aml_decision.c
@@ -51,23 +51,23 @@ TEH_PG_insert_aml_decision (
GNUNET_PQ_query_param_auto_from_type (decider_sig),
GNUNET_PQ_query_param_end
};
+ struct GNUNET_PQ_ResultSpec rs[] = {
+ GNUNET_PQ_result_spec_bool ("out_invalid_officer",
+ invalid_officer),
+ GNUNET_PQ_result_spec_timestamp ("out_last_date",
+ last_date),
+ GNUNET_PQ_result_spec_end
+ };
- // FIXME: set invalid_officer
- // FIXME: set last_date!
PREPARE (pg,
- "insert_aml_decision",
- "INSERT INTO aml_history "
- "(h_payto"
- ",new_threshold_val"
- ",new_threshold_frac"
- ",new_status"
- ",decision_time"
- ",justification"
- ",decider_pub"
- ",decider_sig"
- ") VALUES "
+ "do_insert_aml_decision",
+ "SELECT"
+ " out_invalid_officer"
+ ",out_last_date"
+ " FROM exchange_do_insert_aml_decision"
"($1, $2, $3, $4, $5, $6, $7, $8);");
- return GNUNET_PQ_eval_prepared_non_select (pg->conn,
- "insert_aml_decision",
- params);
+ return GNUNET_PQ_eval_prepared_singleton_select (pg->conn,
+ "do_insert_aml_decision",
+ params,
+ rs);
}