abstract class Molecule_3_05[Obj, I1, I2, I3, A, B, C, D, E] extends Molecule_3[Obj, I1, I2, I3]
- Grouped
- Alphabetic
- By Inheritance
- Molecule_3_05
- Molecule_3
- InputMolecule
- Molecule
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
Abstract Value Members
-
abstract
val
isJsPlatform: Boolean
- Definition Classes
- InputMolecule
-
abstract
def
outMoleculeSeqs(args: Either[Throwable, (Seq[I1], Seq[I2], Seq[I3])])(implicit conn: Future[Conn]): Molecule_0_05[Obj, A, B, C, D, E]
- Attributes
- protected
-
abstract
def
outMoleculeValues(args: Either[Throwable, Seq[(I1, I2, I3)]])(implicit conn: Future[Conn]): Molecule_0_05[Obj, A, B, C, D, E]
- Attributes
- protected
Concrete 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
_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
-
def
_inputThrowable: Option[Throwable]
- Definition Classes
- InputMolecule → Molecule
-
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
-
def
_query: Query
Internal Query representation of molecule.
-
def
addNilClause(clauses: Seq[Clause], e: Var, kw: KW, v0: Var): Seq[Clause]
- Attributes
- protected
- Definition Classes
- InputMolecule
-
def
apply(in1: Seq[I1], in2: Seq[I2], in3: Seq[I3])(implicit conn: Future[Conn]): Molecule_0_05[Obj, A, B, C, D, E]
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
// Input molecule awaiting 3 inputs for `profession`, `age` and `score` val profAgeScore = m(Person.name.profession_(?).age_(?).score_(?)) for { // 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) ) // Apply 3 Seq of values, each matching one of the input attributes _ <- proOfAge(Seq("doctor"), Seq(37)).get.map(_ ==> List("Ann")) _ <- proOfAge(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 _ <- profAgeScore.apply(Seq("doctor"), Seq(37), Seq(1.0)).get.map(_ ==> List("Ann")) _ <- profAgeScore.apply(Seq("doctor", "teacher"), Seq(37), Seq(1.0)).get.map(_.sorted ==> List("Ann", "Ben")) } yield ()
- 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
- Molecule_3_05 → Molecule_3
-
def
apply(and: And3[I1, I2, I3])(implicit conn: Future[Conn]): Molecule_0_05[Obj, A, B, C, D, E]
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
// Input molecule awaiting 3 inputs for `profession`, `age` and `score` val profAgeScore = m(Person.name.profession_(?).age_(?).score_(?)) for { // 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) ) // 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.map(_ ==> List("Ann")) _ <- profAgeScore.apply(("doctor" or "teacher") and 37 and 1.0).get .map(_.sorted ==> List("Ann", "Ben")) _ <- profAgeScore.apply(("doctor" or "teacher") and (37 or 32) and 1.0).get .map(_.sorted ==> List("Ann", "Ben", "Joe")) _ <- profAgeScore.apply(("doctor" or "teacher") and (37 or 32) and (1.0 or 2.0)).get .map(_.sorted ==> List("Ann", "Ben", "Joe")) } yield ()
- and
First input expr
andsecond input exprandthird input expr- conn
Implicit Conn in scope
- returns
Resolved molecule that can be queried
- Definition Classes
- Molecule_3_05 → Molecule_3
-
def
apply(ins: Seq[(I1, I2, I3)])(implicit conn: Future[Conn]): Molecule_0_05[Obj, A, B, C, D, E]
Resolve input molecule by applying Seq of value triples
Resolve input molecule by applying Seq of value triples
// Input molecule awaiting 3 inputs for `profession`, `age` and `score` val profAgeScore = m(Person.name.profession_(?).age_(?).score_(?)) for { // 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) ) // Apply Seq of one or more value triples, each matching all 3 input attributes _ <- profAgeScore.apply(Seq(("doctor", 37, 1.0))).get.map(_ ==> List("Ann")) _ <- profAgeScore.apply(Seq(("doctor", 37, 1.0), ("teacher", 37, 1.0))).get.map(_.sorted ==> List("Ann", "Ben")) } yield ()
- 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
- Molecule_3_05 → Molecule_3
-
def
apply(or: Or3[I1, I2, I3])(implicit conn: Future[Conn]): Molecule_0_05[Obj, A, B, C, D, E]
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
// Input molecule awaiting 3 inputs for `profession`, `age` and `score` val profAgeScore = m(Person.name.profession_(?).age_(?).score_(?)) for { // 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) ) // 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 .map(_.sorted ==> List("Ann", "Joe")) } yield ()
- or
Two or more tuple3 expressions separated by
or- conn
Implicit Conn in scope
- returns
Resolved molecule that can be queried
- Definition Classes
- Molecule_3_05 → Molecule_3
-
def
apply(tpl: (I1, I2, I3), tpls: (I1, I2, I3)*)(implicit conn: Future[Conn]): Molecule_0_05[Obj, A, B, C, D, E]
Resolve input molecule by applying one or more value triples
Resolve input molecule by applying one or more value triples
// Input molecule awaiting 3 inputs for `profession`, `age` and `score` val profAgeScore = m(Person.name.profession_(?).age_(?).score_(?)) for { // 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) ) // Apply one or more value triples, each matching all 3 input attributes _ <- profAgeScore.apply(("doctor", 37, 1.0)).get.map(_ ==> List("Ann")) _ <- profAgeScore.apply(("doctor", 37, 1.0), ("teacher", 37, 1.0)).get.map(_.sorted ==> List("Ann", "Ben")) } yield ()
- 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
- Molecule_3_05 → Molecule_3
-
def
apply(i1: I1, i2: I2, i3: I3)(implicit conn: Future[Conn]): Molecule_0_05[Obj, A, B, C, D, E]
Resolve input molecule by applying 3 input values as individual args
Resolve input molecule by applying 3 input values as individual args
// Input molecule awaiting 3 inputs for `profession`, `age` and `score` val profAgeScore = m(Person.name.profession_(?).age_(?).score_(?)) for { // 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) ) // Apply 3 input values (1 triple) _ <- profAgeScore.apply("doctor", 37, 1.0).get.map(_ ==> List("Ann")) } yield ()
- 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
- Molecule_3_05 → Molecule_3
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
bindSeqs(query: Query, inputRaw1: Seq[I1], inputRaw2: Seq[I2], inputRaw3: Seq[I3]): Either[Throwable, Query]
- Attributes
- protected
- Definition Classes
- Molecule_3
-
def
bindValues(query: Query, inputTriples: Seq[(I1, I2, I3)]): Either[Throwable, Query]
- Attributes
- protected
- Definition Classes
- Molecule_3
-
def
cardinality(nsFull: String, attr: String): Int
- Attributes
- protected
- Definition Classes
- InputMolecule
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
dataClause(e: String, kw: KW, enumPrefix: Option[String], arg: Any, i: Int): Seq[Clause]
- Attributes
- protected
- Definition Classes
- InputMolecule
-
def
deepNil(args: Seq[Any]): Boolean
- Attributes
- protected
- Definition Classes
- InputMolecule
-
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()
-
def
isExpression(nsFull: String, attr: String): Boolean
- Attributes
- protected
- Definition Classes
- InputMolecule
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isTacit(nsFull: String, attr: String): Boolean
- Attributes
- protected
- Definition Classes
- InputMolecule
-
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()
-
def
resolveAnd3(and3: And3[I1, I2, I3]): Either[Throwable, (Seq[I1], Seq[I2], Seq[I3])]
- Attributes
- protected
- Definition Classes
- Molecule_3
-
def
resolveInput(query: Query, ph: Placeholder, inputs: Seq[Any], ruleName: String = "rule1", unifyRule: Boolean = false): Query
- Attributes
- protected
- Definition Classes
- InputMolecule
-
def
resolveOr[I1](or: Or[I1]): Either[Throwable, Seq[I1]]
- Attributes
- protected
- Definition Classes
- InputMolecule
-
def
resolveOr3(or: Or3[I1, I2, I3]): Either[Throwable, Seq[(I1, I2, I3)]]
- Attributes
- protected
- Definition Classes
- Molecule_3
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
valueClauses[TT](e: String, kw: KW, enumPrefix: Option[String], tpe: String, args: TT): Seq[Clause]
- Attributes
- protected
- Definition Classes
- InputMolecule
-
def
varsAndPrefixes(query: Query): Seq[(Var, String)]
- Attributes
- protected
- Definition Classes
- InputMolecule
-
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()

Documentation/API for the Molecule library - a meta DSL for the Datomic database.
scalamolecule.org | Github | Forum