hugsql

stathissideris 2019-02-28T16:26:32.000200Z

hello

stathissideris 2019-02-28T16:27:32.001400Z

if I want to have a query with a dynamic WHERE part (where some conditions are sometimes included, sometimes not) I need to use honeysql right?

2019-02-28T17:51:58.002500Z

Hugsql can do this, I believe

2019-02-28T17:54:12.002800Z

https://www.hugsql.org/#using-expressions

cjmurphy 2019-02-28T18:01:50.003300Z

You can be as dynamic as you want if you use db-fn.

2019-02-28T23:00:29.003800Z

you can do things like this --~ (if (:model params) " and m.code = :model" " and m.code is null") on 98% of my cases that's enough