object model extends Helpers
AST for molecule Model representation.
Molecule transforms custom boilerplate DSL constructs to Datomic queries in 3 steps:
Custom DSL molecule --> Model --> Query --> Datomic query string
- Source
- model.scala
- Alphabetic
- By Inheritance
- model
- Helpers
- DateHandling
- RegexMatching
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- case class And(values: Seq[Any]) extends Value with Product with Serializable
- case class And2[T1, T2](e1: Exp1[T1], e2: Exp1[T2]) extends Exp2[T1, T2] with Product with Serializable
- case class And3[T1, T2, T3](e1: Exp1[T1], e2: Exp1[T2], e3: Exp1[T3]) extends Exp3[T1, T2, T3] with Product with Serializable
- case class AssertMapPairs(pairs: Seq[(String, Any)]) extends Value with Product with Serializable
- case class AssertValue(values: Seq[Any]) extends Value with Product with Serializable
- 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
- case class BackValue(backNs: String) extends Value with Product with Serializable
- case class BiEdgePropAttr(card: Int) extends Bidirectional with Product with Serializable
- case class BiEdgePropRef(card: Int) extends Bidirectional with Product with Serializable
- case class BiEdgePropRefAttr(card: Int) extends Bidirectional with Product with Serializable
- case class BiEdgeRef(card: Int, attr: String) extends Bidirectional with Product with Serializable
- case class BiEdgeRefAttr(card: Int, attr: String) extends Bidirectional with Product with Serializable
- case class BiOtherRef(card: Int, attr: String) extends Bidirectional with Product with Serializable
- case class BiOtherRefAttr(card: Int, attr: String) extends Bidirectional with Product with Serializable
- case class BiSelfRef(card: Int) extends Bidirectional with Product with Serializable
- case class BiSelfRefAttr(card: Int) extends Bidirectional with Product with Serializable
- case class BiTargetRef(card: Int, attr: String) extends Bidirectional with Product with Serializable
- case class BiTargetRefAttr(card: Int, attr: String) extends Bidirectional with Product with Serializable
- sealed trait Bidirectional extends GenericValue
- case class Bond(nsFull: String, refAttr: String, refNs: String = "", card: Int, gvs: Seq[GenericValue] = Nil) extends Element with Product with Serializable
- case class Card(card: Int) extends GenericValue with Product with Serializable
- case class Composite(elements: Seq[Element]) extends Element with Product with Serializable
- trait Element extends AnyRef
- case class Eq(values: Seq[Any]) extends Value with Product with Serializable
- trait Exp1[T1] extends Expression
- trait Exp2[T1, T2] extends Expression
- trait Exp3[T1, T2, T3] extends Expression
- 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)
- case class Fn(name: String, value: Option[Int] = None) extends Value with Product with Serializable
- case class Fulltext(search: Seq[Any]) extends Value with Product with Serializable
- case class Ge(value: Any) extends Value with Product with Serializable
- case class Generic(nsFull: String, attr: String, tpe: String, value: Value) extends GenericAtom with Product with Serializable
- trait GenericAtom extends Element
- sealed trait GenericValue extends Value
- case class Gt(value: Any) extends Value with Product with Serializable
- case class Id(eid: Any) extends GenericValue with Product with Serializable
- case class Le(value: Any) extends Value with Product with Serializable
- case class Lt(value: Any) extends Value with Product with Serializable
- case class MapEq(pairs: Seq[(String, Any)]) extends Value with Product with Serializable
- case class MapKeys(keys: Seq[String]) extends Value with Product with Serializable
- 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
- case class Neq(values: Seq[Any]) extends Value with Product with Serializable
- case class Nested(bond: Bond, elements: Seq[Element]) extends Element with Product with Serializable
- case class Not[T1](e: Exp1[T1]) extends Exp1[T1] with Product with Serializable
- case class Or[T1](e1: Exp1[T1], e2: Exp1[T1]) extends Exp1[T1] with Product with Serializable
- case class Or2[T1, T2](e1: Exp2[T1, T2], e2: Exp2[T1, T2]) extends Exp2[T1, T2] with Product with Serializable
- 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
- case class ReBond(backRef: String) extends Element with Product with Serializable
- case class ReplaceMapPairs(pairs: Seq[(String, Any)]) extends Value with Product with Serializable
- case class ReplaceValue(oldNew: Seq[(Any, Any)]) extends Value with Product with Serializable
- case class RetractMapKeys(keys: Seq[String]) extends Value with Product with Serializable
- case class RetractValue(values: Seq[Any]) extends Value with Product with Serializable
- case class TermValue[T1](v: T1) extends Exp1[T1] with Product with Serializable
- case class TxMetaData(elements: Seq[Element]) extends Element with Product with Serializable
- sealed trait Value extends AnyRef
- implicit class Regex extends AnyRef
- Definition Classes
- RegexMatching
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def cast(value: Any): String
- Attributes
- protected
- Definition Classes
- Helpers
- final def cast2(tpe: String, value: Any): String
- def clean(attr: String): String
- Definition Classes
- Helpers
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def curNs(e: Element): String
- def date2datomicStr(date: Date, zoneOffset: ZoneOffset = localZoneOffset): String
- Definition Classes
- DateHandling
- def date2str(date: Date, zoneOffset: ZoneOffset = localZoneOffset): String
- Definition Classes
- DateHandling
- def daylight(ms: Long): Int
- Definition Classes
- DateHandling
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def expandDateStr(dateStr: String): String
- Definition Classes
- DateHandling
- final def f(a: Any): Any
- Attributes
- protected
- Definition Classes
- Helpers
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def getSeq2[T](tpe: String, values: Seq[T]): String
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- lazy val localOffset: String
- Definition Classes
- DateHandling
- lazy val localZoneOffset: ZoneOffset
- Definition Classes
- DateHandling
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def o(opt: Option[Any]): String
- Attributes
- protected
- Definition Classes
- Helpers
- final def os(opt: Option[Set[_]]): String
- Attributes
- protected
- Definition Classes
- Helpers
- final def seq[T](values: Seq[T]): String
- Attributes
- protected
- Definition Classes
- Helpers
- def str2date(s: String, zoneOffset: ZoneOffset = localZoneOffset): Date
- Definition Classes
- DateHandling
- def str2zdt(s: String, zoneOffset: ZoneOffset = localZoneOffset): ZonedDateTime
- Definition Classes
- DateHandling
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- final def time(n: Int, prev: Int = 0): Unit
- Attributes
- protected
- Definition Classes
- Helpers
- def toString(): String
- Definition Classes
- AnyRef → Any
- def truncateDateStr(dateStr: String): String
- Definition Classes
- DateHandling
- final def tupleToSeq(arg: Any): Seq[Any]
- Attributes
- protected
- Definition Classes
- Helpers
- final def tv(tpe: String, value: Value): String
- Attributes
- protected
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- lazy val zone: ZoneId
- Definition Classes
- DateHandling
- object BiEdge extends Bidirectional with Product with Serializable
- object Distinct extends Value with Product with Serializable
- object EmptyElement extends Element with Product with Serializable
- object EntValue extends Value with Product with Serializable
- object EnumVal extends Value with Product with Serializable
- object IndexVal extends Value with Product with Serializable
- object NoValue extends GenericValue with Product with Serializable
- object Qm extends Value with Product with Serializable
- object Self extends Element with Product with Serializable
- object VarValue extends Value with Product with Serializable
- object mkDate
- Attributes
- protected
- Definition Classes
- Helpers
Documentation/API for the Molecule library - a meta DSL for the Datomic database.
Manual | scalamolecule.org | Github | Forum