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 query extends Helpers

AST for molecule Query representation.

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

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

Source
query.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. query
  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 AggrExpr(fn: String, args: Seq[Any], v: Var) extends Output with Product with Serializable
  2. sealed trait Binding extends QueryTerm
  3. sealed trait Clause extends QueryExpr
  4. case class CollectionBinding(v: Var) extends Binding with Product with Serializable
  5. case class DS(name: String = "") extends DataSource with Product with Serializable
  6. case class DataClause(ds: DataSource, e: QueryValue, a: KW, v: QueryValue, tx: QueryTerm, op: QueryTerm = NoBinding) extends Clause with Product with Serializable
  7. sealed trait DataSource extends QueryTerm
  8. sealed trait ExpressionClause extends Clause
  9. case class Find(outputs: Seq[Output]) extends QueryExpr with Product with Serializable
  10. case class Funct(name: String, ins: Seq[QueryTerm], outs: Binding) extends ExpressionClause with Product with Serializable
  11. case class In(inputs: Seq[Input], rules: Seq[Rule] = Seq(), ds: Seq[DataSource] = Seq(DS)) extends QueryExpr with Product with Serializable
  12. case class InDataSource(ds: DataSource, argss: Seq[Seq[Any]] = Seq(Seq())) extends Input with Product with Serializable
  13. case class InVar(binding: Binding, argss: Seq[Seq[Any]] = Seq(Seq())) extends Input with Product with Serializable
  14. trait Input extends QueryTerm
  15. case class KW(nsFull: String, attr: String, refNs: String = "") extends QueryValue with Product with Serializable
  16. case class NotClause(e: Var, a: KW) extends Clause with Product with Serializable
  17. case class NotClauses(clauses: Seq[Clause]) extends Clause with Product with Serializable
  18. case class NotJoinClauses(nonUnifyingVars: Seq[Var], clauses: Seq[Clause]) extends Clause with Product with Serializable
  19. sealed trait Output extends QueryExpr
  20. case class Placeholder(e: Var, kw: KW, v: Var, enumPrefix: Option[String] = None) extends Input with Product with Serializable
  21. case class Pull(e: String, nsFull: String, attr: String, enumPrefix: Option[String] = None) extends QueryValue with Output with Product with Serializable
  22. case class Query(f: Find, wi: With, i: In, wh: Where) extends QueryExpr with Product with Serializable

    Molecule Query representation.

    Molecule Query representation.

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

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

    Query is thus derived from Model representation.

    f

    Find parameters

    wi

    With parameters

    i

    Input parameters

    wh

    Where parameters: data clauses

  23. trait QueryExpr extends AnyRef
  24. trait QueryTerm extends QueryExpr
  25. sealed trait QueryValue extends QueryTerm
  26. case class RelationBinding(vs: Seq[Var]) extends Binding with Product with Serializable
  27. case class Rule(name: String, args: Seq[QueryValue], clauses: Seq[Clause]) extends QueryTerm with Product with Serializable
  28. case class RuleInvocation(name: String, args: Seq[QueryTerm]) extends Clause with Product with Serializable
  29. case class ScalarBinding(v: Var) extends Binding with Product with Serializable
  30. case class TupleBinding(vs: Seq[Var]) extends Binding with Product with Serializable
  31. case class Val(v: Any) extends QueryValue with Output with Product with Serializable
  32. case class Var(v: String) extends QueryValue with Output with Product with Serializable
  33. case class Where(clauses: Seq[Clause]) extends QueryExpr with Product with Serializable
  34. case class With(variables: Seq[String]) extends QueryExpr with Product with Serializable
  35. 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. def clean(attr: String): String
    Definition Classes
    Helpers
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  8. def date2datomicStr(date: Date, zoneOffset: ZoneOffset = localZoneOffset): String
    Definition Classes
    DateHandling
  9. def date2str(date: Date, zoneOffset: ZoneOffset = localZoneOffset): String
    Definition Classes
    DateHandling
  10. def daylight(ms: Long): Int
    Definition Classes
    DateHandling
  11. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  13. def expandDateStr(dateStr: String): String
    Definition Classes
    DateHandling
  14. final def f(a: Any): Any
    Attributes
    protected
    Definition Classes
    Helpers
  15. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  16. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  17. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  18. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  19. lazy val localOffset: String
    Definition Classes
    DateHandling
  20. lazy val localZoneOffset: ZoneOffset
    Definition Classes
    DateHandling
  21. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  22. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  23. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  24. final def o(opt: Option[Any]): String
    Attributes
    protected
    Definition Classes
    Helpers
  25. final def os(opt: Option[Set[_]]): String
    Attributes
    protected
    Definition Classes
    Helpers
  26. final def seq[T](values: Seq[T]): String
    Attributes
    protected
    Definition Classes
    Helpers
  27. def str2date(s: String, zoneOffset: ZoneOffset = localZoneOffset): Date
    Definition Classes
    DateHandling
  28. def str2zdt(s: String, zoneOffset: ZoneOffset = localZoneOffset): ZonedDateTime
    Definition Classes
    DateHandling
  29. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  30. final def time(n: Int, prev: Int = 0): Unit
    Attributes
    protected
    Definition Classes
    Helpers
  31. def toString(): String
    Definition Classes
    AnyRef → Any
  32. def truncateDateStr(dateStr: String): String
    Definition Classes
    DateHandling
  33. final def tupleToSeq(arg: Any): Seq[Any]
    Attributes
    protected
    Definition Classes
    Helpers
  34. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  37. lazy val zone: ZoneId
    Definition Classes
    DateHandling
  38. object DS extends DataSource with Product with Serializable
  39. object DataClause extends Serializable
  40. object Empty extends QueryTerm with Product with Serializable
  41. object ImplDS extends DataSource with Product with Serializable
  42. object NoBinding extends Binding with Product with Serializable
  43. object NoVal extends QueryValue with Output with Product with Serializable
  44. object Query extends Serializable
  45. object mkDate
    Attributes
    protected
    Definition Classes
    Helpers

Inherited from Helpers

Inherited from DateHandling

Inherited from RegexMatching

Inherited from AnyRef

Inherited from Any

Ungrouped