You can use inline val
(literal type) string values in your queries:
inline val columns = "id, name, age"
sql"""
SELECT ${columns}
FROM customers
""".readRows[Customer]()
This will not make a ?
parameter, it will directly insert the literal string.
Same as if you wrote this:
sql"""
SELECT id, name, age
FROM customers
""".readRows[Customer]()