Skip to content

Commit 3f279b0

Browse files
OBorceazarovh
authored andcommitted
Add missing subquery alias required by Postgresql <16
1 parent 50b9f05 commit 3f279b0

File tree

1 file changed

+2
-2
lines changed
  • api-server/api-server-common/src/storage/impls/postgres

1 file changed

+2
-2
lines changed

api-server/api-server-common/src/storage/impls/postgres/queries.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2338,7 +2338,7 @@ impl<'a, 'b> QueryFromConnection<'a, 'b> {
23382338
FROM (
23392339
SELECT order_id, initially_asked, ask_balance, ask_currency, initially_given, give_balance, give_currency, conclude_destination, next_nonce, creation_block_height, block_height, ROW_NUMBER() OVER(PARTITION BY order_id ORDER BY block_height DESC) as newest
23402340
FROM ml.orders
2341-
)
2341+
) AS sub
23422342
WHERE newest = 1
23432343
ORDER BY creation_block_height DESC
23442344
OFFSET $1
@@ -2371,7 +2371,7 @@ impl<'a, 'b> QueryFromConnection<'a, 'b> {
23712371
FROM (
23722372
SELECT order_id, initially_asked, ask_balance, ask_currency, initially_given, give_balance, give_currency, conclude_destination, next_nonce, creation_block_height, block_height, ROW_NUMBER() OVER(PARTITION BY order_id ORDER BY block_height DESC) as newest
23732373
FROM ml.orders
2374-
)
2374+
) AS sub
23752375
WHERE newest = 1 AND ((ask_currency = $1 AND give_currency = $2) OR (ask_currency = $2 AND give_currency = $1))
23762376
ORDER BY creation_block_height DESC
23772377
OFFSET $3

0 commit comments

Comments
 (0)