aboutsummaryrefslogtreecommitdiff
path: root/src/stasis/plugin_anastasis_postgres.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stasis/plugin_anastasis_postgres.c')
-rw-r--r--src/stasis/plugin_anastasis_postgres.c26
1 files changed, 18 insertions, 8 deletions
diff --git a/src/stasis/plugin_anastasis_postgres.c b/src/stasis/plugin_anastasis_postgres.c
index 801552d..ef13c6c 100644
--- a/src/stasis/plugin_anastasis_postgres.c
+++ b/src/stasis/plugin_anastasis_postgres.c
@@ -343,8 +343,18 @@ prepare_statements (void *cls)
343 ",encrypted_truth" 343 ",encrypted_truth"
344 ",truth_mime" 344 ",truth_mime"
345 " FROM anastasis_truth" 345 " FROM anastasis_truth"
346 " WHERE truth_uuid =$1;", 346 " WHERE truth_uuid=$1;",
347 1), 347 1),
348 GNUNET_PQ_make_prepare ("recoverydocument_select_meta",
349 "SELECT "
350 " version"
351 ",recovery_meta_data"
352 " FROM anastasis_recoverydocument"
353 " WHERE user_id=$1"
354 " AND version < $2"
355 " ORDER BY version DESC"
356 " LIMIT 1000;",
357 2),
348 GNUNET_PQ_make_prepare ("latest_recoverydocument_select", 358 GNUNET_PQ_make_prepare ("latest_recoverydocument_select",
349 "SELECT " 359 "SELECT "
350 " version" 360 " version"
@@ -352,7 +362,7 @@ prepare_statements (void *cls)
352 ",recovery_data_hash" 362 ",recovery_data_hash"
353 ",recovery_data" 363 ",recovery_data"
354 " FROM anastasis_recoverydocument" 364 " FROM anastasis_recoverydocument"
355 " WHERE user_id =$1 " 365 " WHERE user_id=$1"
356 " ORDER BY version DESC" 366 " ORDER BY version DESC"
357 " LIMIT 1;", 367 " LIMIT 1;",
358 1), 368 1),
@@ -384,12 +394,12 @@ prepare_statements (void *cls)
384 " AND payment_identifier=$2;", 394 " AND payment_identifier=$2;",
385 2), 395 2),
386 GNUNET_PQ_make_prepare ("postcounter_update", 396 GNUNET_PQ_make_prepare ("postcounter_update",
387 "UPDATE " 397 "UPDATE"
388 "anastasis_recdoc_payment " 398 " anastasis_recdoc_payment"
389 "SET " 399 " SET"
390 "post_counter=$1 " 400 " post_counter=$1"
391 "WHERE user_id =$2 " 401 " WHERE user_id =$2"
392 "AND payment_identifier=$3;", 402 " AND payment_identifier=$3;",
393 3), 403 3),
394 GNUNET_PQ_make_prepare ("key_share_select", 404 GNUNET_PQ_make_prepare ("key_share_select",
395 "SELECT " 405 "SELECT "