rand

molecule.boilerplate.api.Keywords.rand
object rand extends rand

Attributes

Source
Keywords.scala
Graph
Supertypes
trait rand
trait AggrKw
trait Kw
class Object
trait Matchable
class Any
Show all
Self type
rand.type

Members list

Grouped members

aggregates

def apply(n: Int): rands

Random values of attribute.

Apply a number n to random to return Stream of n random attribute values of from entities matching the molecule.
Observe that duplicate random values can re-occur.

Random values of attribute.

Apply a number n to random to return Stream of n random attribute values of from entities matching the molecule.
Observe that duplicate random values can re-occur.

for {
 _ <- Person.age.insert(25, 34, 37, 42, 70)
 _ <- Person.age(random(3)).get.map(_.head ==> Stream(42, 25, 42)) // or other..
} yield ()

To get distinct values only, use the sample(n) keyword instead.

Attributes

Returns

List[attribute-type]

Inherited from:
rand
Source
Keywords.scala

Value members

Concrete methods

override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Any
Source
Keywords.scala