commit d1f504aa1781881e4dfc64bd6ce285f3a2bf42cc
parent 51add29ac66fef6b05b4392bf89dfe2c6367c29a
Author: Marcello Stanisci <marcello.stanisci@inria.fr>
Date: Thu, 8 Jun 2017 15:07:14 +0200
add prepared statement to fetch per coin information
about refund
Diffstat:
1 file changed, 10 insertions(+), 0 deletions(-)
diff --git a/src/backenddb/plugin_merchantdb_postgres.c b/src/backenddb/plugin_merchantdb_postgres.c
@@ -185,6 +185,16 @@ postgres_initialize (void *cls)
GNUNET_PQ_EXECUTE_STATEMENT_END
};
struct GNUNET_PQ_PreparedStatement ps[] = {
+ GNUNET_PQ_make_prepare ("get_refund_information",
+ "SELECT"
+ " merchant_deposits.coin_pub"
+ ",merchant_deposits.amount_with_fee"
+ ",merchant_refunds.refund_amount"
+ " FROM merchant_deposits"
+ " LEFT OUTER JOIN merchant_refunds USING coin_pub"
+ " WHERE merchant_deposits.coin_pub=$1"
+ " GROUP BY merchant_deposits.coin_pub",
+ 1),
GNUNET_PQ_make_prepare ("insert_transaction",
"INSERT INTO merchant_transactions"
"(h_contract_terms"