Fork me on GitHub
#honeysql
<
2023-02-20
>
henrik16:02:03

Playing around with H2 and HoneySQL. Very cool! A question regarding variables; I’m inserting a bunch of rows where one value is a foreign key. It’s the same foreign key for all entries, so I’d like to look up the foreign key once, bind it to a variable. Doing the lookup inline in the :insert-into looks like it might become a bit verbose when there are many entries. Long story short, is there syntax for binding the result of a select into a variable that I can use in the insert?