distinct

molecule.boilerplate.api.KeywordsStable.distinct
trait distinct extends AggrKw

Distinct attribute values.

Apply distinct keyword to attribute to return Vector 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(distinct) insert List(
   ("Ben", 42),
   ("Liz", Vector(34, 25)) // only single 34 returned
 )
} yield ()

Attributes

Returns

List[attribute-type]

Source
Keywords.scala
Graph
Supertypes
trait AggrKw
trait Kw
class Object
trait Matchable
class Any
Known subtypes
object distinct.type
In this article