Member 10678803 Ответов: 0

Как использовать предложение in в slick?


0
down vote
favorite
I have a query which is written is using slick, it is not a plain slick query. The query is a select query which fetches the records from a table called Employee. The results are of type Employee class.

Now there is a list of Strings

val nameFilter= List("Sachin","Naveen"")
and this "nameFilter" comes dynamically and it may have any number of names

var result= dbHandle.db.run((query.drop(10).take(10)).result
The variable query is just a select query for the Employee table which selects a range of records from 11 to 20.

Now I need to filter the records which have names mentioned in the 'nameFilter' and then select the records from 11 to 20. That means I need a query with 'IN' clause.

Please note that this is not a plain Slick SQL query, I have to frame a query in the above format.


Что я уже пробовал:

Не удалось получить ожидаемый результат

0 Ответов