max

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

Maximum attribute value(s).

Apply max keyword to attribute to return the maximum attribute value of entities matching the molecule.

for {
 _ <- Person.age.insert(25, 34, 37, 42, 70)
 _ <- Person.age(max).get.map(_.head ==> 70)
} yield ()

Apply max(n) to return Vector of the n biggest values.

Person.age(max(3)).get.map(_.head ==> Vector(37, 42, 70))

Attributes

Note

max/max(n) supports all value types (via comparators).
max(n) Can at most return the number of values that match.

Source
Keywords.scala
Graph
Supertypes
trait AggrKw
trait Kw
class Object
trait Matchable
class Any
Known subtypes
object max.type

Members list

Value members

Concrete methods

def apply(i: Int): maxs

Maximum n values of attribute.

Apply max(n) to attribute to return Vector of the n biggest values of entities matching the molecule.

Maximum n values of attribute.

Apply max(n) to attribute to return Vector of the n biggest values of entities matching the molecule.

for {
 _ <- Person.age.insert(25, 34, 37, 42, 70)
 _ <- Person.age(max(3)).get.map(_.head ==> List(37, 42, 70))
} yield ()

Attributes

Returns

List[attribute-type]

Note

max/max(n) supports all value types (via comparators).
Can at most return the number of values that match.

Source
Keywords.scala