Packages

  • package root

    Documentation/API for the Molecule library - a meta DSL for the Datomic database.

    Manual | scalamolecule.org | Github | Forum

    Definition Classes
    root
  • package molecule

    Molecule library - a Scala meta-DSL for the Datomic database.

    Molecule library - a Scala meta-DSL for the Datomic database.

    See api package for various api imports to start using Molecule.

    Sub-packages

    api Molecule API.
    ast Internal Molecule ASTs.
    boilerplate Internal interfaces for auto-generated DSL boilerplate code.
    composition    Builder methods to compose molecules.
    exceptions Exceptions thrown by Molecule.
    expression Attribute expressions and operations.
    facade Molecule facades to Datomic.
    factory Implicit macro methods `m` to instantiate molecules from custom DSL molecule constructs.
    input Input molecules awaiting input.
    macros Internal macros generating molecule code from custom DSL molecule constructs.
    generic Interfaces to generic information about datoms and Datomic database.
    ops Internal operational helpers for transforming DSL to molecule.
    schema Schema definition DSL.
    transform Internal transformers from DSL to Model/Query/Transaction.
    util Internal Java database functions for Datomic.

    Definition Classes
    root
  • package input

    Input molecules awaiting input.

    Input molecules awaiting input.

    Input molecules are molecules that awaits one or more inputs at runtime. When input value is applied, the input molecule is resolved and a standard molecule is returned that we can then call actions on.

    Input molecule queries are cached by Datomic. So there is a runtime performance gain in using input molecules. Furthermore, input molecules are a good fit for re-use for queries where only a few parameters change.

    Input molecules can await 1, 2 or 3 inputs and are constructed by applying the ? marker to attributes. If one marker is applied, we get a InputMolecule_1, 2 inputs creates an InputMolecule_2 and 3 an InputMolecule_3.

    The three input molecule interfaces come in arity-versions corresponding to the number of non-?-marked attributes in the input molecule. Let's see a simple example:

    // Sample data
    Person.name.age insert List(("Ben", 42), ("Liz", 34))
    
    // Input molecule created at compile time. Awaits a name of type String
    val ageOfPersons: InputMolecule_1.InputMolecule_1_01[String, Int] = m(Person.name_(?).age)
    
    // Resolved molecule. "Ben" input is matched against name attribute
    val ageOfPersonsNamedBen: Molecule.Molecule01[Int] = ageOfPersons.apply("Ben")
    
    // Calling action on resolved molecule.
    // (Only age is returned since name was marked as tacit with the underscore notation)
    ageOfPersonsNamedBen.get === List(42)
    
    // Or we can re-use the input molecule straight away
    ageOfPersons("Liz").get === List(34)
    Definition Classes
    molecule
  • package exception
    Definition Classes
    input
  • InputMolecule
  • InputMolecule_1
  • InputMolecule_2
  • InputMolecule_3

object InputMolecule_1

Implementations of input molecules awaiting 1 input, output arity 1-22

Source
InputMolecule_1.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. InputMolecule_1
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. abstract class InputMolecule_1_01[I1, A] extends InputMolecule_1[I1]
  2. abstract class InputMolecule_1_02[I1, A, B] extends InputMolecule_1[I1]
  3. abstract class InputMolecule_1_03[I1, A, B, C] extends InputMolecule_1[I1]
  4. abstract class InputMolecule_1_04[I1, A, B, C, D] extends InputMolecule_1[I1]
  5. abstract class InputMolecule_1_05[I1, A, B, C, D, E] extends InputMolecule_1[I1]
  6. abstract class InputMolecule_1_06[I1, A, B, C, D, E, F] extends InputMolecule_1[I1]
  7. abstract class InputMolecule_1_07[I1, A, B, C, D, E, F, G] extends InputMolecule_1[I1]
  8. abstract class InputMolecule_1_08[I1, A, B, C, D, E, F, G, H] extends InputMolecule_1[I1]
  9. abstract class InputMolecule_1_09[I1, A, B, C, D, E, F, G, H, I] extends InputMolecule_1[I1]
  10. abstract class InputMolecule_1_10[I1, A, B, C, D, E, F, G, H, I, J] extends InputMolecule_1[I1]
  11. abstract class InputMolecule_1_11[I1, A, B, C, D, E, F, G, H, I, J, K] extends InputMolecule_1[I1]
  12. abstract class InputMolecule_1_12[I1, A, B, C, D, E, F, G, H, I, J, K, L] extends InputMolecule_1[I1]
  13. abstract class InputMolecule_1_13[I1, A, B, C, D, E, F, G, H, I, J, K, L, M] extends InputMolecule_1[I1]
  14. abstract class InputMolecule_1_14[I1, A, B, C, D, E, F, G, H, I, J, K, L, M, N] extends InputMolecule_1[I1]
  15. abstract class InputMolecule_1_15[I1, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O] extends InputMolecule_1[I1]
  16. abstract class InputMolecule_1_16[I1, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P] extends InputMolecule_1[I1]
  17. abstract class InputMolecule_1_17[I1, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q] extends InputMolecule_1[I1]
  18. abstract class InputMolecule_1_18[I1, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R] extends InputMolecule_1[I1]
  19. abstract class InputMolecule_1_19[I1, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S] extends InputMolecule_1[I1]
  20. abstract class InputMolecule_1_20[I1, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T] extends InputMolecule_1[I1]
  21. abstract class InputMolecule_1_21[I1, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U] extends InputMolecule_1[I1]
  22. abstract class InputMolecule_1_22[I1, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V] extends InputMolecule_1[I1]

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(classOf[java.lang.CloneNotSupportedException]) @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  9. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  14. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  15. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  16. def toString(): String
    Definition Classes
    AnyRef → Any
  17. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  18. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  19. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped