【发布时间】:2019-10-09 23:59:03
【问题描述】:
我有一个由 PostgreSQL 支持的原始光滑查询。我想运行这样的查询:select something from my_table where action in (1,2,3)。请注意,action 是my_table 中的integer 字段
我在下面的方法中遇到编译错误:
找不到参数 e 的隐含值: slick.jdbc.SetParameter[List[Int]]
def myMethod(actions: List[Int]]) {
sql"""select something from my_table
where action in (${actions})""".as[MyType]
}
问题
如何显式设置List[Int] 参数,以便成功运行in 查询?
【问题讨论】: