且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Slick 2.0:删除多行

更新时间:2023-12-03 12:01:16

尝试MyTable.filter(_.id in MyTable.sortBy(_.id.asc).take(size).map(_.id)).delete.暂时不查看详细信息,我假设错误消息具有误导性,并且DELETE不支持原因ORDER BY和LIMIT.

Try MyTable.filter(_.id in MyTable.sortBy(_.id.asc).take(size).map(_.id)).delete. Without looking at the details right now, I am assuming the error message to be misleading and the cause to be ORDER BY and LIMIT to not be supported for DELETE.

我创建了一张票证: https://github.com/slick/slick/issues/872