hugsql

michael zhou 2018-11-01T08:43:35.001400Z

Hello, I am having trouble when I use hugsql to get a map.

michael zhou 2018-11-01T08:43:50.001500Z

michael zhou 2018-11-01T08:44:51.002600Z

I don’t know why it contains #object[org.joda….], I want just the time.

michael zhou 2018-11-01T08:45:22.003Z

Anybody can have a clue? Thanks.

curtis.summers 2018-11-01T11:50:12.006Z

This happens at a lower-level than HugSQL: clojure.java.jdbc has a protocol for coercing types on the way into and out of the database, and this is what's happening to your date. Somewhere in your stack (is this a Luminus app?), you've likely got clj-time's JDBC protocols being implemented: https://github.com/clj-time/clj-time/blob/master/src/clj_time/jdbc.clj