honeysql

Discussion of https://github.com/seancorfield/honeysql :slightly_smiling_face:
dharrigan 2020-01-05T21:12:52.016500Z

select abs(extract(epoch from first_timestamp_field - second_timestamp-field))

dharrigan 2020-01-05T21:13:22.016800Z

so, given this, I'm struggling to render using honeysql

dharrigan 2020-01-05T21:13:46.017100Z

i.e., (sql/call :abs (sql/call :extract ....)

dharrigan 2020-01-05T21:14:18.017600Z

if I try using :epoch :from, it puts commas in such as EPOCH, FROM,

dharrigan 2020-01-05T21:14:36.017900Z

if I try (sql/raw ["epoch from"]) it renders as extract(epoch from,

dharrigan 2020-01-05T21:15:11.018100Z

.

seancorfield 2020-01-05T21:26:53.019900Z

@dharrigan No idea. That's sort of outside HoneySQL's design parameters at the moment. I'd be interested to see proposed DSL syntax for making that sort of things easier...

seancorfield 2020-01-05T21:27:38.020700Z

HoneySQL is not very good at complex expressions right now 😞

dharrigan 2020-01-05T21:31:38.021600Z

No problem. I think I may either just write a stored proc and invoke it

dharrigan 2020-01-05T21:31:47.021900Z

Or hand craft the sql

dharrigan 2020-01-05T21:31:59.022400Z

I will have a ponder

dharrigan 2020-01-05T21:32:34.022700Z

Thanks Sean!