aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2024-02-09 23:36:43 +0100
committerChristian Grothoff <christian@grothoff.org>2024-02-09 23:36:43 +0100
commit34c57d80369fac7168313ec1e68ecf74f2519fb9 (patch)
treec9019b550a262ee84e1cade4ff4677b65eff49bd
parentfeed3903671edc872c5fb8cfaad677727047d203 (diff)
-sql fix
-rw-r--r--src/backenddb/pg_lookup_orders.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/backenddb/pg_lookup_orders.c b/src/backenddb/pg_lookup_orders.c
index 632638f6..972db6d8 100644
--- a/src/backenddb/pg_lookup_orders.c
+++ b/src/backenddb/pg_lookup_orders.c
@@ -161,11 +161,11 @@ TMH_PG_lookup_orders (void *cls,
" AND"
" creation_time < $4"
" AND ($5 OR "
- " NOT BOOL($6))" /* unclaimed orders are never paid */
+ " NOT CAST($6 AS BOOL))" /* unclaimed orders are never paid */
" AND ($7 OR "
- " NOT BOOL($8))"/* unclaimed orders are never refunded */
+ " NOT CAST($8 AS BOOL))"/* unclaimed orders are never refunded */
" AND ($9 OR "
- " NOT BOOL($10))" /* unclaimed orders are never wired */
+ " NOT CAST($10 AS BOOL))" /* unclaimed orders are never wired */
" AND"
" order_serial NOT IN"
" (SELECT order_serial"
@@ -191,13 +191,13 @@ TMH_PG_lookup_orders (void *cls,
" AND"
" creation_time < $4"
" AND ($5 OR "
- " (BOOL($6) = paid))"
+ " (CAST($6 AS BOOL) = paid))"
" AND ($7 OR "
- " (BOOL($8) = (order_serial IN"
+ " (CAST($8 AS BOOL) = (order_serial IN"
" (SELECT order_serial "
" FROM merchant_refunds))))"
" AND ($9 OR"
- " (BOOL($10) = wired))"
+ " (CAST($10 AS BOOL) = wired))"
" AND ($11 OR "
" ($12 = session_id))"
" AND ($13 OR "
@@ -223,11 +223,11 @@ TMH_PG_lookup_orders (void *cls,
" AND"
" creation_time > $4"
" AND ($5 OR "
- " NOT BOOL($6))" /* unclaimed orders are never paid */
+ " NOT CAST($6 AS BOOL))" /* unclaimed orders are never paid */
" AND ($7 OR "
- " NOT BOOL($8))"/* unclaimed orders are never refunded */
+ " NOT CAST($8 AS BOOL))"/* unclaimed orders are never refunded */
" AND ($9 OR "
- " NOT BOOL($10))" /* unclaimed orders are never wired */
+ " NOT CAST($10 AS BOOL))" /* unclaimed orders are never wired */
" AND"
" (order_serial NOT IN"
" (SELECT order_serial"
@@ -253,13 +253,13 @@ TMH_PG_lookup_orders (void *cls,
" AND"
" creation_time > $4"
" AND ($5 OR "
- " (BOOL($6) = paid))"
+ " (CAST($6 AS BOOL) = paid))"
" AND ($7 OR "
- " (BOOL($8) = (order_serial IN"
+ " (CAST($8 AS BOOL) = (order_serial IN"
" (SELECT order_serial "
" FROM merchant_refunds))))"
" AND ($9 OR"
- " (BOOL($10) = wired))"
+ " (CAST($10 AS BOOL) = wired))"
" AND ($11 OR "
" ($12 = session_id))"
" AND ($13 OR "