honeysql

Discussion of https://github.com/seancorfield/honeysql :slightly_smiling_face:
bja 2017-11-11T04:44:47.000026Z

I figured the issue was that {:select [:< 1 2]} was just bad syntax and the parameterization was fine

bja 2017-11-11T04:45:27.000028Z

you could extend honeysql pretty easily to make a smarter version of call that wouldn't lift numbers

bja 2017-11-11T04:46:34.000060Z

the way the honeysql compiler works, you just create a new record to hold your values and then a wrapper for that record, and then register into ToSql so the compiler knows what to do

bja 2017-11-11T04:54:10.000086Z

apparently there is a recent feature called inline that does this

bja 2017-11-11T04:57:30.000083Z

user=&gt; (format (select (call :&lt; (inline 1) (inline 2))))
["SELECT 1 &lt; 2"]

bja 2017-11-11T04:59:29.000044Z

also amusing to me that inline was added in response to a @seancorfield PR

seancorfield 2017-11-11T05:10:46.000044Z

@bja Ah, that explains why this issue felt so familiar!

2017-11-11T14:08:57.000092Z

Ah that seems better than the raw option. Feels a bit more composable. Thanks @bja