[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-donau] branch master updated: -db logic nitpicks
From: |
gnunet |
Subject: |
[taler-donau] branch master updated: -db logic nitpicks |
Date: |
Tue, 31 Oct 2023 11:37:39 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository donau.
The following commit(s) were added to refs/heads/master by this push:
new b657291 -db logic nitpicks
b657291 is described below
commit b657291880f62b40a9c78174205dd669642978f0
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Tue Oct 31 11:37:36 2023 +0100
-db logic nitpicks
---
src/donaudb/0002-donau_charities.sql | 2 +-
src/donaudb/pg_insert_charity.c | 10 +++-------
2 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/src/donaudb/0002-donau_charities.sql
b/src/donaudb/0002-donau_charities.sql
index 49cba77..ef4dee2 100644
--- a/src/donaudb/0002-donau_charities.sql
+++ b/src/donaudb/0002-donau_charities.sql
@@ -19,7 +19,7 @@ CREATE TABLE charities
,charity_name TEXT NOT NULL
,charity_pub BYTEA PRIMARY KEY CHECK (LENGTH(donau_pub)=32)
,max_per_year taler_amount NOT NULL
- ,receipts_to_date taler_amount NOT NULL
+ ,receipts_to_date taler_amount NOT NULL DEFAULT (0,0)
,current_year INT8 NOT NULL
);
COMMENT ON TABLE charities
diff --git a/src/donaudb/pg_insert_charity.c b/src/donaudb/pg_insert_charity.c
index 9104dee..907c666 100644
--- a/src/donaudb/pg_insert_charity.c
+++ b/src/donaudb/pg_insert_charity.c
@@ -30,20 +30,17 @@ TEH_PG_insert_charity (void *cls,
const struct TALER_CharityPublicKeyP *charity_pub,
const char *charity_url,
const char *charity_name,
- uint64_t current_year,
- struct TALER_Amount *receipts_to_date)
+ uint64_t current_year)
{
struct PostgresClosure *pg = cls;
struct GNUNET_PQ_QueryParam params[] = {
GNUNET_PQ_query_param_auto_from_type (charity_pub),
GNUNET_PQ_query_param_string (charity_name),
GNUNET_PQ_query_param_string (charity_url),
- GNUNET_PQ_query_param_uint64 (current_year),
- TALER_PQ_query_param_amount (receipts_to_date),
+ GNUNET_PQ_query_param_uint64 (¤t_year),
GNUNET_PQ_query_param_end
};
- /* used in #postgres_insert_charity() */
PREPARE (pg,
"insert_charity",
"INSERT INTO charities "
@@ -51,9 +48,8 @@ TEH_PG_insert_charity (void *cls,
",charity_name"
",charity_url"
",current_year"
- ",receipts_to_date"
") VALUES "
- "($1, $2, $3, $4, $5);");
+ "($1, $2, $3, $4);");
return GNUNET_PQ_eval_prepared_non_select (pg->conn,
"insert_charity",
params);
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-donau] branch master updated: -db logic nitpicks,
gnunet <=