countDistinct
molecule.boilerplate.api.KeywordsStable.countDistinct
trait countDistinct extends AggrCoalesce
Count of distinct attribute values.
Apply countDistinct
keyword to attribute to return count of distinct attribute values of entities matching the molecule.
for {
_ <- Person.firstName.lastName.age insert List(
("Ben", "Hayday", 42),
("Liz", "Taylor", 34),
("Liz", "Swifty", 34),
("Liz", "Mooray", 25)
)
_ <- Person.firstName.age(countDistinct).get.map(_ ==> List(
("Ben", 1),
("Liz", 2) // 34, 25
))
} yield ()
Attributes
- Returns
-
Int
- Source
- Keywords.scala
- Graph
-
- Supertypes
- Known subtypes
-
object countDistinct
In this article