Fork me on GitHub
#honeysql
<
2024-01-12
>
lepistane11:01:48

How does one do this in honeysql?

SELECT *, 'period-change' AS event_name FROM `period-change`;
[solved]

p-himik11:01:31

(sql/format {:select [:* [[:inline "period-change"] :event_name]]
             :from   :period-change}
            :dialect :mysql)
=> ["SELECT *, 'period-change' AS `event_name` FROM `period-change`"]

lepistane11:01:29

wwoooow and i was trying it as :period-change and was getting

(conn=103471) Unknown column 'period_change' in 'field list'

lepistane11:01:41

thank you so much!

👍 1