min

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

Minimum attribute value(s).

Apply min keyword to attribute to return the minimum attribute value of entities matching the molecule.

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

Apply min(n) to return Vector of the n smallest values.

Person.age(min(3)).get.map(_.head ==> Vector(25, 34, 37))

Attributes

Note

min/min(n) supports all value types (via comparators).
min(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 min.type

Members list

Value members

Concrete methods

def apply(i: Int): mins

Minimum n values of attribute.

Apply min(n) to attribute to return Vector of the n smallest values of entities matching the molecule.

Minimum n values of attribute.

Apply min(n) to attribute to return Vector of the n smallest values of entities matching the molecule.

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

Attributes

Returns

List[attribute-type]

Note

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

Source
Keywords.scala