I found something weird,
This is the method,
(defn get-report
"Get a particular report"
[{db-spec :db :as system} org-id uid report-id]
(try
(->> (j/query db-spec
(sql/sql
(sql/select db [:id :org-id :creator :title :settings
:created-at :updated-at :filters :type]
(sql/from :report)
(sql/where `(and (= :org-id ~org-id)
(= :id ~report-id))))))
first
(transform-keys ->kebab-case-keyword))
(catch SQLException e
(timbre/error e)
(throw (IllegalArgumentException. "Failed to fetch the report")))))
If I run this in repl like this,
(get-report {:db (:myapp/db integrant.repl.state/system)} 1 “L0QGp8J3P0fFNq7eGeR7Tl61UuL2” 1)`
I get:
{:updated-at #inst "2021-06-02T09:44:15.130000000-00:00", :creator "L0QGp8J3P0fFNq7eGeR7Tl61UuL2", :filters {:id 3, :page 1, :sort ["seqNo:asc"]}, :settings {:columns [{:key "seqNo", :active true} {:key "title", :active true} {:key "status", :active true} {:key "dueDate", :active true} {:key "priority", :active true} {:key "parent", :active true} {:key "childCount", :active true} {:key "createdAt", :active true} {:key "updatedAt", :active true} {:key "completedAt", :active true} {:key "completedBy", :active false} {:key "age", :active true} {:key "creator", :active true} {:key "owner", :active true} {:key "members", :active true} {:key "description", :active true} {:id 4, :key 4, :type "text", :label "Screenplay", :active false, :settings "{}", :auto-check false} {:id 5, :key 5, :type "text", :label "Direction", :active false, :settings "{}", :auto-check false} {:id 6, :key 6, :type "text", :label "Cast", :active false, :settings "{}", :auto-check false} {:id 11, :key 11, :type "text", :label "SOME", :active false, :settings "{}", :auto-check false}]}, :type "process", :org-id 1, :title "Test Three", :id 1, :created-at #inst "2021-05-24T07:10:32.506789000-00:00"}
But if call that func and print itlike this in code,
(println "R" (get-report {:db db-spec} org-id uid report-id))
I get:
{:updated-at #inst "2021-06-02T09:44:15.130000000-00:00", :creator L0QGp8J3P0fFNq7eGeR7Tl61UuL2, :filters {:id 3, :page 1, :sort [seqNo:asc]}, :settings {:columns [{:key seqNo, :active true} {:key title, :active true} {:key status, :active true} {:key dueDate, :active true} {:key priority, :active true} {:key parent, :active true} {:key childCount, :active true} {:key createdAt, :active true} {:key updatedAt, :active true} {:key completedAt, :active true} {:key completedBy, :active false} {:key age, :active true} {:key creator, :active true} {:key owner, :active true} {:key members, :active true} {:key description, :active true} {:id 4, :key 4, :type text, :label Screenplay, :active false, :settings {}, :auto-check false} {:id 5, :key 5, :type text, :label Direction, :active false, :settings {}, :auto-check false} {:id 6, :key 6, :type text, :label Cast, :active false, :settings {}, :auto-check false} {:id 11, :key 11, :type text, :label SOME, :active false, :settings {}, :auto-check false}]}, :type process, :org-id 1, :title Test Three, :id 1, :created-at #inst "2021-05-24T07:10:32.506789000-00:00"}