🔥 Remove unused code.

This commit is contained in:
Andrey Antukh 2020-12-09 17:26:04 +01:00 committed by Alonso Torres
parent 05563168c3
commit 6cb2f1663e
2 changed files with 1 additions and 10 deletions

View file

@ -219,15 +219,6 @@
:else
(ex/raise :type :not-implemented)))
(defn decode-pgobject
[^PGobject obj]
(let [typ (.getType obj)
val (.getValue obj)]
(if (or (= typ "json")
(= typ "jsonb"))
(json/read-str val)
val)))
(defn decode-json-pgobject
[^PGobject o]
(let [typ (.getType o)

View file

@ -76,7 +76,7 @@
[_task]
(letfn [(decode-row [{:keys [data] :as row}]
(cond-> row
(db/pgobject? data) (assoc :data (db/decode-pgobject data))))
(db/pgobject? data) (assoc :data (db/decode-json-pgobject data))))
(retrieve-items [conn]
(->> (db/exec! conn [sql:retrieve-peding-to-delete 10])
(map decode-row)