any ideas on how I can prefix a table name? eg. for tables big_widgets and small_widgets I want to re-use the same queries.sql
SELECT * FROM :sql:prefixwidgets;
{:prefix "big_"}
was hoping to get that translated to
SELECT * FROM big_widgets;
I tried
SELECT * FROM :sql:prefix\widgets;
but unfortunately the \ is left in the query
You can work around the HugSQL parser not knowing when to end your parameter and start the SQL by jumping into a Clojure Expression:
select * from /*~ ":sql:prefix" ~*/widgets