honeysql

Discussion of https://github.com/seancorfield/honeysql :slightly_smiling_face:
exit2 2020-02-25T14:31:34.006800Z

(-> (select :id)
    (from table)
    (where [:in :id data])
    hsql/format)

exit2 2020-02-25T14:31:54.007300Z

@seancorfield something like this? For some reason I’m getting zero results, when I know the ids exist in the db

exit2 2020-02-25T14:39:04.007600Z

ends up as:

exit2 2020-02-25T14:39:15.008Z

[SELECT id FROM import.transactions WHERE (id in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)) 5e54d45c925c460001328b91 5e54d45ccc7f8e00a0a23166 5e54d45ecc7f8e00a0a2316c 5e54d45a72895300219558b5 5e54d45a72895300219558b6]

exit2 2020-02-25T14:50:42.008500Z

(I trimmed the ids in this example for brevity, thats why there are more ?’s)

seancorfield 2020-02-25T16:32:21.009200Z

That looks right. Have you tried running that SQL manually?