我正在玩PlayScala和Slick。但是如何在Slick2中执行Like查询。任何文档都会更有帮助
SQL:
SELECT * FROM MyTable WHERE columnA LIKE "%s%";
答案 0 :(得分:0)
试试这个
val query = for {
coffee <- Coffees if coffee.name like "%expresso%"
} yield (coffee.name, coffee.price)
将生成类似
的SQLSELECT name, price FROM coffees WHERE NAME like '%expresso%';