object AggregateKeywordsSchema extends AggregateKeywords
Apply methods of arity 1-22 taking aggregate keywords.
- Grouped
- Alphabetic
- By Inheritance
- AggregateKeywordsSchema
- AggregateKeywords
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
trait
avg extends AnyRef
Average of attribute values.
Average of attribute values.
Applyavg
keyword to attribute to return average of attribute values of entities matching the molecule.Match.score.insert(1, 2, 4) Match.score(avg).get.head === 2.3333333333333335 // (1 + 2 + 4) / 3
- returns
Double
- Definition Classes
- AggregateKeywords
-
trait
count extends AnyRef
Count of attribute values.
Count of attribute values.
Applycount
keyword to attribute to return count of attribute values of entities matching the molecule.Person.firstName.lastName.age insert List( ("Ben", "Hayday", 42), ("Liz", "Taylor", 34), ("Liz", "Swifty", 34), ("Liz", "Mooray", 25) ) Person.firstName.age(count).get === List( ("Ben", 1), ("Liz", 3) // 34, 34, 25 )
- returns
Int
- Definition Classes
- AggregateKeywords
-
trait
countDistinct extends AnyRef
Count of distinct attribute values.
Count of distinct attribute values.
ApplycountDistinct
keyword to attribute to return count of distinct attribute values of entities matching the molecule.Person.firstName.lastName.age insert List( ("Ben", "Hayday", 42), ("Liz", "Taylor", 34), ("Liz", "Swifty", 34), ("Liz", "Mooray", 25) ) Person.firstName.age(countDistinct).get === List( ("Ben", 1), ("Liz", 2) // 34, 25 )
- returns
Int
- Definition Classes
- AggregateKeywords
-
trait
distinct extends AnyRef
Distinct attribute values.
Distinct attribute values.
Applydistinct
keyword to attribute to return Vector of distinct attribute values of entities matching the molecule.Person.firstName.lastName.age insert List( ("Ben", "Hayday", 42), ("Liz", "Taylor", 34), ("Liz", "Swifty", 34), ("Liz", "Mooray", 25) ) Person.firstName.age(distinct) insert List( ("Ben", 42), ("Liz", Vector(34, 25)) // only single 34 returned )
- returns
List[attribute-type]
- Definition Classes
- AggregateKeywords
-
trait
max extends AnyRef
Maximum attribute value(s).
Maximum attribute value(s).
Applymax
keyword to attribute to return the maximum attribute value of entities matching the molecule.Person.age.insert(25, 34, 37, 42, 70) Person.age(max).get.head === 70
Apply
max(n)
to return Vector of the n biggest values.Person.age(max(3)).get.head === Vector(37, 42, 70)
- Definition Classes
- AggregateKeywords
- Note
max
/max(n)
supports all value types (via comparators).max(n)
Can at most return the number of values that match.
-
trait
maxs extends AnyRef
- Definition Classes
- AggregateKeywords
-
trait
median extends AnyRef
Median of attribute values.
Median of attribute values.
Applymedian
keyword to attribute to return median of attribute values of entities matching the molecule.Match.score.insert(1, 2, 4) Match.score(median).get.head === 2
OBS: When it comes to an even number of values, Datomic has a special implementation of median that is different from the one described on the Wiki entry on the median function.
Datomic calculates the median of even number of values as the average of the two middle numbers rounded down to nearest whole numberMatch.score.insert(1, 2, 3, 4) Match.score(median).get.head === 2 // (2 + 3) / 2 = 2.5 rounded down to 2
With decimal numbers this can go wrong:
Match.score.insert(1.0, 2.5, 2.5, 3.0) Match.score(median).get.head === 2 // (2.5 + 2.5) / 2 = 2.5 rounded down to 2 (This is wrong and bug report has been filed)
- returns
Value of Attribute type
- Definition Classes
- AggregateKeywords
-
trait
min extends AnyRef
Minimum attribute value(s).
Minimum attribute value(s).
Applymin
keyword to attribute to return the minimum attribute value of entities matching the molecule.Person.age.insert(25, 34, 37, 42, 70) Person.age(min).get.head === 25
Apply
min(n)
to return Vector of the n smallest values.Person.age(min(3)).get.head === Vector(25, 34, 37)
- Definition Classes
- AggregateKeywords
- Note
min
/min(n)
supports all value types (via comparators).min(n)
Can at most return the number of values that match.
-
trait
mins extends AnyRef
- Definition Classes
- AggregateKeywords
-
trait
rand extends AnyRef
Random attribute value(s).
Random attribute value(s).
Applyrandom
keyword to attribute to return a single random attribute of entities matching the molecule.Person.age.insert(25, 34, 37, 42, 70) Person.age(random).get.head === 34 // or other..
Apply
random(n)
to return Vector of n random values. Observe though that duplicate random values can re-occur.Person.age(random(3)).get.head === Vector(42, 25, 42) // or other..
To get distinct values only, use the
sample(n)
keyword instead.- Definition Classes
- AggregateKeywords
-
trait
rands extends AnyRef
- Definition Classes
- AggregateKeywords
-
trait
sample extends AnyRef
Sample attribute value(s).
Sample attribute value(s).
Applysample
keyword to attribute to return a single sample (random) attribute value of entities matching the molecule.Person.age.insert(25, 34, 37, 42, 70) Person.age(sample).get.head === 42 // or other..
Apply
sample(n)
to return Vector of up to n distinct sample values.Person.age(sample(3)).get.head === Vector(70, 25, 37) // or other..
If values don't need to be distinct,
random(n)
can be used also.- Definition Classes
- AggregateKeywords
- Note
Can at most return the number of values that match.
-
trait
samples extends AnyRef
- Definition Classes
- AggregateKeywords
-
trait
stddev extends AnyRef
Variance of attribute values.
Variance of attribute values.
Applystddev
keyword to attribute to return variance of attribute values of entities matching the molecule.Match.score.insert(1, 2, 4) Match.score(stddev).get.head === 1.247219128924647
- returns
Double
- Definition Classes
- AggregateKeywords
-
trait
sum extends AnyRef
Sum of attribute values.
Sum of attribute values.
Applysum
keyword to attribute to return sum of attribute values of entities matching the molecule.Match.score.insert(1, 2, 4) Match.score(sum).get.head === 7
- returns
Value of Attribute type
- Definition Classes
- AggregateKeywords
-
trait
variance extends AnyRef
Variance of attribute values.
Variance of attribute values.
Applyvariance
keyword to attribute to return variance of attribute values of entities matching the molecule.Match.score.insert(1, 2, 4) Match.score(variance).get.head === 1.5555555555555556
- returns
Double
- Definition Classes
- AggregateKeywords
- trait AggregateSchema00[Ns0] extends AnyRef
- trait AggregateSchema01[Ns1[_], A] extends AnyRef
- trait AggregateSchema02[Ns2[_, _], A, B] extends AnyRef
- trait AggregateSchema03[Ns3[_, _, _], A, B, C] extends AnyRef
- trait AggregateSchema04[Ns4[_, _, _, _], A, B, C, D] extends AnyRef
- trait AggregateSchema05[Ns5[_, _, _, _, _], A, B, C, D, E] extends AnyRef
- trait AggregateSchema06[Ns6[_, _, _, _, _, _], A, B, C, D, E, F] extends AnyRef
- trait AggregateSchema07[Ns7[_, _, _, _, _, _, _], A, B, C, D, E, F, G] extends AnyRef
- trait AggregateSchema08[Ns8[_, _, _, _, _, _, _, _], A, B, C, D, E, F, G, H] extends AnyRef
- trait AggregateSchema09[Ns9[_, _, _, _, _, _, _, _, _], A, B, C, D, E, F, G, H, I] extends AnyRef
- trait AggregateSchema10[Ns10[_, _, _, _, _, _, _, _, _, _], A, B, C, D, E, F, G, H, I, J] extends AnyRef
- trait AggregateSchema11[Ns11[_, _, _, _, _, _, _, _, _, _, _], A, B, C, D, E, F, G, H, I, J, K] extends AnyRef
- trait AggregateSchema12[Ns12[_, _, _, _, _, _, _, _, _, _, _, _], A, B, C, D, E, F, G, H, I, J, K, L] extends AnyRef
- trait AggregateSchema13[Ns13[_, _, _, _, _, _, _, _, _, _, _, _, _], A, B, C, D, E, F, G, H, I, J, K, L, M] extends AnyRef
- trait AggregateSchema14[Ns14[_, _, _, _, _, _, _, _, _, _, _, _, _, _], A, B, C, D, E, F, G, H, I, J, K, L, M, N] extends AnyRef
- trait AggregateSchema15[Ns15[_, _, _, _, _, _, _, _, _, _, _, _, _, _, _], A, B, C, D, E, F, G, H, I, J, K, L, M, N, O] extends AnyRef
- trait AggregateSchema16[Ns16[_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _], A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P] extends AnyRef
- trait AggregateSchema17[Ns17[_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _], A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q] extends AnyRef
- trait AggregateSchema18[Ns18[_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _], A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R] extends AnyRef
- trait AggregateSchema19[Ns19[_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _], A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S] extends AnyRef
- trait AggregateSchema20[Ns20[_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _], A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T] extends AnyRef
- trait AggregateSchema21[Ns21[_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _], A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U] extends AnyRef
- trait AggregateSchema22[Ns22[_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _], A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V] extends AnyRef
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
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
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()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
Aggregate keywords
Keywords applied to attributes that return aggregated value(s).
Number aggregation keywords
Keywords applied to number attributes that return aggregated value(s).
Documentation/API for the Molecule library - a meta DSL for the Datomic database.
Manual | scalamolecule.org | Github | Forum