abstract class InputMolecule_3_13[I1, I2, I3, A, B, C, D, E, F, G, H, I, J, K, L, M] extends InputMolecule_3[I1, I2, I3]
- Grouped
- Alphabetic
- By Inheritance
- InputMolecule_3_13
- InputMolecule_3
- InputMolecule
- MoleculeBase
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
internal
- val _model: Model
Internal Model representation of molecule.
Internal Model representation of molecule.
Molecule transforms custom boilerplate DSL constructs to Datomic queries in 3 steps:
Custom DSL molecule --> Model --> Query --> Datomic query string- Definition Classes
- InputMolecule_3_13 → MoleculeBase
- val _nestedQuery: Option[Query]
Internal optional Query representation of nested molecule with added entity search for each level.
Internal optional Query representation of nested molecule with added entity search for each level.
Molecule transforms custom boilerplate DSL constructs to Datomic queries in 3 steps:
Custom DSL molecule --> Model --> Query --> Datomic query string- Definition Classes
- InputMolecule_3_13 → MoleculeBase
- val _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 --> Datomic query string- Definition Classes
- InputMolecule_3_13 → MoleculeBase
- val _rawNestedQuery: Option[Query]
Internal un-optimized optional Query representation of nested molecule with added entity search for each level.
Internal un-optimized optional Query representation of nested molecule with added entity search for each level.
Molecule transforms custom boilerplate DSL constructs to Datomic queries in 3 steps:
Custom DSL molecule --> Model --> Query --> Datomic query string- Definition Classes
- InputMolecule_3_13 → MoleculeBase
- val _rawQuery: Query
Internal un-optimized Query representation molecule.
Internal un-optimized Query representation molecule.
Molecule transforms custom boilerplate DSL constructs to Datomic queries in 3 steps:
Custom DSL molecule --> Model --> Query --> Datomic query string- Definition Classes
- InputMolecule_3_13 → MoleculeBase
Ungrouped
- abstract def apply(in1: Seq[I1], in2: Seq[I2], in3: Seq[I3])(implicit conn: Conn): Molecule13[A, B, C, D, E, F, G, H, I, J, K, L, M]
Resolve input molecule by applying 3 groups of values, one for each of the 3 input attributes
Resolve input molecule by applying 3 groups of values, one for each of the 3 input attributes
// Sample data set Person.name.profession.age.score insert List( ("Ann", "doctor", 37, 1.0), ("Ben", "teacher", 37, 1.0), ("Joe", "teacher", 32, 1.0), ("Liz", "teacher", 28, 2.0) ) // Input molecule awaiting 3 inputs for `profession`, `age` and `score` val profAgeScore = m(Person.name.profession_(?).age_(?).score_(?)) // Apply 3 Seq of values, each matching one of the input attributes proOfAge(Seq("doctor"), Seq(37)).get === List("Ann") proOfAge(Seq("doctor", "teacher"), Seq(37, 32)).get.sorted === List("Ann", "Ben", "Joe") // Number of arguments in each Seq don't have to match but can be asymmetric profAgeScore.apply(Seq("doctor"), Seq(37), Seq(1.0)).get === List("Ann") profAgeScore.apply(Seq("doctor", "teacher"), Seq(37), Seq(1.0)).get.sorted === List("Ann", "Ben")
- in1
Seq of values matching first input attribute (professions: Seq[String])
- in2
Seq of values matching second input attribute (ages: Seq[Int])
- in3
Seq of values matching third input attribute (scores: Seq[Double])
- conn
Implicit Conn in scope
- returns
Resolved molecule that can be queried
- Definition Classes
- InputMolecule_3_13 → InputMolecule_3
- abstract def apply(ins: Seq[(I1, I2, I3)])(implicit conn: Conn): Molecule13[A, B, C, D, E, F, G, H, I, J, K, L, M]
Resolve input molecule by applying Seq of value triples
Resolve input molecule by applying Seq of value triples
// Sample data set Person.name.profession.age.score insert List( ("Ann", "doctor", 37, 1.0), ("Ben", "teacher", 37, 1.0), ("Joe", "teacher", 32, 1.0), ("Liz", "teacher", 28, 2.0) ) // Input molecule awaiting 3 inputs for `profession`, `age` and `score` val profAgeScore = m(Person.name.profession_(?).age_(?).score_(?)) // Apply Seq of one or more value triples, each matching all 3 input attributes profAgeScore.apply(Seq(("doctor", 37, 1.0))).get === List("Ann") profAgeScore.apply(Seq(("doctor", 37, 1.0), ("teacher", 37, 1.0))).get.sorted === List("Ann", "Ben")
- ins
Seq of value triples, each matching the 3 input attributes
- conn
Implicit Conn in scope
- returns
Resolved molecule that can be queried
- Definition Classes
- InputMolecule_3_13 → InputMolecule_3
- def apply(and: And3[I1, I2, I3])(implicit conn: Conn): Molecule13[A, B, C, D, E, F, G, H, I, J, K, L, M]
Resolve input molecule by applying 3 groups of expressions, one for each of the 3 input attributes
Resolve input molecule by applying 3 groups of expressions, one for each of the 3 input attributes
// Sample data set Person.name.profession.age.score insert List( ("Ann", "doctor", 37, 1.0), ("Ben", "teacher", 37, 1.0), ("Joe", "teacher", 32, 1.0), ("Liz", "teacher", 28, 2.0) ) // Input molecule awaiting 3 inputs for `profession`, `age` and `score` val profAgeScore = m(Person.name.profession_(?).age_(?).score_(?)) // Apply 3 expressions, one for each input attribute // [profession-expression] and [age-expression] and [score-expression] profAgeScore.apply("doctor" and 37 and 1.0).get === List("Ann") profAgeScore.apply(("doctor" or "teacher") and 37 and 1.0).get.sorted === List("Ann", "Ben") profAgeScore.apply(("doctor" or "teacher") and (37 or 32) and 1.0).get.sorted === List("Ann", "Ben", "Joe") profAgeScore.apply(("doctor" or "teacher") and (37 or 32) and (1.0 or 2.0)).get.sorted === List("Ann", "Ben", "Joe")
- and
First input expr
and
second input exprand
third input expr- conn
Implicit Conn in scope
- returns
Resolved molecule that can be queried
- Definition Classes
- InputMolecule_3_13 → InputMolecule_3
- def apply(or: Or3[I1, I2, I3])(implicit conn: Conn): Molecule13[A, B, C, D, E, F, G, H, I, J, K, L, M]
Resolve input molecule by applying one or more triples of expressions, each matching the 3 input attributes
Resolve input molecule by applying one or more triples of expressions, each matching the 3 input attributes
// Sample data set Person.name.profession.age.score insert List( ("Ann", "doctor", 37, 1.0), ("Ben", "teacher", 37, 1.0), ("Joe", "teacher", 32, 1.0), ("Liz", "teacher", 28, 2.0) ) // Input molecule awaiting 3 inputs for `profession`, `age` and `score` val profAgeScore = m(Person.name.profession_(?).age_(?).score_(?)) // Apply two or more triple expressions, each matching all 3 input attributes // [profession/age/score-expression] or [profession/age/score-expression] or ... profAgeScore.apply(("doctor" and 37 and 1.0) or ("teacher" and 32 and 1.0)).get.sorted === List("Ann", "Joe")
- or
Two or more tuple3 expressions separated by
or
- conn
Implicit Conn in scope
- returns
Resolved molecule that can be queried
- Definition Classes
- InputMolecule_3_13 → InputMolecule_3
- def apply(tpl: (I1, I2, I3), tpls: (I1, I2, I3)*)(implicit conn: Conn): Molecule13[A, B, C, D, E, F, G, H, I, J, K, L, M]
Resolve input molecule by applying one or more value triples
Resolve input molecule by applying one or more value triples
// Sample data set Person.name.profession.age.score insert List( ("Ann", "doctor", 37, 1.0), ("Ben", "teacher", 37, 1.0), ("Joe", "teacher", 32, 1.0), ("Liz", "teacher", 28, 2.0) ) // Input molecule awaiting 3 inputs for `profession`, `age` and `score` val profAgeScore = m(Person.name.profession_(?).age_(?).score_(?)) // Apply one or more value triples, each matching all 3 input attributes profAgeScore.apply(("doctor", 37, 1.0)).get === List("Ann") profAgeScore.apply(("doctor", 37, 1.0), ("teacher", 37, 1.0)).get.sorted === List("Ann", "Ben")
- tpl
First triple of values matching the 3 input attributes
- tpls
Optional more triples of values matching both input attributes
- conn
Implicit Conn in scope
- returns
Resolved molecule that can be queried
- Definition Classes
- InputMolecule_3_13 → InputMolecule_3
- def apply(i1: I1, i2: I2, i3: I3)(implicit conn: Conn): Molecule13[A, B, C, D, E, F, G, H, I, J, K, L, M]
Resolve input molecule by applying 3 input values as individual args
Resolve input molecule by applying 3 input values as individual args
// Sample data set Person.name.profession.age.score insert List( ("Ann", "doctor", 37, 1.0), ("Ben", "teacher", 37, 1.0), ("Joe", "teacher", 32, 1.0), ("Liz", "teacher", 28, 2.0) ) // Input molecule awaiting 3 inputs for `profession`, `age` and `score` val profAgeScore = m(Person.name.profession_(?).age_(?).score_(?)) // Apply 3 input values (1 triple) profAgeScore.apply("doctor", 37, 1.0).get === List("Ann")
- i1
Input value matching first input attribute (profession: String)
- i2
Input value matching second input attribute (age: Int)
- i3
Input value matching third input attribute (score: Double)
- conn
Implicit Conn in scope
- returns
Resolved molecule that can be queried
- Definition Classes
- InputMolecule_3_13 → InputMolecule_3
Documentation/API for the Molecule library - a meta DSL for the Datomic database.
Manual | scalamolecule.org | Github | Forum