honeysql

FlavaDave 2025-06-23T17:39:27.617859Z

Is there any that I can pass string to :from and get the same output as when I pass keywords? Example: This call gives me the result that I want

(sql/format {:from
               [:foo :bar]
               :select
               :*}) 
  ; ["SELECT * FROM foo, bar"]
This call keeps the quotes
(sql/format {:from
               ["foo" "bar"]
               :select
               :*}))
; ["SELECT * FROM ?, ?" "foo" "bar"]
Is there anything I can do to make the second call return the same query as the first call?

p-himik 2025-06-23T17:40:34.529369Z

Not without altering the sqlmap. And I'd just convert those strings to keywords.

p-himik 2025-06-23T17:41:25.705219Z

Not exactly certain, but maybe you can also override the built-in :from formatter. Maybe. But that's definitely icky.

FlavaDave 2025-06-23T17:41:42.758269Z

That is what I figured. Just had my fingers crossed.

FlavaDave 2025-06-23T17:41:47.148339Z

Thanks!