How to select all rows from a table?

As the subject says, how to query a table without a condition (WHERE clause)?

For example LookupTable.filter (r => true) (this of course does not work)

thank

+4
source share
1 answer

Basically, you need to use it: LookupTable.result.

In fact, this is exactly one of the first code examples in the Slick documentation "Getting Started" here: http://slick.lightbend.com/doc/3.1.1/gettingstarted.html#querying

Since no code is inserted in your question, I can only assume that you know what you need to use db.run(...)to start you DBIO(generated by this call result).

+1
source

Source: https://habr.com/ru/post/1664639/


All Articles