gnunet-svn
[Top][All Lists]
Advanced

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

[libeufin] branch master updated: Bank DB: getting the history query to


From: gnunet
Subject: [libeufin] branch master updated: Bank DB: getting the history query to return.
Date: Fri, 01 Sep 2023 13:55:51 +0200

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

ms pushed a commit to branch master
in repository libeufin.

The following commit(s) were added to refs/heads/master by this push:
     new 91e6a439 Bank DB: getting the history query to return.
91e6a439 is described below

commit 91e6a43917622a91e1c6f69bfbf155ec63d87073
Author: MS <ms@taler.net>
AuthorDate: Fri Sep 1 13:54:23 2023 +0200

    Bank DB: getting the history query to return.
---
 sandbox/src/main/kotlin/tech/libeufin/sandbox/Database.kt |  4 ++--
 sandbox/src/test/kotlin/DatabaseTest.kt                   | 12 ++++++++++++
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Database.kt 
b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Database.kt
index eab8d7f0..dde9d47b 100644
--- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Database.kt
+++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Database.kt
@@ -329,7 +329,7 @@ class Database(private val dbConfig: String) {
               ,debtor_bic
               ,debtor_name
               ,subject
-              ,(amount).val AS amount_val,
+              ,(amount).val AS amount_val
               ,(amount).frac AS amount_frac
               ,transaction_date
               ,account_servicer_reference
@@ -338,7 +338,7 @@ class Database(private val dbConfig: String) {
               ,direction
               ,bank_account_id
             FROM bank_account_transactions
-               WHERE bank_account_transaction_id < ?
+               WHERE bank_transaction_id < ?
               AND bank_account_id=?
               AND transaction_date BETWEEN ? AND ?
         """)
diff --git a/sandbox/src/test/kotlin/DatabaseTest.kt 
b/sandbox/src/test/kotlin/DatabaseTest.kt
index ff4f537b..2ca6aeb3 100644
--- a/sandbox/src/test/kotlin/DatabaseTest.kt
+++ b/sandbox/src/test/kotlin/DatabaseTest.kt
@@ -203,4 +203,16 @@ class DatabaseTest {
         // Finally confirming the operation (means customer wired funds to the 
exchange.)
         assert(db.talerWithdrawalGet(uuid)?.confirmationDone == true)
     }
+    // Only testing the interaction between Kotlin and the DBMS.  No actual 
logic tested.
+    @Test
+    fun historyTest() {
+        val db = initDb()
+        val res = db.bankTransactionGetForHistoryPage(
+            10L,
+            1L,
+            fromMs = 0,
+            toMs = Long.MAX_VALUE
+        )
+        assert(res.isEmpty())
+    }
 }
\ No newline at end of file

-- 
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]