Packages

  • package root

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

    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.

    Definition Classes
    root
  • package core
    Definition Classes
    molecule
  • package generic
    Definition Classes
    core
  • trait GenericAEVT extends AnyRef

    AEVT Index.

    AEVT Index.

    "The AEVT index provides efficient access to all values for a given attribute, comparable to traditional column access style." (from Datomic documentation)

    Access the AEVT Index in Molecule by instantiating an AEVT object with one or more arguments and then add generic attributes:

    for {
      // Create AEVT Index molecule with 1 entity id argument
      _ <- AEVT(":Person/name").e.v.t.get.map(_ ==> List(
        (e1, "Ben", t2),
        (e2, "Liz", t5)
      ))
    
      // Narrow search with multiple arguments
      _ <- AEVT(":Person/name", e1).e.v.get.map(_ ==> List( (e1, "Ben") ))
      _ <- AEVT(":Person/name", e1, "Ben").e.v.get.map(_ ==> List( (e1, "Ben") ))
      _ <- AEVT(":Person/name", e1, "Ben", t2).e.v.get.map(_ ==> List( (e1, "Ben") ))
    } yield ()

    Index attributes available:

    • 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
    Note

    The Molecule Index API's don't allow returning the whole Index/the whole database. So omitting arguments constructing the Index object (like AEVT.a.e.v.t.get) will throw an exception.
    Please use Datomics API if you need to return the whole database Index:
    conn.db.datoms(datomic.Database.AEVT)

  • AEVT

object AEVT extends AEVT_0_0_L0[AEVT_, Init] with FirstNS

AEVT Index object to start AEVT Index molecule.

Source
GenericAEVT.scala
Linear Supertypes
FirstNS, AEVT_0_0_L0[AEVT_, Init], AEVT_0_0[AEVT_, Init], NS_0_00[AEVT_, Init], NS, AEVT, GenericNs, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. AEVT
  2. FirstNS
  3. AEVT_0_0_L0
  4. AEVT_0_0
  5. NS_0_00
  6. NS
  7. AEVT
  8. GenericNs
  9. AnyRef
  10. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. final class a[Stay, Next] extends OneString[Stay, Next] with Indexed
    Definition Classes
    AEVT
  2. final class a$[Stay, Next] extends OneString$[Stay] with Indexed
    Definition Classes
    AEVT
  3. final class e[Stay, Next] extends OneLong[Stay, Next] with Indexed
    Definition Classes
    AEVT
  4. final class e$[Stay, Next] extends OneLong$[Stay] with Indexed
    Definition Classes
    AEVT
  5. final class op[Stay, Next] extends OneBoolean[Stay, Next] with Indexed
    Definition Classes
    AEVT
  6. final class op$[Stay, Next] extends OneBoolean$[Stay] with Indexed
    Definition Classes
    AEVT
  7. final class t[Stay, Next] extends OneLong[Stay, Next] with Indexed
    Definition Classes
    AEVT
  8. final class t$[Stay, Next] extends OneLong$[Stay] with Indexed
    Definition Classes
    AEVT
  9. final class tx[Stay, Next] extends OneLong[Stay, Next] with Indexed
    Definition Classes
    AEVT
  10. final class tx$[Stay, Next] extends OneLong$[Stay] with Indexed
    Definition Classes
    AEVT
  11. final class txInstant[Stay, Next] extends OneDate[Stay, Next] with Indexed
    Definition Classes
    AEVT
  12. final class txInstant$[Stay, Next] extends OneDate$[Stay] with Indexed
    Definition Classes
    AEVT
  13. final class v[Stay, Next] extends OneAny[Stay, Next] with Indexed
    Definition Classes
    AEVT
  14. final class v$[Stay, Next] extends OneAny$[Stay] with Indexed
    Definition Classes
    AEVT
  15. type Next[Attr[_, _], Prop, Tpe] = Attr[AEVT_0_1_L0[AEVT_, Init with Prop, Tpe], Nothing] with AEVT_0_1_L0[AEVT_, Init with Prop, Tpe]
    Definition Classes
    AEVT_0_0_L0
  16. type Stay[Attr[_, _], Prop, Tpe] = Attr[AEVT_0_0_L0[AEVT_, Init], Nothing] with AEVT_0_0_L0[AEVT_, Init]
    Definition Classes
    AEVT_0_0_L0

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, AEVT_a, String]
    Definition Classes
    AEVT_0_0_L0
  5. final def apply(a: String, e: Long, v: Any, t: Long): AEVT_0_0_L0[AEVT_, Init]

    Instantiate AEVT Index filtered by attribute name, entity id, value and transaction entity id (tx) or point in time (t).

  6. final def apply(a: String, e: Long, v: Any): AEVT_0_0_L0[AEVT_, Init]

    Instantiate AEVT Index filtered by attribute name, entity id and value.

  7. final def apply(a: String, e: Long): AEVT_0_0_L0[AEVT_, Init]

    Instantiate AEVT Index filtered by attribute name and entity id.

  8. final def apply(a: String): AEVT_0_0_L0[AEVT_, Init]

    Instantiate AEVT Index filtered by namespace-prefixed attribute name (":part_Ns/attr").

  9. final def apply: AEVT_0_0_L0[AEVT_, Init]

    Unfiltered AEVT Index fetching ALL datoms (!)

  10. def apply(eids: expression.AttrExpressions.qm): AnyRef

    Add entity id(s) input placeholder to the molecule.

    Add entity id(s) input placeholder to the molecule.
    At runtime, entity id(s) are applied as vararg(s) or list/sets.

    eids

    Iterable of entity ids, typically List, Seq or Set of ids.

    returns

    molecule to be further expanded with more attributes.

    Definition Classes
    FirstNS
  11. def apply(eids: Iterable[Long]): AnyRef

    Filter molecule by applying one or more entity ids of type Long.

    Filter molecule by applying one or more entity ids of type Long.

    eids

    Iterable of entity ids, typically List, Seq or Set of ids.

    returns

    molecule to be further expanded with more attributes.

    Definition Classes
    FirstNS
  12. def apply(eid: Long, eids: Long*): AnyRef

    Filter molecule by applying one or more entity ids of type Long.

    Filter molecule by applying one or more entity ids of type Long.

    eid

    First entity id

    eids

    Further entity ids (varargs)

    returns

    molecule to be further expanded with more attributes.

    Definition Classes
    FirstNS
  13. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  14. def asc1: AEVT.this.type
    Definition Classes
    NS
  15. def asc2: AEVT.this.type
    Definition Classes
    NS
  16. def asc3: AEVT.this.type
    Definition Classes
    NS
  17. def asc4: AEVT.this.type
    Definition Classes
    NS
  18. def asc5: AEVT.this.type
    Definition Classes
    NS
  19. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  20. def desc1: AEVT.this.type
    Definition Classes
    NS
  21. def desc2: AEVT.this.type
    Definition Classes
    NS
  22. def desc3: AEVT.this.type
    Definition Classes
    NS
  23. def desc4: AEVT.this.type
    Definition Classes
    NS
  24. def desc5: AEVT.this.type
    Definition Classes
    NS
  25. final lazy val e: Next[e, AEVT_e, Long]
    Definition Classes
    AEVT_0_0_L0
  26. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  27. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  28. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  29. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  30. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  31. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  32. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  33. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  34. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  35. final lazy val op: Next[op, AEVT_op, Boolean]
    Definition Classes
    AEVT_0_0_L0
  36. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  37. final lazy val t: Next[t, AEVT_t, Long]
    Definition Classes
    AEVT_0_0_L0
  38. def toString(): String
    Definition Classes
    AnyRef → Any
  39. final lazy val tx: Next[tx, AEVT_tx, Long]
    Definition Classes
    AEVT_0_0_L0
  40. final lazy val txInstant: Next[txInstant, AEVT_txInstant, Date]
    Definition Classes
    AEVT_0_0_L0
  41. final lazy val v: Next[v, AEVT_v, Any]
    Definition Classes
    AEVT_0_0_L0
  42. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  43. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  44. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from FirstNS

Inherited from AEVT_0_0_L0[AEVT_, Init]

Inherited from AEVT_0_0[AEVT_, Init]

Inherited from NS_0_00[AEVT_, Init]

Inherited from NS

Inherited from AEVT

Inherited from GenericNs

Inherited from AnyRef

Inherited from Any

Ungrouped