honeysql

Discussion of https://github.com/seancorfield/honeysql :slightly_smiling_face:
troglotit 2018-08-30T13:02:19.000100Z

Hey! How should I insert empty array to column of type json[]?

troglotit 2018-08-30T13:03:26.000100Z

I think its 50% honeysql, 50% postgres question: I don’t know how to do that even in plain sql 🙂

troglotit 2018-08-30T13:04:39.000100Z

I tried

{:order_id order_id
 :route (sql/raw (str route "::jsonb[]"))}
And it produces [“INSERT INTO routes (order_id, route) VALUES (?, []::jsonb[]) RETURNING id, route, order_id” 1506] and I get invalid syntax error at or near "["

troglotit 2018-08-30T14:43:51.000100Z

oh, forget it, I had some clojure syntax problems 😞

2018-08-30T16:55:11.000100Z

2018-08-30T17:02:08.000100Z

2018-08-30T17:33:41.000100Z

2018-08-30T17:33:41.000200Z

2018-08-30T17:33:41.000300Z

2018-08-30T17:52:56.000100Z