honeysql

Discussion of https://github.com/seancorfield/honeysql :slightly_smiling_face:
Nassin 2021-01-21T03:25:24.001400Z

What would be the structure for from weather w, cities c ....?

seancorfield 2021-01-21T03:34:26.001800Z

@kaxaw75836 are you using the helper functions or just the raw data structure?

Nassin 2021-01-21T03:35:51.002Z

raw

seancorfield 2021-01-21T03:36:54.002900Z

In general with HoneySQL, if :foo is a SQL entity then [:foo :bar] is a SQL entity with an alias.

Nassin 2021-01-21T03:39:34.004200Z

:from [:foo :bar :baz :bat] produces from foo, bar, baz, bat

Nassin 2021-01-21T03:40:55.004600Z

ah

Nassin 2021-01-21T03:41:59.005300Z

I see what you mean [[:foo :bar] [:baz :bat]] thx!

Nassin 2021-01-21T03:44:26.005900Z

missed it cause I was ignoring the "vanilla helpers" in the docs

seancorfield 2021-01-21T03:51:24.006700Z

I prefer the helpers. I wish more people used them.

seancorfield 2021-01-21T03:51:49.007200Z

It's really hard to get the raw data structures right. The helpers... well... help.

Nassin 2021-01-21T04:20:55.007600Z

noted, you use it for all your queries or just dynamic ones?

seancorfield 2021-01-21T04:26:02.009100Z

Just dynamic ones. We don't use HoneySQL for static queries. And we only use the helpers, not the raw data structure. And we're heavy users of HoneySQL -- one of my colleagues did a Clojure/West talk about it in 2015 (I think).

markaddleman 2021-01-21T04:51:16.012600Z

fwiw, I code honey using the data structures directly. the only real problem is that, when i get something wrong, the resulting error message isn't terribly helpful but i can generally visually spot the problem in a minute or two of examining the data structure. i'm looking forward to honey 2.0 and spec. not only do i expect the error messages to get better, i think spec will make it easier to programmaticly manipulate queries.