Packages

c

molecule.core.api.Molecule_2

Molecule_2_21

abstract class Molecule_2_21[Obj, I1, I2, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U] extends Molecule_2[Obj, I1, I2]

Source
Molecule_2.scala
Linear Supertypes
Molecule_2[Obj, I1, I2], InputMolecule, Molecule, AnyRef, Any
Ordering
  1. Grouped
  2. Alphabetic
  3. By Inheritance
Inherited
  1. Molecule_2_21
  2. Molecule_2
  3. InputMolecule
  4. Molecule
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Molecule_2_21(model: Model, queryData: (Query, String, Option[Throwable]))

Abstract Value Members

  1. abstract val isJsPlatform: Boolean
    Definition Classes
    InputMolecule
  2. abstract def outMoleculeSeqs(args: Either[Throwable, (Seq[I1], Seq[I2])])(implicit conn: Future[Conn]): Molecule_0_21[Obj, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U]
    Attributes
    protected
  3. abstract def outMoleculeValues(args: Either[Throwable, Seq[(I1, I2)]])(implicit conn: Future[Conn]): Molecule_0_21[Obj, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U]
    Attributes
    protected

Concrete 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. def _datalog: String

    Datalog query.

    Datalog query.

    Molecule transforms custom boilerplate DSL constructs to Datomic queries in 3 steps:

    Custom DSL molecule --> Model --> Query --> Datalog query

    Definition Classes
    InputMolecule → Molecule
  5. def _inputThrowable: Option[Throwable]
    Definition Classes
    InputMolecule → Molecule
  6. def _model: Model

    Internal Model representation of a molecule.

    Internal Model representation of a molecule.

    Molecule transforms custom boilerplate DSL constructs to Datomic queries in 3 steps:

    Custom DSL molecule --> Model --> Query --> Datalog query

    Definition Classes
    InputMolecule → Molecule
  7. def _query: Query

    Internal Query representation of molecule.

    Internal Query representation of molecule.

    Molecule transforms custom boilerplate DSL constructs to Datomic queries in 3 steps:

    Custom DSL molecule --> Model --> Query --> Datalog query

    Definition Classes
    InputMolecule → Molecule
  8. def addNilClause(clauses: Seq[Clause], e: Var, kw: KW, v0: Var): Seq[Clause]
    Attributes
    protected
    Definition Classes
    InputMolecule
  9. def apply(in1: Seq[I1], in2: Seq[I2])(implicit conn: Future[Conn]): Molecule_0_21[Obj, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U]

    Resolve input molecule by applying 2 Seq of values, one for each input attribute

    Resolve input molecule by applying 2 Seq of values, one for each input attribute

    // Input molecule awaiting 2 inputs for profession and age
    val profAge = m(Person.name.profession_(?).age_(?))
    for {
      // Sample data set
      Person.name.profession.age insert List(
        ("Ann", "doctor", 37),
        ("Ben", "teacher", 37),
        ("Joe", "teacher", 32),
        ("Liz", "teacher", 28)
      )
    
      // Apply 2 Seq of values, each matching one of the input attributes
      _ <- profAge(Seq("doctor"), Seq(37)).get.map(_ ==> List("Ann"))
      _ <- profAge(Seq("doctor", "teacher"), Seq(37, 32)).get.map(_.sorted ==> List("Ann", "Ben", "Joe"))
    
      // Number of arguments in each Seq don't have to match but can be asymmetric
      _ <- profAge(Seq("doctor", "teacher"), Seq(37)).get.map(_.sorted ==> List("Ann", "Ben"))
      _ <- profAge(Seq("teacher"), Seq(37, 32)).get.map(_.sorted ==> List("Ben", "Joe"))
    } yield ()
    in1

    Seq of values matching first input attribute (professions: Seq[String])

    in2

    Seq of values matching second input attribute (ages: Seq[Int])

    conn

    Implicit Conn in scope

    returns

    Resolved molecule that can be queried

    Definition Classes
    Molecule_2_21Molecule_2
  10. def apply(and: And2[I1, I2])(implicit conn: Future[Conn]): Molecule_0_21[Obj, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U]

    Resolve input molecule by applying 2 expressions, one for each input attribute

    Resolve input molecule by applying 2 expressions, one for each input attribute

    // Input molecule awaiting 2 inputs for `profession` and `age`
    val profAge = m(Person.name.profession_(?).age_(?))
    for {
      // Sample data set
      Person.name.profession.age insert List(
        ("Ann", "doctor", 37),
        ("Ben", "teacher", 37),
        ("Joe", "teacher", 32),
        ("Liz", "teacher", 28)
      )
    
      // Apply 2 expressions, one for each input attribute
      // [profession-expression] and [age-expression]
      _ <- profAge("doctor" and 37).get.map(_ ==> List("Ann"))
      _ <- profAge(("doctor" or "teacher") and 37).get.map(_.sorted ==> List("Ann", "Ben"))
      _ <- profAge(("doctor" or "teacher") and (32 or 28)).get.map(_.sorted ==> List("Joe", "Liz"))
    } yield ()
    and

    First input expr and second input expr

    conn

    Implicit Conn in scope

    returns

    Resolved molecule that can be queried

    Definition Classes
    Molecule_2_21Molecule_2
  11. def apply(ins: Seq[(I1, I2)])(implicit conn: Future[Conn]): Molecule_0_21[Obj, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U]

    Resolve input molecule by applying Seq of value pairs

    Resolve input molecule by applying Seq of value pairs

    // Input molecule awaiting 2 inputs for `profession` and `age`
    val profAge = m(Person.name.profession_(?).age_(?))
    for {
      // Sample data set
      Person.name.profession.age insert List(
        ("Ann", "doctor", 37),
        ("Ben", "teacher", 37),
        ("Joe", "teacher", 32),
        ("Liz", "teacher", 28)
      )
    
      // Apply Seq of one or more value pairs, each matching both input attributes
      _ <- profAge(Seq(("doctor", 37))).get.map(_ ==> List("Ann"))
      _ <- profAge(Seq(("doctor", 37), ("teacher", 37))).get.map(_.sorted ==> List("Ann", "Ben"))
    } yield ()
    ins

    Seq of value pairs, each matching both input attributes

    conn

    Implicit Conn in scope

    returns

    Resolved molecule that can be queried

    Definition Classes
    Molecule_2_21Molecule_2
  12. def apply(or: Or2[I1, I2])(implicit conn: Future[Conn]): Molecule_0_21[Obj, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U]

    Resolve input molecule by applying one or more pairs of expressions, each matching both input attributes

    Resolve input molecule by applying one or more pairs of expressions, each matching both input attributes

    // Input molecule awaiting 2 inputs for `profession` and `age`
    val profAge = m(Person.name.profession_(?).age_(?))
    for {
      // Sample data set
      Person.name.profession.age insert List(
        ("Ann", "doctor", 37),
        ("Ben", "teacher", 37),
        ("Joe", "teacher", 32),
        ("Liz", "teacher", 28)
      )
    
      // Apply two or more pair expressions, each matching both input attributes
      // [profession/age-expression] or [profession/age-expression] or ...
      _ <- profAge("doctor" and 37).get.map(_.sorted ==> List("Ann"))
      _ <- profAge(("doctor" and 37) or ("teacher" and 32)).get.map(_.sorted ==> List("Ann", "Joe"))
    } yield ()
    or

    Two or more pair-wise expressions separated by or

    conn

    Implicit Conn in scope

    returns

    Resolved molecule that can be queried

    Definition Classes
    Molecule_2_21Molecule_2
  13. def apply(tpl: (I1, I2), tpls: (I1, I2)*)(implicit conn: Future[Conn]): Molecule_0_21[Obj, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U]

    Resolve input molecule by applying one or more value pairs

    Resolve input molecule by applying one or more value pairs

    // Input molecule awaiting 2 inputs for `profession` and `age`
    val profAge = m(Person.name.profession_(?).age_(?))
    for {
      // Sample data set
      Person.name.profession.age insert List(
        ("Ann", "doctor", 37),
        ("Ben", "teacher", 37),
        ("Joe", "teacher", 32),
        ("Liz", "teacher", 28)
      )
    
      // Apply one or more value pairs, each matching both input attributes
      _ <- profAge(("doctor", 37)).get.map(_ ==> List("Ann"))
      _ <- profAge(("doctor", 37), ("teacher", 37)).get.map(_.sorted ==> List("Ann", "Ben"))
    } yield ()
    tpl

    First pair of values matching both input attributes

    tpls

    Optional more pairs of values matching both input attributes

    conn

    Implicit Conn in scope

    returns

    Resolved molecule that can be queried

    Definition Classes
    Molecule_2_21Molecule_2
  14. def apply(i1: I1, i2: I2)(implicit conn: Future[Conn]): Molecule_0_21[Obj, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U]

    Resolve input molecule by applying 2 input values as individual args

    Resolve input molecule by applying 2 input values as individual args

    // Input molecule awaiting 2 inputs for `profession` and `age`
    val profAge = m(Person.name.profession_(?).age_(?))
    for {
      // Sample data set
      Person.name.profession.age insert List(
        ("Ann", "doctor", 37),
        ("Ben", "teacher", 37),
        ("Joe", "teacher", 32),
        ("Liz", "teacher", 28)
      )
    
      // Apply 2 input values
      _ <- profAge("doctor", 37).get.map(_ ==> List("Ann"))
    } yield ()
    i1

    Input value matching first input attribute (profession: String)

    i2

    Input value matching second input attribute (age: Int)

    conn

    Implicit Conn in scope

    returns

    Resolved molecule that can be queried

    Definition Classes
    Molecule_2_21Molecule_2
  15. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  16. def bindSeqs(query: Query, inputRaw1: Seq[I1], inputRaw2: Seq[I2]): Either[Throwable, Query]
    Attributes
    protected
    Definition Classes
    Molecule_2
  17. def bindValues(query: Query, inputTuples: Seq[(I1, I2)]): Either[Throwable, Query]
    Attributes
    protected
    Definition Classes
    Molecule_2
  18. def cardinality(nsFull: String, attr: String): Int
    Attributes
    protected
    Definition Classes
    InputMolecule
  19. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  20. def dataClause(e: String, kw: KW, enumPrefix: Option[String], arg: Any, i: Int): Seq[Clause]
    Attributes
    protected
    Definition Classes
    InputMolecule
  21. def deepNil(args: Seq[Any]): Boolean
    Attributes
    protected
    Definition Classes
    InputMolecule
  22. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  23. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  24. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  25. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  26. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  27. def isExpression(nsFull: String, attr: String): Boolean
    Attributes
    protected
    Definition Classes
    InputMolecule
  28. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  29. def isTacit(nsFull: String, attr: String): Boolean
    Attributes
    protected
    Definition Classes
    InputMolecule
  30. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  31. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  32. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  33. def resolveAnd2(and2: And2[I1, I2]): Either[Throwable, (Seq[I1], Seq[I2])]
    Attributes
    protected
    Definition Classes
    Molecule_2
  34. def resolveInput(query: Query, ph: Placeholder, inputs: Seq[Any], ruleName: String = "rule1", unifyRule: Boolean = false): Query
    Attributes
    protected
    Definition Classes
    InputMolecule
  35. def resolveOr[I1](or: Or[I1]): Either[Throwable, Seq[I1]]
    Attributes
    protected
    Definition Classes
    InputMolecule
  36. def resolveOr2(or: Or2[I1, I2]): Either[Throwable, Seq[(I1, I2)]]
    Attributes
    protected
    Definition Classes
    Molecule_2
  37. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  38. def toString(): String
    Definition Classes
    AnyRef → Any
  39. def valueClauses[TT](e: String, kw: KW, enumPrefix: Option[String], tpe: String, args: TT): Seq[Clause]
    Attributes
    protected
    Definition Classes
    InputMolecule
  40. def varsAndPrefixes(query: Query): Seq[(Var, String)]
    Attributes
    protected
    Definition Classes
    InputMolecule
  41. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  42. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  43. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from Molecule_2[Obj, I1, I2]

Inherited from InputMolecule

Inherited from Molecule

Inherited from AnyRef

Inherited from Any

internal

Ungrouped