0
我正在玩PlayScala和Slick。但是如何在Slick2中執行Like查詢。任何文件會更有幫助光滑如何執行LIKE查詢
SQL:
SELECT * FROM MyTable WHERE columnA LIKE "%s%";
我正在玩PlayScala和Slick。但是如何在Slick2中執行Like查詢。任何文件會更有幫助光滑如何執行LIKE查詢
SQL:
SELECT * FROM MyTable WHERE columnA LIKE "%s%";
嘗試這個
val query = for {
coffee <- Coffees if coffee.name like "%expresso%"
} yield (coffee.name, coffee.price)
會生成SQL像
SELECT name, price FROM coffees WHERE NAME like '%expresso%';