gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-donau] branch master updated: fix sql


From: gnunet
Subject: [taler-donau] branch master updated: fix sql
Date: Wed, 27 Mar 2024 12:41:10 +0100

This is an automated email from the git hooks/post-receive script.

johannes-casaburi pushed a commit to branch master
in repository donau.

The following commit(s) were added to refs/heads/master by this push:
     new 102ebdf  fix sql
102ebdf is described below

commit 102ebdfbc8ecccd738a7fefef1354e13567c6e8c
Author: Casaburi Johannes <johannes.casaburi@students.bfh.ch>
AuthorDate: Wed Mar 27 12:40:41 2024 +0100

    fix sql
---
 src/donaudb/0002-donau_receipts_issued.sql | 20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)

diff --git a/src/donaudb/0002-donau_receipts_issued.sql 
b/src/donaudb/0002-donau_receipts_issued.sql
index f8f8ecd..f697c2a 100644
--- a/src/donaudb/0002-donau_receipts_issued.sql
+++ b/src/donaudb/0002-donau_receipts_issued.sql
@@ -29,26 +29,24 @@ COMMENT ON COLUMN receipts_issued.receipt_hash
   IS 'Hash value over all the blinded donation receipt received plus the hash 
of the donation units public key.';
 
 
-CREATE FUNCTION 
transaction_update_current_amount_receipts_save_issue_receipts_request(
-   IN blinded_sig BYTEA[] NOT NULL -- blinded signatures
-  ,IN charity_id BIGINT NOT NULL -- charity id which made the issue receitps 
request
-  ,IN receipt_hash BYTEA NOT NULL-- hash over all budi key pairs (primary key)
-  ,IN amount taler_amount NOT NULL -- total amount of the requested receipts
-  ,IN new_total_amount NOT NULL -- new total amount of a charity
+CREATE FUNCTION transaction_save_issue_receipts_request(
+   IN blinded_sig BYTEA[] -- blinded signatures
+  ,IN charity_id BIGINT -- charity id which made the issue receitps request
+  ,IN receipt_hash BYTEA -- hash over all budi key pairs (primary key)
+  ,IN amount taler_amount -- total amount of the requested receipts
+  ,IN new_total_amount taler_amount -- new total amount of a charity
 )
 RETURNS VOID
---LANGUAGE plpgsql
+LANGUAGE plpgsql
 AS $$
-BEGIN;
-
+BEGIN
 -- Update table charity
 UPDATE charity SET receipts_to_date = new_total_amount;
 -- Insert into the table receipts_issued
 INSERT INTO receipts_issued (blinded_sig, charity_id, receipt_hash, amount) 
VALUES ('blinded_sig', 'charity_id', 'receipts_hash', 'amount');
-
 -- Commit the transaction if everything is successful
-COMMIT;
 END $$;
+COMMIT;
 
 COMMENT ON FUNCTION transaction_save_issue_receipts_request
   IS 'This is a transaction for updating the current amount of receipts of a 
year of a charity and saves the receipts request what makes it idempotent';

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]