Reputation: 1127
In slick, I could
sql"""SELECT C1 FROM T1""".as[Int].head
But I could not use a variable in the SQL
val ss = "SELECT C1 FROM T1"
sql"""${ss}""".as[Int].head
Is there some solution for this?
Upvotes: 2
Views: 398
Reputation: 4256
Use of #$
for splicing literal values can be useful in this scenario. Check Splicing Literal Values for more info.
Upvotes: 3