1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
//
// Created by parallels on 21/03/24.
//
#include "platform.h"
#include "taler_pq_lib.h"
#include "pg_helper.h"
#include "pg_insert_amount_arithmetic_inconsistency.h"
enum GNUNET_DB_QueryStatus
TAH_PG_insert_amount_arithmetic_inconsistency (
void *cls,
const struct TALER_AUDITORDB_AmountArithmeticInconsistency *dc)
{
struct PostgresClosure *pg = cls;
struct GNUNET_PQ_QueryParam params[] = {
GNUNET_PQ_query_param_auto_from_type (&dc->operation),
TALER_PQ_query_param_amount (pg->conn,
&dc->exchange_amount),
TALER_PQ_query_param_amount (pg->conn,
&dc->auditor_amount),
GNUNET_PQ_query_param_bool (dc->profitable),
GNUNET_PQ_query_param_end
};
PREPARE (pg,
"auditor_amount_arithmetic_inconsistency_insert",
"INSERT INTO auditor_amount_arithmetic_inconsistency "
"(operation"
",exchange_amount"
",auditor_amount"
",profitable"
") VALUES ($1,$2,$3,$4);");
return GNUNET_PQ_eval_prepared_non_select (pg->conn,
"auditor_amount_arithmetic_inconsistency_insert",
params);
}
|