For example, I want to create the following query:
SELECT c.* FROM Coffees c WHERE c.name IN (\'robusta\', \'arabica\')
My attempt failed:<
Although it's not safe for SQL injection, you can use #$ interpolator:
#$
val ids = idList.mkString("'", "','", "'") val q = sql"""select name from mytable where id in (#$ids)"""