trait Molecule_1[Obj, I1] extends InputMolecule
Shared interfaces of input molecules awaiting 1 input.
// Sample data set Person.name.age insert List( ("Joe", 42), ("Liz", 34) ) // Input molecule awaiting 1 input for `name` val ageOfPersons = m(Person.name_(?).age) // Resolve input molecule with name input in various ways ageOfPersons("Joe").get === List(42) ageOfPersons("Joe", "Liz").get === List(42, 34) ageOfPersons("Joe" or "Liz").get === List(42, 34) ageOfPersons(Seq("Joe", "Liz")).get === List(42, 34)
- I1
Type of input matching attribute with
?marker
- Source
- Molecule_1.scala
- Grouped
- Alphabetic
- By Inheritance
- Molecule_1
- InputMolecule
- Molecule
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
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
- Molecule
-
abstract
val
_nestedQuery: Option[Query]
Internal optional Query representation of nested molecule with added entity search for each level.
-
abstract
val
_query: Query
Internal Query representation of molecule.
-
abstract
val
_rawNestedQuery: Option[Query]
Internal un-optimized optional Query representation of nested molecule with added entity search for each level.
-
abstract
val
_rawQuery: Query
Internal un-optimized Query representation molecule.
-
abstract
def
apply(args: Seq[I1])(implicit conn: Conn): Molecule
Apply Seq of input values with OR semantics to resolve input molecule.
Apply Seq of input values with OR semantics to resolve input molecule.
Resolve input molecule by applying a Set of values that the attribute is expected to have (OR semantics).// Input molecule awaiting name input val ageOfPersons = Person.name_(?).age // Apply Seq of one or more input value(s) ageOfPersons.apply(Seq("Ben", "Liz")) // Same as ageOfPersons(Set("Ben", "Liz")) ageOfPersons("Ben" or "Liz") ageOfPersons("Ben", "Liz")
Querying the resolved molecule will match all entities having
nameset to the value(s) applied.- returns
Resolved molecule that can be queried
- Note
Only distinct values are matched.
-
abstract
def
apply(or: Or[I1])(implicit conn: Conn): Molecule
Apply OR expression of input values to resolve input molecule.
Apply OR expression of input values to resolve input molecule.
Input value type matches attribute having?marker.// Input molecule awaiting name input val ageOfPersons = Person.name_(?).age // Apply OR expression of two or more input values ageOfPersons.apply("Ben" or "Liz") // (one or more input values...) // Same as ageOfPersons("Ben", "Liz") ageOfPersons(Seq("Ben", "Liz")) ageOfPersons(Set("Ben", "Liz"))
Querying the resolved molecule will match all entities having
nameset to the values applied.- returns
Resolved molecule that can be queried
- Note
Only distinct values are matched.
-
abstract
def
apply(arg: I1, arg2: I1, moreArgs: I1*)(implicit conn: Conn): Molecule
Apply one or more input values to resolve input molecule.
Apply one or more input values to resolve input molecule.
// Input molecule awaiting name input val ageOfPersons = Person.name_(?).age // Apply one or more input value(s) ageOfPersons.apply("Ben", "Liz") // (one or more input values...) // Same as ageOfPersons("Ben" or "Liz") ageOfPersons(Seq("Ben", "Liz")) ageOfPersons(Set("Ben", "Liz"))
Querying the resolved molecule will match all entities having
nameset to the value(s) applied.- returns
Resolved molecule that can be queried
- Note
Only distinct values are matched.
-
abstract
def
apply(arg: I1)(implicit conn: Conn): Molecule
Apply one or more input values to resolve input molecule.
Apply one or more input values to resolve input molecule.
// Input molecule awaiting name input val ageOfPersons = Person.name_(?).age // Apply one or more input value(s) ageOfPersons.apply("Ben", "Liz") // (one or more input values...) // Same as ageOfPersons("Ben" or "Liz") ageOfPersons(Seq("Ben", "Liz")) ageOfPersons(Set("Ben", "Liz"))
Querying the resolved molecule will match all entities having
nameset to the value(s) applied.- returns
Resolved molecule that can be queried
- Note
Only distinct values are matched.
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
addNilClause(clauses: Seq[Clause], e: Var, kw: KW, v0: Var): Seq[Clause]
- Attributes
- protected
- Definition Classes
- InputMolecule
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
bindValues(query: Query, inputs0: Seq[I1]): Query
- Attributes
- protected
-
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
resolveInput[T](query: Query, ph: Placeholder, inputs: Seq[T], ruleName: String = "rule1", unifyRule: Boolean = false): Query
- Attributes
- protected
- Definition Classes
- InputMolecule
-
def
resolveOr[I1](or: Or[I1]): Seq[I1]
- Attributes
- protected
- Definition Classes
- InputMolecule
-
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], 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