如何 select 来自 table 的所有行?
How to select all rows from table?
正如题主所说,如何无条件查询table(WHERE子句)?
例如,LookupTable.filter(r => true)(这当然行不通)
谢谢
基本上你需要做的就是使用这个:LookupTable.result
.
事实上,这正是 Slick 文档 "Getting started section" 中的第一个代码示例:http://slick.lightbend.com/doc/3.1.1/gettingstarted.html#querying
由于您的问题中没有粘贴代码,我只能假设您知道您需要使用 db.run(...)
来解雇您 DBIO
(由此 result
生成打电话)。
正如题主所说,如何无条件查询table(WHERE子句)?
例如,LookupTable.filter(r => true)(这当然行不通)
谢谢
基本上你需要做的就是使用这个:LookupTable.result
.
事实上,这正是 Slick 文档 "Getting started section" 中的第一个代码示例:http://slick.lightbend.com/doc/3.1.1/gettingstarted.html#querying
由于您的问题中没有粘贴代码,我只能假设您知道您需要使用 db.run(...)
来解雇您 DBIO
(由此 result
生成打电话)。