summaryrefslogtreecommitdiff
path: root/src/auditordb/pg_insert_row_inconsistency.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/auditordb/pg_insert_row_inconsistency.c')
-rw-r--r--src/auditordb/pg_insert_row_inconsistency.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/auditordb/pg_insert_row_inconsistency.c b/src/auditordb/pg_insert_row_inconsistency.c
new file mode 100644
index 000000000..6d90f0244
--- /dev/null
+++ b/src/auditordb/pg_insert_row_inconsistency.c
@@ -0,0 +1,34 @@
+//
+// Created by parallels on 21/03/24.
+//
+
+#include "pg_insert_row_inconsistency.h"
+
+#include "platform.h"
+#include "taler_pq_lib.h"
+
+#include "pg_helper.h"
+
+enum GNUNET_DB_QueryStatus
+TAH_PG_insert_row_inconsistency (
+ void *cls,
+ const struct TALER_AUDITORDB_RowInconsistency *dc)
+{
+ struct PostgresClosure *pg = cls;
+ struct GNUNET_PQ_QueryParam params[] = {
+
+ GNUNET_PQ_query_param_string (dc->row_table),
+ GNUNET_PQ_query_param_string (dc->diagnostic),
+ GNUNET_PQ_query_param_end
+ };
+
+ PREPARE (pg,
+ "auditor_row_inconsistency_insert",
+ "INSERT INTO auditor_row_inconsistency "
+ "(row_table"
+ ",diagnostic"
+ ") VALUES ($1,$2);");
+ return GNUNET_PQ_eval_prepared_non_select (pg->conn,
+ "auditor_row_inconsistency_insert",
+ params);
+}