Packages

object Keywords extends KeywordsStable

Ordering
  1. Grouped
  2. Alphabetic
  3. By Inheritance
Inherited
  1. Keywords
  2. KeywordsStable
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. trait AggrCoalesce extends AggrKw
    Definition Classes
    KeywordsStable
  2. trait AggrInt extends AggrKw
    Definition Classes
    KeywordsStable
  3. trait AggrKw extends Kw
    Definition Classes
    KeywordsStable
  4. trait Kw extends AnyRef
    Definition Classes
    KeywordsStable
  5. trait avg extends AggrCoalesce

    Average of attribute values.

    Average of attribute values.

    Apply avg keyword to attribute to return average of attribute values of entities matching the molecule.

    for {
      _ <- Match.sKeywords.insert(1, 2, 4)
      _ <- Match.score(avg).get.map(_.head ==> 2.3333333333333335) // (1 + 2 + 4) / 3
    } yield ()
    returns

    Double

    Definition Classes
    KeywordsStable
  6. trait bi extends AnyRef
    Definition Classes
    KeywordsStable
  7. trait count extends AggrCoalesce with AggrInt

    Count of attribute values.

    Count of attribute values.

    Apply count keyword to attribute to return count of attribute values of entities matching the molecule.

    for {
      _ <- Person.firstName.lastName.age insert List(
        ("Ben", "Hayday", 42),
        ("Liz", "Taylor", 34),
        ("Liz", "Swifty", 34),
        ("Liz", "Mooray", 25)
      )
      _ <- Person.firstName.age(count).get.map(_ ==> List(
        ("Ben", 1),
        ("Liz", 3) // 34, 34, 25
      ))
    } yield ()
    returns

    Int

    Definition Classes
    KeywordsStable
  8. trait countDistinct extends AggrCoalesce

    Count of distinct attribute values.

    Count of distinct attribute values.

    Apply countDistinct keyword to attribute to return count of distinct attribute values of entities matching the molecule.

    for {
      _ <- Person.firstName.lastName.age insert List(
        ("Ben", "Hayday", 42),
        ("Liz", "Taylor", 34),
        ("Liz", "Swifty", 34),
        ("Liz", "Mooray", 25)
      )
      _ <- Person.firstName.age(countDistinct).get.map(_ ==> List(
        ("Ben", 1),
        ("Liz", 2) // 34, 25
      ))
    } yield ()
    returns

    Int

    Definition Classes
    KeywordsStable
  9. trait distinct extends AggrKw

    Distinct attribute values.

    Distinct attribute values.

    Apply distinct keyword to attribute to return Vector of distinct attribute values of entities matching the molecule.

    for {
      _ <- 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
      )
    } yield ()
    returns

    List[attribute-type]

    Definition Classes
    KeywordsStable
  10. trait max extends AggrKw

    Maximum attribute value(s).

    Maximum attribute value(s).

    Apply max keyword to attribute to return the maximum attribute value of entities matching the molecule.

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

    Apply max(n) to return Vector of the n biggest values.

    Person.age(max(3)).get.map(_.head ==> Vector(37, 42, 70))
    Definition Classes
    KeywordsStable
    Note

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

  11. case class maxs(n: Int) extends Kw with Product with Serializable
    Definition Classes
    KeywordsStable
  12. trait median extends AggrCoalesce

    Median of attribute values.

    Median of attribute values.

    Apply median keyword to attribute to return median of attribute values of entities matching the molecule.

    for {
      _ <- Match.sKeywords.insert(1, 2, 4)
      _ <- Match.score(median).get.map(_.head ==> 2)
    } yield ()

    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 number

    for {
      _ <- Match.sKeywords.insert(1, 2, 3, 4)
      _ <- Match.score(median).get.map(_.head ==> 2) // (2 + 3) / 2 = 2.5 rounded down to 2
    } yield ()

    With decimal numbers this can go wrong:

    for {
      _ <- Match.sKeywords.insert(1.0, 2.5, 2.5, 3.0)
      _ <- Match.score(median).get.map(_.head ==> 2) // (2.5 + 2.5) / 2 = 2.5 rounded down to 2 (This is wrong and bug report has been filed)
    } yield ()
    returns

    Value of Attribute type

    Definition Classes
    KeywordsStable
  13. trait min extends AggrKw

    Minimum attribute value(s).

    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))
    Definition Classes
    KeywordsStable
    Note

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

  14. case class mins(n: Int) extends Kw with Product with Serializable
    Definition Classes
    KeywordsStable
  15. trait sample extends AggrKw

    Sample attribute value(s).

    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..
    Definition Classes
    KeywordsStable
    Note

    Can at most return the number of values that match.

  16. case class samples(n: Int) extends Kw with Product with Serializable
    Definition Classes
    KeywordsStable
  17. trait stddev extends AggrCoalesce

    Variance of attribute values.

    Variance of attribute values.

    Apply stddev keyword to attribute to return variance of attribute values of entities matching the molecule.

    for {
      _ <- Match.sKeywords.insert(1, 2, 4)
      _ <- Match.score(stddev).get.map(_.head ==> 1.247219128924647)
    } yield ()
    returns

    Double

    Definition Classes
    KeywordsStable
  18. trait sum extends AggrCoalesce

    Sum of attribute values.

    Sum of attribute values.

    Apply sum keyword to attribute to return sum of attribute values of entities matching the molecule.

    for {
      _ <- Match.sKeywords.insert(1, 2, 4)
      _ <- Match.score(sum).get.map(_.head ==> 7)
    } yield ()
    returns

    Value of Attribute type

    Definition Classes
    KeywordsStable
  19. trait unify extends Kw

    Unify attribute value in self-join.

    Unify attribute value in self-join.

    Apply unify marker to attribute to unify its value with previous values of the same attribute in the molecule in a self-join.

    for {
      _ <- m(Person.age.name.Beverages * Beverage.name.rating) insert List(
        (23, "Joe", List(("Coffee", 3), ("Cola", 2), ("Pepsi", 3))),
        (25, "Ben", List(("Coffee", 2), ("Tea", 3))),
        (23, "Liz", List(("Coffee", 1), ("Tea", 3), ("Pepsi", 1))))
    
      // What beverages do pairs of 23- AND 25-year-olds like in common?
      // Drink name is unified - Joe and Ben both drink coffee, etc..
      _ <- Person.age_(23).name.Beverages.name._Ns.Self
          .age_(25).name.Beverages.name_(unify).get.map(_.sorted ==> List(
        ("Joe", "Coffee", "Ben"),
        ("Liz", "Coffee", "Ben"),
        ("Liz", "Tea", "Ben")
      ))
    } yield ()
    Definition Classes
    KeywordsStable
  20. trait v1 extends Kw
    Definition Classes
    KeywordsStable
  21. trait variance extends AggrCoalesce

    Variance of attribute values.

    Variance of attribute values.

    Apply variance keyword to attribute to return variance of attribute values of entities matching the molecule.

    for {
      _ <- Match.sKeywords.insert(1, 2, 4)
      _ <- Match.score(variance).get.map(_.head ==> 1.5555555555555556)
    } yield ()
    returns

    Double

    Definition Classes
    KeywordsStable

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @IntrinsicCandidate()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  9. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  10. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  11. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  13. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  14. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  15. def toString(): String
    Definition Classes
    AnyRef → Any
  16. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  17. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  18. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated
    Deprecated

Inherited from KeywordsStable

Inherited from AnyRef

Inherited from Any

attrMarker

Aggregate keywords

Keywords applied to attributes that return aggregated value(s).

Number aggregation keywords

Keywords applied to number attributes that return aggregated value(s).

Ungrouped