2017-09-13 4 views
1

私の質問は:どのように私は、次のSQLにスリックコンパイルされたクエリ相当するものを作成することができます。Scalaのスリック「(言葉)でテーブル語から選択*」

select * from table where word in ('word1', 'word2', 'word3') 

私は「コード現在、このようなルックスで立ち往生M:

val findByWords = Compiled { words: Set[String] => 
    keywords.filter(_.word inSet words) 
} 

コンパイルすると、私は次のエラーを取得する:

 
Computation of type Set[String] => slick.lifted.Query[com.company.business.db.CensoredKeyWords,com.company.business.db.CensoredKeyWords#TableElementType,Seq] cannot be compiled (as type C) 
val findByWords = Compiled { words: Set[String] => 
         ^

お知らせ矢印は中括弧を指しています。

私はSlick 3.2.1を使用しています。 Scala 2.12.3

答えて

関連する問題