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 ast

    Internal Molecule ASTs.

    Internal Molecule ASTs.

    Definition Classes
    molecule
  • package exception
    Definition Classes
    ast
  • MoleculeBase
  • model
  • query
  • transactionModel

object model extends Helpers

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. model
  2. Helpers
  3. DateHandling
  4. RegexMatching
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. case class And(values: Seq[Any]) extends Value with Product with Serializable
  2. case class And2[T1, T2](e1: Exp1[T1], e2: Exp1[T2]) extends Exp2[T1, T2] with Product with Serializable
  3. case class And3[T1, T2, T3](e1: Exp1[T1], e2: Exp1[T2], e3: Exp1[T3]) extends Exp3[T1, T2, T3] with Product with Serializable
  4. case class AssertMapPairs(pairs: Seq[(String, Any)]) extends Value with Product with Serializable
  5. case class AssertValue(values: Seq[Any]) extends Value with Product with Serializable
  6. case class Atom(nsFull: String, attr: String, tpe: String, card: Int, value: Value, enumPrefix: Option[String] = None, gvs: Seq[GenericValue] = Nil, keys: Seq[String] = Nil) extends GenericAtom with Product with Serializable
  7. case class BackValue(backNs: String) extends Value with Product with Serializable
  8. case class BiEdgePropAttr(card: Int) extends Bidirectional with Product with Serializable
  9. case class BiEdgePropRef(card: Int) extends Bidirectional with Product with Serializable
  10. case class BiEdgePropRefAttr(card: Int) extends Bidirectional with Product with Serializable
  11. case class BiEdgeRef(card: Int, attr: String) extends Bidirectional with Product with Serializable
  12. case class BiEdgeRefAttr(card: Int, attr: String) extends Bidirectional with Product with Serializable
  13. case class BiOtherRef(card: Int, attr: String) extends Bidirectional with Product with Serializable
  14. case class BiOtherRefAttr(card: Int, attr: String) extends Bidirectional with Product with Serializable
  15. case class BiSelfRef(card: Int) extends Bidirectional with Product with Serializable
  16. case class BiSelfRefAttr(card: Int) extends Bidirectional with Product with Serializable
  17. case class BiTargetRef(card: Int, attr: String) extends Bidirectional with Product with Serializable
  18. case class BiTargetRefAttr(card: Int, attr: String) extends Bidirectional with Product with Serializable
  19. sealed trait Bidirectional extends GenericValue
  20. case class Bond(nsFull: String, refAttr: String, refNs: String = "", card: Int, gvs: Seq[GenericValue] = Nil) extends Element with Product with Serializable
  21. case class Card(card: Int) extends GenericValue with Product with Serializable
  22. case class Composite(elements: Seq[Element]) extends Element with Product with Serializable
  23. trait Element extends AnyRef
  24. case class Eq(values: Seq[Any]) extends Value with Product with Serializable
  25. trait Exp1[T1] extends Expression
  26. trait Exp2[T1, T2] extends Expression
  27. trait Exp3[T1, T2, T3] extends Expression
  28. trait Expression extends AnyRef

    Expression AST for building OR/AND expressions.

    Expression AST for building OR/AND expressions.

    // `or` method allows OR-logic to be applied to `name` attribute
    Person.name_("Ben" or "Liz").age.get === List(42, 37)
    
    // Given an input molecule awaiting 2 inputs, we can apply AND-pairs to OR expression:
    val persons = m(Person.name_(?).age(?))
    persons(("Ben" and 42) or ("Liz" and 37)).get === List(42, 37)
  29. case class Fn(name: String, value: Option[Int] = None) extends Value with Product with Serializable
  30. case class Fulltext(search: Seq[Any]) extends Value with Product with Serializable
  31. case class Ge(value: Any) extends Value with Product with Serializable
  32. case class Generic(nsFull: String, attr: String, tpe: String, value: Value) extends GenericAtom with Product with Serializable
  33. trait GenericAtom extends Element
  34. sealed trait GenericValue extends Value
  35. case class Gt(value: Any) extends Value with Product with Serializable
  36. case class Id(eid: Any) extends GenericValue with Product with Serializable
  37. case class Le(value: Any) extends Value with Product with Serializable
  38. case class Lt(value: Any) extends Value with Product with Serializable
  39. case class MapEq(pairs: Seq[(String, Any)]) extends Value with Product with Serializable
  40. case class MapKeys(keys: Seq[String]) extends Value with Product with Serializable
  41. case class Model(elements: Seq[Element]) extends Product with Serializable

    Molecule Model representation.

    Molecule Model representation.

    Molecule transforms custom boilerplate DSL constructs to Datomic queries in 3 steps:

    Custom DSL molecule --> Model --> Query --> Datomic query string

    Model is thus derived from custom meta-DSL constructs ("molecules").

    elements

    Elements of the model

  42. case class Neq(values: Seq[Any]) extends Value with Product with Serializable
  43. case class Nested(bond: Bond, elements: Seq[Element]) extends Element with Product with Serializable
  44. case class Not[T1](e: Exp1[T1]) extends Exp1[T1] with Product with Serializable
  45. case class Or[T1](e1: Exp1[T1], e2: Exp1[T1]) extends Exp1[T1] with Product with Serializable
  46. case class Or2[T1, T2](e1: Exp2[T1, T2], e2: Exp2[T1, T2]) extends Exp2[T1, T2] with Product with Serializable
  47. case class Or3[T1, T2, T3](e1: Exp3[T1, T2, T3], e2: Exp3[T1, T2, T3], e3: Exp3[T1, T2, T3]) extends Exp3[T1, T2, T3] with Product with Serializable
  48. case class ReBond(backRef: String) extends Element with Product with Serializable
  49. case class ReplaceMapPairs(pairs: Seq[(String, Any)]) extends Value with Product with Serializable
  50. case class ReplaceValue(oldNew: Seq[(Any, Any)]) extends Value with Product with Serializable
  51. case class RetractMapKeys(keys: Seq[String]) extends Value with Product with Serializable
  52. case class RetractValue(values: Seq[Any]) extends Value with Product with Serializable
  53. case class TermValue[T1](v: T1) extends Exp1[T1] with Product with Serializable
  54. case class TxMetaData(elements: Seq[Element]) extends Element with Product with Serializable
  55. sealed trait Value extends AnyRef
  56. implicit class Regex extends AnyRef
    Definition Classes
    RegexMatching

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 cast(value: Any): String
    Attributes
    protected
    Definition Classes
    Helpers
  6. final def cast2(tpe: String, value: Any): String
  7. def clean(attr: String): String
    Definition Classes
    Helpers
  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  9. def curNs(e: Element): String
  10. def date2datomicStr(date: Date, zoneOffset: ZoneOffset = localZoneOffset): String
    Definition Classes
    DateHandling
  11. def date2str(date: Date, zoneOffset: ZoneOffset = localZoneOffset): String
    Definition Classes
    DateHandling
  12. def daylight(ms: Long): Int
    Definition Classes
    DateHandling
  13. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  15. def escStr(s: String): String
    Definition Classes
    Helpers
  16. def expandDateStr(dateStr: String): String
    Definition Classes
    DateHandling
  17. final def f(a: Any): Any
    Attributes
    protected
    Definition Classes
    Helpers
  18. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  19. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  20. final def getSeq2[T](tpe: String, values: Seq[T]): String
  21. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  22. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  23. lazy val localOffset: String
    Definition Classes
    DateHandling
  24. lazy val localZoneOffset: ZoneOffset
    Definition Classes
    DateHandling
  25. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  26. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  27. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  28. final def o(opt: Option[Any]): String
    Attributes
    protected
    Definition Classes
    Helpers
  29. final def os(opt: Option[Set[_]]): String
    Attributes
    protected
    Definition Classes
    Helpers
  30. final def seq[T](values: Seq[T]): String
    Attributes
    protected
    Definition Classes
    Helpers
  31. def str2date(s: String, zoneOffset: ZoneOffset = localZoneOffset): Date
    Definition Classes
    DateHandling
  32. def str2zdt(s: String, zoneOffset: ZoneOffset = localZoneOffset): ZonedDateTime
    Definition Classes
    DateHandling
  33. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  34. final def time(n: Int, prev: Int = 0): Unit
    Attributes
    protected
    Definition Classes
    Helpers
  35. def toString(): String
    Definition Classes
    AnyRef → Any
  36. def truncateDateStr(dateStr: String): String
    Definition Classes
    DateHandling
  37. final def tupleToSeq(arg: Any): Seq[Any]
    Attributes
    protected
    Definition Classes
    Helpers
  38. final def tv(tpe: String, value: Value): String
    Attributes
    protected
  39. def unescStr(s: String): String
    Definition Classes
    Helpers
  40. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  41. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  42. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  43. lazy val zone: ZoneId
    Definition Classes
    DateHandling
  44. object BiEdge extends Bidirectional with Product with Serializable
  45. object Distinct extends Value with Product with Serializable
  46. object EmptyElement extends Element with Product with Serializable
  47. object EntValue extends Value with Product with Serializable
  48. object EnumVal extends Value with Product with Serializable
  49. object IndexVal extends Value with Product with Serializable
  50. object NoValue extends GenericValue with Product with Serializable
  51. object Qm extends Value with Product with Serializable
  52. object Self extends Element with Product with Serializable
  53. object VarValue extends Value with Product with Serializable
  54. object mkDate
    Attributes
    protected
    Definition Classes
    Helpers

Inherited from Helpers

Inherited from DateHandling

Inherited from RegexMatching

Inherited from AnyRef

Inherited from Any

Ungrouped