Skip to content

Commit a376afe

Browse files
committed
Simplify transfer operation in bank test
1 parent 03d18e9 commit a376afe

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/tarantool/bank.clj

+4-6
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,11 @@
114114

115115
:transfer
116116
(let [{:keys [from to amount]} (:value op)
117-
from (str table-name from)
118-
to (str table-name to)
119-
con (cl/open (first (db/primaries test)) test)
120-
from_uppercase (clojure.string/upper-case from)
121-
to_uppercase (clojure.string/upper-case to)
117+
table_from (str (clojure.string/upper-case table-name) from)
118+
table_to (str (clojure.string/upper-case table-name) to)
119+
con (cl/open (first (db/primaries test)) test)
122120
r (-> con
123-
(sql/query [(str "SELECT _WITHDRAW_MULTITABLE('" from_uppercase "','" to_uppercase "'," amount ")")])
121+
(sql/query [(str "SELECT _WITHDRAW_MULTITABLE('" table_from "','" table_to "'," amount ")")])
124122
first
125123
:COLUMN_1)]
126124
(if (false? r)

0 commit comments

Comments
 (0)