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 generic

    Interfaces to get generic information about data and schema.

    Interfaces to get generic information about data and schema.

    • Datom - Datom attributes in molecules
    • Log - Datoms sorted by transaction/time
    • EAVT - Datoms sorted by Entity-Attribute-Value-Transaction
    • AVET - Datoms sorted by Attribute-Value-Entity-Transaction
    • AEVT - Datoms sorted by Attribute-Entity-Value-Transaction
    • VAET - "Reverse index" for reverse lookup of ref types
    • Schema - Meta information about the current database schema.
    Definition Classes
    molecule
  • package datom

    Generic Datom attribute interfaces of all arities.

    Generic Datom attribute interfaces of all arities.

    "Generic attributes" are special pre-defined attributes that can be combined with custom attributes in molecules to return meta data:

    // Get id of Ben entity with `e`
    Person.e.name.get.head === (benEntityId, "Ben")
    
    // When was Ben's age updated? Using `txInstant`
    Person(benEntityId).age.txInstant.get.head === (42, <April 4, 2019>) // (Date)
    
    // With a history db we can access the transaction number `t` and
    // assertion/retraction statusses with `op`
    Person(benEntityId).age.t.op.getHistory === List(
      (41, t1, true),  // age 41 asserted in transaction t1
      (41, t2, false), // age 41 retracted in transaction t2
      (42, t2, true)   // age 42 asserted in transaction t2
    )

    Available generic attributes:

    • e - Entity id (Long)
    • a - Full attribute name like ":Person/name" (String)
    • v - Value of Datoms (Any)
    • t - Transaction pointer (Long/Int)
    • tx - Transaction entity id (Long)
    • txInstant - Transaction wall clock time (java.util.Date)
    • op - Operation status: assertion (true) / retraction (false)
    Definition Classes
    generic
    See also

    Tests for more generic attribute query examples.

  • Datom
  • Datom_0
  • Datom_1
  • Datom_10
  • Datom_11
  • Datom_12
  • Datom_13
  • Datom_14
  • Datom_15
  • Datom_16
  • Datom_17
  • Datom_18
  • Datom_19
  • Datom_2
  • Datom_20
  • Datom_21
  • Datom_22
  • Datom_3
  • Datom_4
  • Datom_5
  • Datom_6
  • Datom_7
  • Datom_8
  • Datom_9

trait Datom_20[Ns20[_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _], Ns21[_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _], In20[_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _], In21[_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _], A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T] extends Datom

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Datom_20
  2. Datom
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. final class a[Ns, In] extends OneString[Ns, In] with Indexed

    (Partition)-Namespace-prefixed attribute name (":part_Ns/attr")

    (Partition)-Namespace-prefixed attribute name (":part_Ns/attr")

    Definition Classes
    Datom
  2. final class e[Ns, In] extends OneLong[Ns, In] with Indexed

    Entity id (Long)

    Entity id (Long)

    Definition Classes
    Datom
  3. final class op[Ns, In] extends OneBoolean[Ns, In] with Indexed

    Transaction operation: assertion (true) or retraction (false)

    Transaction operation: assertion (true) or retraction (false)

    Definition Classes
    Datom
  4. final class t[Ns, In] extends OneLong[Ns, In] with Indexed

    Transaction point in time t (Long/Int)

    Transaction point in time t (Long/Int)

    Definition Classes
    Datom
  5. final class tx[Ns, In] extends OneLong[Ns, In] with Indexed

    Transaction entity id (Long)

    Transaction entity id (Long)

    Definition Classes
    Datom
  6. final class txInstant[Ns, In] extends OneDate[Ns, In] with Indexed

    Transaction wall-clock time (Date)

    Transaction wall-clock time (Date)

    Definition Classes
    Datom
  7. final class v[Ns, In] extends OneAny[Ns, In] with Indexed

    Datom value (Any)

    Datom value (Any)

    Definition Classes
    Datom
  8. type Next_[Attr[_, _], Type] = Attr[Ns21[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, Type], In21[_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _]] with Ns21[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, Type]
  9. type Stay_[Attr[_, _], Type] = Attr[Ns20[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T], In20[_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _]] with Ns20[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T]

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 lazy val a: Next_[a, String]
  5. final lazy val a_: Stay_[a, String]
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  8. final lazy val e: Next_[e, Long]
  9. final lazy val e_: Stay_[e, Long]
  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  14. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  15. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  16. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  18. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. final lazy val op: Next_[op, Boolean]
  20. final lazy val op_: Stay_[op, Boolean]
  21. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  22. final lazy val t: Next_[t, Long]
  23. final lazy val t_: Stay_[t, Long]
  24. def toString(): String
    Definition Classes
    AnyRef → Any
  25. final lazy val tx: Next_[tx, Long]
  26. final lazy val txInstant: Next_[txInstant, Date]
  27. final lazy val txInstant_: Stay_[txInstant, Date]
  28. final lazy val tx_: Stay_[tx, Long]
  29. final lazy val v: Next_[v, Any]
  30. final lazy val v_: Stay_[v, Any]
  31. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from Datom

Inherited from AnyRef

Inherited from Any

Ungrouped