From 4c4dac8e90736f013c9f4e0e10ed790f66193d7a Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Wed, 9 Jun 2021 16:56:49 +0200 Subject: [PATCH] :sparkles: Allow check for pgobject type. --- backend/src/app/db.clj | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/backend/src/app/db.clj b/backend/src/app/db.clj index e11e5b8bc..e1455e719 100644 --- a/backend/src/app/db.clj +++ b/backend/src/app/db.clj @@ -252,8 +252,11 @@ (exec! ds (sql/select table params opts)))) (defn pgobject? - [v] - (instance? PGobject v)) + ([v] + (instance? PGobject v)) + ([v type] + (and (instance? PGobject v) + (= type (.getType ^PGobject v))))) (defn pginterval? [v]