aboutsummaryrefslogtreecommitdiff
path: root/src/exchangedb/pg_insert_aml_officer.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_officer.c
parentd131951fbe09b3415c9976acd11f660d51493086 (diff)
downloadexchange-f8bfc4dc9d9dcb69ccdd95258aea53dabf997246.tar.xz
address DB FIXMEs for AML
Diffstat (limited to 'src/exchangedb/pg_insert_aml_officer.c')
-rw-r--r--src/exchangedb/pg_insert_aml_officer.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/exchangedb/pg_insert_aml_officer.c b/src/exchangedb/pg_insert_aml_officer.c
index 33e6c86f7..c1f635a64 100644
--- a/src/exchangedb/pg_insert_aml_officer.c
+++ b/src/exchangedb/pg_insert_aml_officer.c
@@ -47,20 +47,20 @@ TEH_PG_insert_aml_officer (
GNUNET_PQ_query_param_timestamp (&last_change),
GNUNET_PQ_query_param_end
};
+ struct GNUNET_PQ_ResultSpec rs[] = {
+ GNUNET_PQ_result_spec_timestamp ("out_last_change",
+ previous_change),
+ GNUNET_PQ_result_spec_end
+ };
- // FIXME: need to check for previous record!
PREPARE (pg,
- "insert_aml_staff",
- "INSERT INTO aml_staff "
- "(decider_pub"
- ",master_sig"
- ",decider_name"
- ",is_active"
- ",read_only"
- ",last_change"
- ") VALUES "
+ "do_insert_aml_staff",
+ "SELECT"
+ " out_last_change"
+ " FROM exchange_do_insert_aml_officer"
"($1, $2, $3, $4, $5, $6);");
- return GNUNET_PQ_eval_prepared_non_select (pg->conn,
- "insert_aml_staff",
- params);
+ return GNUNET_PQ_eval_prepared_singleton_select (pg->conn,
+ "do_insert_aml_staff",
+ params,
+ rs);
}