trait sample extends AggrKw
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..
If values don't need to be distinct, random(n) can be used also.
- Source
- Keywords.scala
- Note
Can at most return the number of values that match.
- Grouped
- Alphabetic
- By Inheritance
- sample
- AggrKw
- Kw
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
apply(n: Int): samples
Distinct sample values of attribute.
Distinct sample values of attribute.
Applysample(n)to an attribute to return a Vector of up to n distinct sample values (can at most return the number of values that match).for { _ <- Person.age.insert(25, 34, 37, 42, 70) _ <- Person.age(sample(3)).get.map(_.head ==> Vector(42, 25, 42)) // or other.. } yield ()
If values don't need to be distinct,
random(n)can be used also.- returns
List[attribute-type]
- Note
Can at most return the number of values that match.
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @IntrinsicCandidate()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated
- Deprecated
Aggregate keywords
Keywords applied to attributes that return aggregated value(s).