0
我對Slick和Scala非常陌生,我正努力用ID列表過濾查詢。如何使用ID列表篩選TableQuery?
productsNeededIds // = "1,2,3,4,5" - list of Ids of products
問:如何使用.filter從分割列表中獲取所有id的查詢?
def productsWithIds(productsNeededIds: String)(implicit ec: ExecutionContext): Future[List[ProductsREST]] = {
var splitedArray :Array[String] = productsNeededIds.split(",")
val query = Products.filter(_.prodId === splitedArray)// what should be here instead of ===splitedArray?
}