What would be the structure for from weather w, cities c ....
?
@kaxaw75836 are you using the helper functions or just the raw data structure?
raw
In general with HoneySQL, if :foo
is a SQL entity then [:foo :bar]
is a SQL entity with an alias.
:from [:foo :bar :baz :bat]
produces from foo, bar, baz, bat
ah
I see what you mean [[:foo :bar] [:baz :bat]]
thx!
missed it cause I was ignoring the "vanilla helpers" in the docs
I prefer the helpers. I wish more people used them.
It's really hard to get the raw data structures right. The helpers... well... help.
noted, you use it for all your queries or just dynamic ones?
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).
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.