sample
molecule.boilerplate.api.KeywordsStable.sample
Sample attribute value(s).
Apply sample
keyword to attribute to return a single sample (random) attribute value of entities matching the molecule.
for {
_ <- Person.age.insert(25, 34, 37, 42, 70)
_ <- Person.age(sample).get.map(_.head ==> 42) // or other..
} yield ()
Apply sample(n)
to return Vector of up to n distinct sample values.
Person.age(sample(3)).get.map(_.head ==> Vector(70, 25, 37)) // or other..
Attributes
- Note
-
Can at most return the number of values that match.
- Source
- Keywords.scala
- Graph
-
- Supertypes
- Known subtypes
-
object sample.type
Members list
In this article