[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-merchant] 122/277: fixed bool casts in plugin initialization
From: |
gnunet |
Subject: |
[taler-merchant] 122/277: fixed bool casts in plugin initialization |
Date: |
Sun, 05 Jul 2020 20:50:35 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository merchant.
commit 39d2fb9ed2b1737fba10579dfddd08edae734edb
Author: Jonathan Buchanan <jonathan.russ.buchanan@gmail.com>
AuthorDate: Tue May 19 12:44:34 2020 -0400
fixed bool casts in plugin initialization
---
src/backenddb/plugin_merchantdb_postgres.c | 88 +++++++++++++++---------------
1 file changed, 44 insertions(+), 44 deletions(-)
diff --git a/src/backenddb/plugin_merchantdb_postgres.c
b/src/backenddb/plugin_merchantdb_postgres.c
index 5e247d2..cf0ed8a 100644
--- a/src/backenddb/plugin_merchantdb_postgres.c
+++ b/src/backenddb/plugin_merchantdb_postgres.c
@@ -4993,7 +4993,7 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" AND"
" creation_time > $4"
" AND"
- " NOT BOOL($5)" /* unclaimed orders are never
paid */
+ " NOT CAST($5 as BOOL)" /* unclaimed orders are
never paid */
" ORDER BY order_serial ASC"
" LIMIT $2)"
"UNION " /* union ensures elements are distinct! */
@@ -5022,7 +5022,7 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" order_id"
",order_serial"
",creation_time"
- ",BOOL($5)" /* otherwise $5 is unused and Postgres
unhappy */
+ ",CAST($5 as BOOL)" /* otherwise $5 is unused and
Postgres unhappy */
" FROM merchant_orders"
" WHERE merchant_orders.merchant_serial="
" (SELECT merchant_serial "
@@ -5033,7 +5033,7 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" AND"
" creation_time > $4"
" AND"
- " NOT BOOL ($6)"/* unclaimed orders are never
refunded */
+ " NOT CAST($6 as BOOL)"/* unclaimed orders are
never refunded */
" ORDER BY order_serial ASC"
" LIMIT $2)"
"UNION " /* union ensures elements are distinct! */
@@ -5041,7 +5041,7 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" order_id"
",order_serial"
",creation_time"
- ",BOOL($5)" /* otherwise $5 is unused and Postgres
unhappy */
+ ",CAST($5 as BOOL)" /* otherwise $5 is unused and
Postgres unhappy */
" FROM merchant_contract_terms"
" WHERE merchant_contract_terms.merchant_serial="
" (SELECT merchant_serial "
@@ -5065,8 +5065,8 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" order_id"
",order_serial"
",creation_time"
- ",BOOL($5)" /* otherwise $5 is unused and Postgres
unhappy */
- ",BOOL($6)" /* otherwise $6 is unused and Postgres
unhappy */
+ ",CAST($5 as BOOL)" /* otherwise $5 is unused and
Postgres unhappy */
+ ",CAST($6 as BOOL)" /* otherwise $6 is unused and
Postgres unhappy */
" FROM merchant_orders"
" WHERE merchant_orders.merchant_serial="
" (SELECT merchant_serial "
@@ -5077,7 +5077,7 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" AND"
" creation_time > $4"
" AND"
- " NOT BOOL ($7)" /* unclaimed orders are never
wired */
+ " NOT CAST($7 as BOOL)" /* unclaimed orders are
never wired */
" ORDER BY order_serial ASC"
" LIMIT $2)"
"UNION " /* union ensures elements are distinct! */
@@ -5085,8 +5085,8 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" order_id"
",order_serial"
",creation_time"
- ",BOOL($5)" /* otherwise $5 is unused and Postgres
unhappy */
- ",BOOL($6)" /* otherwise $6 is unused and Postgres
unhappy */
+ ",CAST($5 as BOOL)" /* otherwise $5 is unused and
Postgres unhappy */
+ ",CAST($6 as BOOL)" /* otherwise $6 is unused and
Postgres unhappy */
" FROM merchant_contract_terms"
" WHERE merchant_contract_terms.merchant_serial="
" (SELECT merchant_serial "
@@ -5118,9 +5118,9 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" AND"
" creation_time > $4"
" AND"
- " NOT BOOL($5)" /* unclaimed orders are never
paid */
+ " NOT CAST($5 as BOOL)" /* unclaimed orders are
never paid */
" AND"
- " NOT BOOL ($6)"/* unclaimed orders are never
refunded */
+ " NOT CAST($6 as BOOL)"/* unclaimed orders are
never refunded */
" ORDER BY order_serial ASC"
" LIMIT $2)"
"UNION " /* union ensures elements are distinct! */
@@ -5153,7 +5153,7 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" order_id"
",order_serial"
",creation_time"
- ",BOOL($6)" /* otherwise $6 is unused and Postgres
unhappy */
+ ",CAST($6 as BOOL)" /* otherwise $6 is unused and
Postgres unhappy */
" FROM merchant_orders"
" WHERE merchant_orders.merchant_serial="
" (SELECT merchant_serial "
@@ -5164,9 +5164,9 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" AND"
" creation_time > $4"
" AND"
- " NOT BOOL($5)" /* unclaimed orders are never
paid */
+ " NOT CAST($5 as BOOL)" /* unclaimed orders are
never paid */
" AND"
- " NOT BOOL ($7)" /* unclaimed orders are never
wired */
+ " NOT CAST($7 as BOOL)" /* unclaimed orders are
never wired */
" ORDER BY order_serial ASC"
" LIMIT $2)"
"UNION " /* union ensures elements are distinct! */
@@ -5174,7 +5174,7 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" order_id"
",order_serial"
",creation_time"
- ",BOOL($6)" /* otherwise $6 is unused and Postgres
unhappy */
+ ",CAST($6 as BOOL)" /* otherwise $6 is unused and
Postgres unhappy */
" FROM merchant_contract_terms"
" WHERE merchant_contract_terms.merchant_serial="
" (SELECT merchant_serial "
@@ -5198,7 +5198,7 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" order_id"
",order_serial"
",creation_time"
- ",BOOL($5)" /* otherwise $5 is unused and Postgres
unhappy */
+ ",CAST($5 as BOOL)" /* otherwise $5 is unused and
Postgres unhappy */
" FROM merchant_orders"
" WHERE merchant_orders.merchant_serial="
" (SELECT merchant_serial "
@@ -5209,9 +5209,9 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" AND"
" creation_time > $4"
" AND"
- " NOT BOOL ($6)"/* unclaimed orders are never
refunded */
+ " NOT CAST($6 as BOOL)"/* unclaimed orders are
never refunded */
" AND"
- " NOT BOOL ($7)" /* unclaimed orders are never
wired */
+ " NOT CAST($7 as BOOL)" /* unclaimed orders are
never wired */
" ORDER BY order_serial ASC"
" LIMIT $2)"
"UNION " /* union ensures elements are distinct! */
@@ -5219,7 +5219,7 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" order_id"
",order_serial"
",creation_time"
- ",BOOL($5)" /* otherwise $5 is unused and Postgres
unhappy */
+ ",CAST($5 as BOOL)" /* otherwise $5 is unused and
Postgres unhappy */
" FROM merchant_contract_terms"
" WHERE merchant_contract_terms.merchant_serial="
" (SELECT merchant_serial "
@@ -5255,11 +5255,11 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" AND"
" creation_time > $4"
" AND"
- " NOT BOOL($5)" /* unclaimed orders are never
paid */
+ " NOT CAST($5 as BOOL)" /* unclaimed orders are
never paid */
" AND"
- " NOT BOOL ($6)"/* unclaimed orders are never
refunded */
+ " NOT CAST($6 as BOOL)"/* unclaimed orders are
never refunded */
" AND"
- " NOT BOOL ($7)" /* unclaimed orders are never
wired */
+ " NOT CAST($7 as BOOL)" /* unclaimed orders are
never wired */
" ORDER BY order_serial ASC"
" LIMIT $2)"
"UNION " /* union ensures elements are distinct! */
@@ -5339,7 +5339,7 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" AND"
" creation_time < $4"
" AND"
- " NOT BOOL($5)" /* unclaimed orders are never
paid */
+ " NOT CAST($5 as BOOL)" /* unclaimed orders are
never paid */
" ORDER BY order_serial DESC"
" LIMIT $2)"
"UNION " /* union ensures elements are distinct! */
@@ -5368,7 +5368,7 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" order_id"
",order_serial"
",creation_time"
- ",BOOL($5)" /* otherwise $5 is unused and Postgres
unhappy */
+ ",CAST($5 as BOOL)" /* otherwise $5 is unused and
Postgres unhappy */
" FROM merchant_orders"
" WHERE merchant_orders.merchant_serial="
" (SELECT merchant_serial "
@@ -5379,7 +5379,7 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" AND"
" creation_time < $4"
" AND"
- " NOT BOOL ($6)"/* unclaimed orders are never
refunded */
+ " NOT CAST($6 as BOOL)"/* unclaimed orders are
never refunded */
" ORDER BY order_serial DESC"
" LIMIT $2)"
"UNION " /* union ensures elements are distinct! */
@@ -5387,7 +5387,7 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" order_id"
",order_serial"
",creation_time"
- ",BOOL($5)" /* otherwise $5 is unused and Postgres
unhappy */
+ ",CAST($5 as BOOL)" /* otherwise $5 is unused and
Postgres unhappy */
" FROM merchant_contract_terms"
" WHERE merchant_contract_terms.merchant_serial="
" (SELECT merchant_serial "
@@ -5411,8 +5411,8 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" order_id"
",order_serial"
",creation_time"
- ",BOOL($5)" /* otherwise $5 is unused and Postgres
unhappy */
- ",BOOL($6)" /* otherwise $6 is unused and Postgres
unhappy */
+ ",CAST($5 as BOOL)" /* otherwise $5 is unused and
Postgres unhappy */
+ ",CAST($6 as BOOL)" /* otherwise $6 is unused and
Postgres unhappy */
" FROM merchant_orders"
" WHERE merchant_orders.merchant_serial="
" (SELECT merchant_serial "
@@ -5423,7 +5423,7 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" AND"
" creation_time < $4"
" AND"
- " NOT BOOL ($7)" /* unclaimed orders are never
wired */
+ " NOT CAST($7 as BOOL)" /* unclaimed orders are
never wired */
" ORDER BY order_serial DESC"
" LIMIT $2)"
"UNION " /* union ensures elements are distinct! */
@@ -5431,8 +5431,8 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" order_id"
",order_serial"
",creation_time"
- ",BOOL($5)" /* otherwise $5 is unused and Postgres
unhappy */
- ",BOOL($6)" /* otherwise $6 is unused and Postgres
unhappy */
+ ",CAST($5 as BOOL)" /* otherwise $5 is unused and
Postgres unhappy */
+ ",CAST($6 as BOOL)" /* otherwise $6 is unused and
Postgres unhappy */
" FROM merchant_contract_terms"
" WHERE merchant_contract_terms.merchant_serial="
" (SELECT merchant_serial "
@@ -5464,9 +5464,9 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" AND"
" creation_time < $4"
" AND"
- " NOT BOOL($5)" /* unclaimed orders are never
paid */
+ " NOT CAST($5 as BOOL)" /* unclaimed orders are
never paid */
" AND"
- " NOT BOOL ($6)"/* unclaimed orders are never
refunded */
+ " NOT CAST($6 as BOOL)"/* unclaimed orders are
never refunded */
" ORDER BY order_serial DESC"
" LIMIT $2)"
"UNION " /* union ensures elements are distinct! */
@@ -5499,7 +5499,7 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" order_id"
",order_serial"
",creation_time"
- ",BOOL($6)" /* otherwise $6 is unused and Postgres
unhappy */
+ ",CAST($6 as BOOL)" /* otherwise $6 is unused and
Postgres unhappy */
" FROM merchant_orders"
" WHERE merchant_orders.merchant_serial="
" (SELECT merchant_serial "
@@ -5510,9 +5510,9 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" AND"
" creation_time < $4"
" AND"
- " NOT BOOL($5)" /* unclaimed orders are never
paid */
+ " NOT CAST($5 as BOOL)" /* unclaimed orders are
never paid */
" AND"
- " NOT BOOL ($7)" /* unclaimed orders are never
wired */
+ " NOT CAST($7 as BOOL)" /* unclaimed orders are
never wired */
" ORDER BY order_serial DESC"
" LIMIT $2)"
"UNION " /* union ensures elements are distinct! */
@@ -5520,7 +5520,7 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" order_id"
",order_serial"
",creation_time"
- ",BOOL($6)" /* otherwise $6 is unused and Postgres
unhappy */
+ ",CAST($6 as BOOL)" /* otherwise $6 is unused and
Postgres unhappy */
" FROM merchant_contract_terms"
" WHERE merchant_contract_terms.merchant_serial="
" (SELECT merchant_serial "
@@ -5544,7 +5544,7 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" order_id"
",order_serial"
",creation_time"
- ",BOOL($5)" /* otherwise $5 is unused and Postgres
unhappy */
+ ",CAST($5 as BOOL)" /* otherwise $5 is unused and
Postgres unhappy */
" FROM merchant_orders"
" WHERE merchant_orders.merchant_serial="
" (SELECT merchant_serial "
@@ -5555,9 +5555,9 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" AND"
" creation_time < $4"
" AND"
- " NOT BOOL ($6)"/* unclaimed orders are never
refunded */
+ " NOT CAST($6 as BOOL)"/* unclaimed orders are
never refunded */
" AND"
- " NOT BOOL ($7)" /* unclaimed orders are never
wired */
+ " NOT CAST($7 as BOOL)" /* unclaimed orders are
never wired */
" ORDER BY order_serial DESC"
" LIMIT $2)"
"UNION " /* union ensures elements are distinct! */
@@ -5565,7 +5565,7 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" order_id"
",order_serial"
",creation_time"
- ",BOOL($5)" /* otherwise $5 is unused and Postgres
unhappy */
+ ",CAST($5 as BOOL)" /* otherwise $5 is unused and
Postgres unhappy */
" FROM merchant_contract_terms"
" WHERE merchant_contract_terms.merchant_serial="
" (SELECT merchant_serial "
@@ -5601,11 +5601,11 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" AND"
" creation_time < $4"
" AND"
- " NOT BOOL($5)" /* unclaimed orders are never
paid */
+ " NOT CAST($5 as BOOL)" /* unclaimed orders are
never paid */
" AND"
- " NOT BOOL ($6)"/* unclaimed orders are never
refunded */
+ " NOT CAST($6 as BOOL)"/* unclaimed orders are
never refunded */
" AND"
- " NOT BOOL ($7)" /* unclaimed orders are never
wired */
+ " NOT CAST($7 as BOOL)" /* unclaimed orders are
never wired */
" ORDER BY order_serial DESC"
" LIMIT $2)"
"UNION " /* union ensures elements are distinct! */
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-merchant] 107/277: implement GET /transfers, (continued)
- [taler-merchant] 107/277: implement GET /transfers, gnunet, 2020/07/05
- [taler-merchant] 106/277: implement merchant_api_post_transfers.c, gnunet, 2020/07/05
- [taler-merchant] 111/277: fix link errors in test, gnunet, 2020/07/05
- [taler-merchant] 90/277: starting with get-orders-ID logic, gnunet, 2020/07/05
- [taler-merchant] 92/277: fix backenddb, gnunet, 2020/07/05
- [taler-merchant] 97/277: integrate POST /tranfers handler, gnunet, 2020/07/05
- [taler-merchant] 105/277: API design for /transfers, gnunet, 2020/07/05
- [taler-merchant] 113/277: use unregister, gnunet, 2020/07/05
- [taler-merchant] 112/277: rename _v to _mv for merchant, gnunet, 2020/07/05
- [taler-merchant] 118/277: implement POST /reserves, gnunet, 2020/07/05
- [taler-merchant] 122/277: fixed bool casts in plugin initialization,
gnunet <=
- [taler-merchant] 129/277: fixed coding style in db tests and double callbacks in lookup_instances, gnunet, 2020/07/05
- [taler-merchant] 131/277: towards POST tips pickup impl, gnunet, 2020/07/05
- [taler-merchant] 120/277: implement insert_reserve, gnunet, 2020/07/05
- [taler-merchant] 125/277: more work on GET /reserves logic, gnunet, 2020/07/05
- [taler-merchant] 99/277: more work on post /transfers and the like, gnunet, 2020/07/05
- [taler-merchant] 93/277: updates, gnunet, 2020/07/05
- [taler-merchant] 100/277: more work on POST /transfer, gnunet, 2020/07/05
- [taler-merchant] 121/277: Merge branch 'master' into protocolV1, gnunet, 2020/07/05
- [taler-merchant] 126/277: more instance and product related tests, gnunet, 2020/07/05
- [taler-merchant] 124/277: expanding DB API, gnunet, 2020/07/05