forked from slick/slick
-
Notifications
You must be signed in to change notification settings - Fork 12
Counts
mkleen edited this page Oct 12, 2010
·
2 revisions
Counting all values of a column:
for(t <- MyTable) yield t.myColumn.count Counting only distinct values of a column:
for(t <- MyTable) yield t.myColumn.countDistinctCounting all rows of a query result:
(for(...) yield ...).count The latter creates unnecessarily complicated queries instead of a plain
COUNT in ScalaQuery 0.9.0. This is fixed in master and will be part
of release 0.9.1.