Packages

object out7 extends api with Molecule_Factory7 with CompositeFactory_0_5

Ordering
  1. Grouped
  2. Alphabetic
  3. By Inheritance
Inherited
  1. out7
  2. CompositeFactory_0_5
  3. Molecule_Factory7
  4. api
  5. GenericVAET
  6. GenericEAVT
  7. GenericAVET
  8. GenericAEVT
  9. GenericLog
  10. GenericSchema
  11. TxFunctions
  12. TxBundles
  13. BooPicklers
  14. Helpers
  15. DateHandling
  16. RegexMatching
  17. EntityOps
  18. LogicImplicits
  19. Keywords
  20. AttrExpressions
  21. AggregateKeywords
  22. AnyRef
  23. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. trait avg extends AnyRef

    Average of attribute values.

    Average of attribute values.

    Apply avg keyword to attribute to return average of attribute values of entities matching the molecule.

    for {
      _ <- Match.sKeywords.insert(1, 2, 4)
      _ <- Match.score(avg).get.map(_.head ==> 2.3333333333333335) // (1 + 2 + 4) / 3
    } yield ()
    returns

    Double

    Definition Classes
    AggregateKeywords
  2. trait count extends AnyRef

    Count of attribute values.

    Count of attribute values.

    Apply count keyword to attribute to return count of attribute values of entities matching the molecule.

    for {
      _ <- Person.firstName.lastName.age insert List(
        ("Ben", "Hayday", 42),
        ("Liz", "Taylor", 34),
        ("Liz", "Swifty", 34),
        ("Liz", "Mooray", 25)
      )
      _ <- Person.firstName.age(count).get.map(_ ==> List(
        ("Ben", 1),
        ("Liz", 3) // 34, 34, 25
      ))
    } yield ()
    returns

    Int

    Definition Classes
    AggregateKeywords
  3. trait countDistinct extends AnyRef

    Count of distinct attribute values.

    Count of distinct attribute values.

    Apply countDistinct keyword to attribute to return count of distinct attribute values of entities matching the molecule.

    for {
      _ <- Person.firstName.lastName.age insert List(
        ("Ben", "Hayday", 42),
        ("Liz", "Taylor", 34),
        ("Liz", "Swifty", 34),
        ("Liz", "Mooray", 25)
      )
      _ <- Person.firstName.age(countDistinct).get.map(_ ==> List(
        ("Ben", 1),
        ("Liz", 2) // 34, 25
      ))
    } yield ()
    returns

    Int

    Definition Classes
    AggregateKeywords
  4. trait distinct extends AnyRef

    Distinct attribute values.

    Distinct attribute values.

    Apply distinct keyword to attribute to return Vector of distinct attribute values of entities matching the molecule.

    for {
      _ <- Person.firstName.lastName.age insert List(
        ("Ben", "Hayday", 42),
        ("Liz", "Taylor", 34),
        ("Liz", "Swifty", 34),
        ("Liz", "Mooray", 25)
      )
      _ <- Person.firstName.age(distinct) insert List(
        ("Ben", 42),
        ("Liz", Vector(34, 25)) // only single 34 returned
      )
    } yield ()
    returns

    List[attribute-type]

    Definition Classes
    AggregateKeywords
  5. trait max extends AnyRef

    Maximum attribute value(s).

    Maximum attribute value(s).

    Apply max keyword to attribute to return the maximum attribute value of entities matching the molecule.

    for {
      _ <- Person.age.insert(25, 34, 37, 42, 70)
      _ <- Person.age(max).get.map(_.head ==> 70)
    } yield ()

    Apply max(n) to return Vector of the n biggest values.

    Person.age(max(3)).get.map(_.head ==> Vector(37, 42, 70))
    Definition Classes
    AggregateKeywords
    Note

    max/max(n) supports all value types (via comparators).
    max(n) Can at most return the number of values that match.

  6. trait maxs extends AnyRef
    Definition Classes
    AggregateKeywords
  7. trait median extends AnyRef

    Median of attribute values.

    Median of attribute values.

    Apply median keyword to attribute to return median of attribute values of entities matching the molecule.

    for {
      _ <- Match.sKeywords.insert(1, 2, 4)
      _ <- Match.score(median).get.map(_.head ==> 2)
    } yield ()

    OBS: When it comes to an even number of values, Datomic has a special implementation of median that is different from the one described on the Wiki entry on the median function.

    Datomic calculates the median of even number of values as the average of the two middle numbers rounded down to nearest whole number

    for {
      _ <- Match.sKeywords.insert(1, 2, 3, 4)
      _ <- Match.score(median).get.map(_.head ==> 2) // (2 + 3) / 2 = 2.5 rounded down to 2
    } yield ()

    With decimal numbers this can go wrong:

    for {
      _ <- Match.sKeywords.insert(1.0, 2.5, 2.5, 3.0)
      _ <- Match.score(median).get.map(_.head ==> 2) // (2.5 + 2.5) / 2 = 2.5 rounded down to 2 (This is wrong and bug report has been filed)
    } yield ()
    returns

    Value of Attribute type

    Definition Classes
    AggregateKeywords
  8. trait min extends AnyRef

    Minimum attribute value(s).

    Minimum attribute value(s).

    Apply min keyword to attribute to return the minimum attribute value of entities matching the molecule.

    for {
      _ <- Person.age.insert(25, 34, 37, 42, 70)
      _ <- Person.age(min).get.map(_.head ==> 25)
    } yield ()

    Apply min(n) to return Vector of the n smallest values.

    Person.age(min(3)).get.map(_.head ==> Vector(25, 34, 37))
    Definition Classes
    AggregateKeywords
    Note

    min/min(n) supports all value types (via comparators).
    min(n) Can at most return the number of values that match.

  9. trait mins extends AnyRef
    Definition Classes
    AggregateKeywords
  10. trait rand extends AnyRef

    Random attribute value(s).

    Random attribute value(s).

    Apply random keyword to attribute to return a single random attribute of entities matching the molecule.

    for {
      _ <- Person.age.insert(25, 34, 37, 42, 70)
      _ <- Person.age(random).get.map(_.head ==> 34) // or other..
    } yield ()

    Apply random(n) to return Vector of n random values. Observe though that duplicate random values can re-occur.

    Person.age(random(3)).get.map(_.head ==> Vector(42, 25, 42)) // or other..

    To get distinct values only, use the sample(n) keyword instead.

    Definition Classes
    AggregateKeywords
  11. trait rands extends AnyRef
    Definition Classes
    AggregateKeywords
  12. trait sample extends AnyRef

    Sample attribute value(s).

    Sample attribute value(s).

    Apply sample keyword to attribute to return a single sample (random) attribute value of entities matching the molecule.

    for {
      _ <- Person.age.insert(25, 34, 37, 42, 70)
      _ <- Person.age(sample).get.map(_.head ==> 42) // or other..
    } yield ()

    Apply sample(n) to return Vector of up to n distinct sample values.

    Person.age(sample(3)).get.map(_.head ==> Vector(70, 25, 37)) // or other..

    If values don't need to be distinct, random(n) can be used also.

    Definition Classes
    AggregateKeywords
    Note

    Can at most return the number of values that match.

  13. trait samples extends AnyRef
    Definition Classes
    AggregateKeywords
  14. trait stddev extends AnyRef

    Variance of attribute values.

    Variance of attribute values.

    Apply stddev keyword to attribute to return variance of attribute values of entities matching the molecule.

    for {
      _ <- Match.sKeywords.insert(1, 2, 4)
      _ <- Match.score(stddev).get.map(_.head ==> 1.247219128924647)
    } yield ()
    returns

    Double

    Definition Classes
    AggregateKeywords
  15. trait sum extends AnyRef

    Sum of attribute values.

    Sum of attribute values.

    Apply sum keyword to attribute to return sum of attribute values of entities matching the molecule.

    for {
      _ <- Match.sKeywords.insert(1, 2, 4)
      _ <- Match.score(sum).get.map(_.head ==> 7)
    } yield ()
    returns

    Value of Attribute type

    Definition Classes
    AggregateKeywords
  16. trait variance extends AnyRef

    Variance of attribute values.

    Variance of attribute values.

    Apply variance keyword to attribute to return variance of attribute values of entities matching the molecule.

    for {
      _ <- Match.sKeywords.insert(1, 2, 4)
      _ <- Match.score(variance).get.map(_.head ==> 1.5555555555555556)
    } yield ()
    returns

    Double

    Definition Classes
    AggregateKeywords
  17. trait AttrExpr[Ns, T] extends AnyRef

    Expression methods common for all attributes.

    Expression methods common for all attributes.

    Definition Classes
    AttrExpressions
  18. trait FulltextExpr[Ns, In] extends AnyRef

    Expression methods of String attributes with fulltext search.

    Expression methods of String attributes with fulltext search.

    Definition Classes
    AttrExpressions
  19. trait ManyAttrExpr[Ns, Add, OldNew, Rem] extends AnyRef

    Value update methods for card-many attributes.

    Value update methods for card-many attributes.

    Definition Classes
    AttrExpressions
  20. trait ManyExpr[Ns, In, T] extends ValueAttrExpr[Ns, In, T] with ManyAttrExpr[Ns, T, (T, T), T]

    Expression methods of card-many attributes.

    Expression methods of card-many attributes.

    Definition Classes
    AttrExpressions
  21. trait MapAttrExpr[Ns, In, T] extends ValueAttrExpr[Ns, In, T] with ManyAttrExpr[Ns, (String, T), (String, T), String]

    Expression methods of map attributes.

    Expression methods of map attributes.

    Definition Classes
    AttrExpressions
  22. trait OneExpr[Ns, In, T] extends ValueAttrExpr[Ns, In, T]

    Expression methods of card-one attributes.

    Expression methods of card-one attributes.

    Definition Classes
    AttrExpressions
  23. trait OptionalExpr[Ns, T] extends AnyRef

    Expression methods of optional attributes.

    Expression methods of optional attributes.

    Definition Classes
    AttrExpressions
  24. trait ValueAttrExpr[Ns, In, T] extends AttrExpr[Ns, T]

    Expression methods of value attributes.

    Expression methods of value attributes.

    Definition Classes
    AttrExpressions
  25. trait qm extends AnyRef
    Definition Classes
    AttrExpressions
  26. trait unify_stable extends AnyRef
    Definition Classes
    AttrExpressions
  27. class log extends AnyRef
    Definition Classes
    Helpers
  28. implicit class Regex extends AnyRef
    Definition Classes
    RegexMatching
  29. implicit class long2DatomicEntity extends DatomicEntity

    Convenience conversion from entity id to DatomicEntity api

    Convenience conversion from entity id to DatomicEntity api

    Definition Classes
    EntityOps

Value Members

  1. object AEVT extends AEVT_0_0_L0[AEVT_, Init] with FirstNS

    AEVT Index object to start AEVT Index molecule.

    AEVT Index object to start AEVT Index molecule.

    Definition Classes
    GenericAEVT
  2. object AVET extends AVET_0_0_L0[AVET_, Init] with FirstNS

    AVET Index object to start AVET Index molecule.

    AVET Index object to start AVET Index molecule.

    Definition Classes
    GenericAVET
  3. object EAVT extends EAVT_0_0_L0[EAVT_, Init] with FirstNS

    EAVT Index object to instantiate EAVT Index molecule.

    EAVT Index object to instantiate EAVT Index molecule.

    Definition Classes
    GenericEAVT
  4. object Log extends Log_0_0_L0[Log_, Init] with FirstNS

    Log object to start Log molecule.

    Log object to start Log molecule.

    Definition Classes
    GenericLog
  5. object Schema extends Schema_0_0_L0[Schema_, Init] with FirstNS

    Schema object to start Schema molecule.

    Schema object to start Schema molecule.

    Definition Classes
    GenericSchema
  6. object VAET extends VAET_0_0_L0[VAET_, Init] with FirstNS

    VAET Index object to start VAET reverse Index molecule.

    VAET Index object to start VAET reverse Index molecule.

    Definition Classes
    GenericVAET
  7. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. final def ##(): Int
    Definition Classes
    AnyRef → Any
  9. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  10. implicit val anyPickler: Pickler[Any]
    Definition Classes
    BooPicklers
  11. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  12. def bigDec(arg: Any): BigDecimal
    Attributes
    protected
    Definition Classes
    Helpers
  13. implicit final def bigDec2Model(v: BigDecimal): TermValue[BigDecimal]

    Definition Classes
    LogicImplicits
  14. implicit final def bigDecSet2Model(set: Set[BigDecimal]): TermValue[Set[BigDecimal]]

    Definition Classes
    LogicImplicits
  15. implicit final def bigInt2Model(v: BigInt): TermValue[BigInt]

    Definition Classes
    LogicImplicits
  16. implicit final def bigIntSet2Model(set: Set[BigInt]): TermValue[Set[BigInt]]

    Definition Classes
    LogicImplicits
  17. implicit final def boolean2Model(v: Boolean): TermValue[Boolean]

    Definition Classes
    LogicImplicits
  18. implicit final def booleanSet2Model(set: Set[Boolean]): TermValue[Set[Boolean]]

    Definition Classes
    LogicImplicits
  19. implicit def boopickleSerializerDeserializer[T](implicit arg0: boopickle.Default.Pickler[T]): SerializerDeserializer[T, ByteBuffer]
    Definition Classes
    BooPicklers
  20. def clean(attr: String): String
    Definition Classes
    Helpers
  21. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  22. implicit val connProxyPickler: CompositePickler[ConnProxy]
    Definition Classes
    BooPicklers
  23. implicit final def date2Model(v: Date): TermValue[Date]

    Definition Classes
    LogicImplicits
  24. def date2datomicStr(date: Date, zoneOffset: ZoneOffset = localZoneOffset): String
    Definition Classes
    DateHandling
  25. def date2datomicStr2(date: Date, zoneOffset: ZoneOffset = localZoneOffset): String
    Definition Classes
    DateHandling
  26. def date2str(date: Date, zoneOffset: ZoneOffset = localZoneOffset): String
    Definition Classes
    DateHandling
  27. implicit val datePickler: Pickler[Date]
    Definition Classes
    BooPicklers
  28. implicit final def dateSet2Model(set: Set[Date]): TermValue[Set[Date]]

    Definition Classes
    LogicImplicits
  29. def daylight(ms: Long): Int
    Definition Classes
    DateHandling
  30. def double(arg: Any): String
    Attributes
    protected
    Definition Classes
    Helpers
  31. implicit final def double2Model(v: Double): TermValue[Double]

    Definition Classes
    LogicImplicits
  32. implicit final def doubleSet2Model(set: Set[Double]): TermValue[Set[Double]]

    Definition Classes
    LogicImplicits
  33. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  34. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  35. def escStr(s: String): String
    Definition Classes
    Helpers
  36. implicit val exPickler: CompositePickler[Throwable]
    Definition Classes
    BooPicklers
  37. def expandDateStr(dateStr: String): String
    Definition Classes
    DateHandling
  38. final def f(a: Any): Any
    Attributes
    protected
    Definition Classes
    Helpers
  39. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  40. def firstNs(model: Model): String
    Definition Classes
    Helpers
  41. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  42. def getKwName(kw: String): String
    Definition Classes
    Helpers
  43. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  44. def inspectRetract(eids: Iterable[Long], txMetaDataMolecules: Molecule*)(implicit conn: Future[Conn], ec: ExecutionContext): Future[Unit]

    Inspect retracting multiple entities with optional transaction meta data.

    Inspect retracting multiple entities with optional transaction meta data.

    Without affecting the database, a multiple entity retract action can be inspected by calling the inspectRetract method.

    Here we inspect a possible retraction of two comment entities with transaction meta data asserting that the retraction was done by Ben Goodman:

    inspectRetract(eids, Ref2.str2("meta2"), Ref1.str1("meta1"))

    This will print inspecting info about the retraction to output (without affecting the database):

    ## 1 ## molecule.core.Datomic.inspectRetract
    =============================================================================
    Model(
      TxMetaData(
        Atom("Ref2", "str2", "String", 1, Eq(Seq("meta2")), None, Seq(), Seq()))
      TxMetaData(
        Atom("Ref1", "str1", "String", 1, Eq(Seq("meta1")), None, Seq(), Seq())))
    -----------------------------------------------------------------------------
    List(
      Add(tx,:Ref2/str2,Values(Eq(Seq("meta2")),None),Card(1)),
      Add(tx,:Ref1/str1,Values(Eq(Seq("meta1")),None),Card(1)))
    -----------------------------------------------------------------------------
    List(
      list(
        RetractEntity(17592186045453),
        RetractEntity(17592186045454),
        Add(datomic.tx,:Ref2/str2,meta2,Card(1)),
        Add(datomic.tx,:Ref1/str1,meta1,Card(1))))
    =============================================================================
    eids

    Iterable of entity ids of type Long

    txMetaDataMolecules

    Zero or more transaction meta data molecules

    conn

    Implicit Conn value in scope

    returns

    Unit (prints to output)

    Definition Classes
    EntityOps
  45. def inspectTransactBundle(stmtss: Future[Seq[Statement]]*)(implicit conn: Future[Conn], ec: ExecutionContext): Future[Unit]

    Inspect transaction bundle statements

    Add transaction statements from one or more molecule actions to inspectTransact to see the bundled transaction statements.

    Inspect transaction bundle statements

    Add transaction statements from one or more molecule actions to inspectTransact to see the bundled transaction statements.

    for {
      _ <- inspectTransact(
        // retract
        e1.getRetractStmts,
        // save
        Ns.int(4).getSaveStmts,
        // insert
        Ns.int.getInsertStmts(List(5, 6)),
        // update
        Ns(e2).int(20).getUpdateStmts
      )
    } yield ()
    
    // Prints transaction data to output:
    /*
      ## 1 ## TxReport
      ========================================================================
      1          ArrayBuffer(
        1          List(
          1          :db/retractEntity   17592186045445)
        2          List(
          1          :db/add       #db/id[:db.part/user -1000247]     :Ns/int          4           Card(1))
        3          List(
          1          :db/add       #db/id[:db.part/user -1000252]     :Ns/int          5           Card(1))
        4          List(
          1          :db/add       #db/id[:db.part/user -1000253]     :Ns/int          6           Card(1))
        5          List(
          1          :db/add       17592186045446                     :Ns/int          20          Card(1)))
      ------------------------------------------------
      2          List(
        1    1     added: true ,   t: 13194139534345,   e: 13194139534345,   a: 50,   v: Wed Nov 14 23:38:15 CET 2018
    
        2    2     added: false,  -t: 13194139534345,  -e: 17592186045445,  -a: 64,  -v: 1
    
        3    3     added: true ,   t: 13194139534345,   e: 17592186045450,   a: 64,   v: 4
    
        4    4     added: true ,   t: 13194139534345,   e: 17592186045451,   a: 64,   v: 5
    
        5    5     added: true ,   t: 13194139534345,   e: 17592186045452,   a: 64,   v: 6
    
        6    6     added: true ,   t: 13194139534345,   e: 17592186045446,   a: 64,   v: 20
             7     added: false,  -t: 13194139534345,  -e: 17592186045446,  -a: 64,  -v: 2)
      ========================================================================
    */
    stmtss

    Statement's from multiple molecule operations

    conn

    Implicit Conn value in scope

    Definition Classes
    TxBundles
  46. macro def inspectTransactFn(txFnCall: Future[Seq[Statement]], txMolecules: Molecule*)(implicit conn: Future[Conn], ec: ExecutionContext): Future[Unit]

    Inspect tx function invocation

    Print transaction statements to output of a tx function invocation without affecting the live database.

    Inspect tx function invocation

    Print transaction statements to output of a tx function invocation without affecting the live database.

    for {
      // Print inspect info for tx function invocation
      _ <- inspectTransact(transfer(fromAccount, toAccount, 20))
    } yield ()
    
    // Prints produced tx statements to output:
    /*
    ## 1 ## TxReport
    ========================================================================
    1          ArrayBuffer(
      1          List(
        1          :db/add       17592186045445       :Account/balance    80        Card(1))
      2          List(
        1          :db/add       17592186045447       :Account/balance    720       Card(1)))
    ------------------------------------------------
    2          List(
      1    1     added: true ,   t: 13194139534345,   e: 13194139534345,   a: 50,   v: Thu Nov 22 16:23:09 CET 2018
    
      2    2     added: true ,   t: 13194139534345,   e: 17592186045445,   a: 64,   v: 80
           3     added: false,  -t: 13194139534345,  -e: 17592186045445,  -a: 64,  -v: 100
    
      3    4     added: true ,   t: 13194139534345,   e: 17592186045447,   a: 64,   v: 720
           5     added: false,  -t: 13194139534345,  -e: 17592186045447,  -a: 64,  -v: 700)
    ========================================================================
    */
    txFnCall

    Tx function invocation

    txMolecules

    Optional tx meta data molecules

    Definition Classes
    TxFunctions
  47. implicit final def int2Model(v: Int): TermValue[Int]

    Definition Classes
    LogicImplicits
  48. implicit final def intSet2Model(set: Set[Int]): TermValue[Set[Int]]

    Definition Classes
    LogicImplicits
  49. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  50. def jsNumber(tpe: String, v: Any): Any
    Definition Classes
    Helpers
  51. def localOffset: String
    Definition Classes
    DateHandling
  52. def localZoneOffset: ZoneOffset
    Definition Classes
    DateHandling
  53. implicit final def long2Model(v: Long): TermValue[Long]

    Definition Classes
    LogicImplicits
  54. implicit final def longSet2Model(set: Set[Long]): TermValue[Set[Long]]

    Definition Classes
    LogicImplicits
  55. implicit final macro def m[obj[_], props, T1, T2, T3, T4, T5](dsl: Composite_0_05[obj, props, T1, T2, T3, T4, T5]): Molecule_0_05[props, T1, T2, T3, T4, T5]
    Definition Classes
    CompositeFactory_0_5
  56. implicit final macro def m[obj[_], props, T1, T2, T3, T4](dsl: Composite_0_04[obj, props, T1, T2, T3, T4]): Molecule_0_04[props, T1, T2, T3, T4]
    Definition Classes
    CompositeFactory_0_5
  57. implicit final macro def m[obj[_], props, T1, T2, T3](dsl: Composite_0_03[obj, props, T1, T2, T3]): Molecule_0_03[props, T1, T2, T3]
    Definition Classes
    CompositeFactory_0_5
  58. implicit final macro def m[obj[_], props, T1, T2](dsl: Composite_0_02[obj, props, T1, T2]): Molecule_0_02[props, T1, T2]
    Definition Classes
    CompositeFactory_0_5
  59. implicit final macro def m[obj[_], props, T1](dsl: Composite_0_01[obj, props, T1]): Molecule_0_01[props, T1]
    Definition Classes
    CompositeFactory_0_5
  60. implicit final macro def m[obj[_], props, A, B, C, D, E, F, G](dsl: NS_0_07[obj, props, A, B, C, D, E, F, G]): Molecule_0_07[props, A, B, C, D, E, F, G]
    Definition Classes
    Molecule_Factory7
  61. implicit final macro def m[obj[_], props, A, B, C, D, E, F](dsl: NS_0_06[obj, props, A, B, C, D, E, F]): Molecule_0_06[props, A, B, C, D, E, F]
    Definition Classes
    Molecule_Factory7
  62. implicit final macro def m[obj[_], props, A, B, C, D, E](dsl: NS_0_05[obj, props, A, B, C, D, E]): Molecule_0_05[props, A, B, C, D, E]
    Definition Classes
    Molecule_Factory7
  63. implicit final macro def m[obj[_], props, A, B, C, D](dsl: NS_0_04[obj, props, A, B, C, D]): Molecule_0_04[props, A, B, C, D]
    Definition Classes
    Molecule_Factory7
  64. implicit final macro def m[obj[_], props, A, B, C](dsl: NS_0_03[obj, props, A, B, C]): Molecule_0_03[props, A, B, C]
    Definition Classes
    Molecule_Factory7
  65. implicit final macro def m[obj[_], props, A, B](dsl: NS_0_02[obj, props, A, B]): Molecule_0_02[props, A, B]
    Definition Classes
    Molecule_Factory7
  66. implicit final macro def m[obj[_], props, A](dsl: NS_0_01[obj, props, A]): Molecule_0_01[props, A]
    Definition Classes
    Molecule_Factory7
  67. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  68. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  69. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  70. final def o(opt: Option[Any]): String
    Definition Classes
    Helpers
  71. final def os(opt: Option[Set[_]]): String
    Definition Classes
    Helpers
  72. def pad(longest: Int, shorter: Int): String
    Definition Classes
    Helpers
  73. def padS(longest: Int, str: String): String
    Definition Classes
    Helpers
  74. final def render(value: Any): String
    Definition Classes
    Helpers
  75. def retract(eids: Iterable[Long], txMetaDataMolecules: Molecule*)(implicit conn: Future[Conn], ec: ExecutionContext): Future[TxReport]

    Retract multiple entities with optional transaction meta data.

    Retract multiple entities with optional transaction meta data.

    0 or more transaction meta data molecules can be asserted together with a retraction of entities.

    Here we retract two comment entities with transaction meta data asserting that the retraction was done by Ben Goodman:

    retract(Seq(commentEid1, commentEid2), MetaData.user("Ben Goodman"))

    We can then later see what comments Ben Goodman retracted (op_(false)):

    Comment.e.text.op_(false).Tx(MetaData.user_("Ben Goodman")).getHistory.map(_ ==> List(
      (commentEid1, "I like this"),
      (commentEid2, "I hate this")
    )
    eids

    Iterable of entity ids of type Long

    txMetaDataMolecules

    Zero or more transaction meta data molecules

    conn

    Implicit Conn value in scope

    returns

    TxReport with result of retract

    Definition Classes
    EntityOps
  76. final def sq[T](values: Seq[T]): String
    Definition Classes
    Helpers
  77. def str2date(s: String, zoneOffset: ZoneOffset = localZoneOffset): Date
    Definition Classes
    DateHandling
  78. def str2zdt(s: String, zoneOffset: ZoneOffset = localZoneOffset): ZonedDateTime
    Definition Classes
    DateHandling
  79. implicit final def string2Model(v: String): TermValue[String]

    Definition Classes
    LogicImplicits
  80. implicit final def stringSet2Model(set: Set[String]): TermValue[Set[String]]

    Definition Classes
    LogicImplicits
  81. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  82. def thousands(i: Long): String
    Definition Classes
    Helpers
  83. final def time(n: Int, prev: Int = 0): Unit
    Attributes
    protected
    Definition Classes
    Helpers
  84. def toString(): String
    Definition Classes
    AnyRef → Any
  85. def transactBundle(stmtss: Future[Seq[Statement]]*)(implicit conn: Future[Conn], ec: ExecutionContext): Future[TxReport]

    Transact bundled transaction statements

    Transact bundled transaction statements

    Supply transaction statements of one or more molecule actions to asynchronously transact a single atomic transaction.

    transactBundle(
      e1.getRetractStmts,
      Ns.int(4).getSaveStmts,
      Ns.int.getInsertStmts(List(5, 6)),
      Ns(e2).int(20).getUpdateStmts
    ) map { bundleTx =>
      Ns.int.getAsync.map(_ ==> List(3, 4, 5, 6, 20))
    }
    stmtss

    Statement's from multiple molecule operations

    conn

    Implicit Conn value in scope

    returns

    Future with TxReport with result of transaction

    Definition Classes
    TxBundles
  86. macro def transactFn(txFnCall: Future[Seq[Statement]], txMolecules: Molecule*)(implicit conn: Future[Conn], ec: ExecutionContext): Future[TxReport]

    Invoke tx function

    Macro that takes a tx function invocation itself as its argument.

    Invoke tx function

    Macro that takes a tx function invocation itself as its argument. The tx function is analyzed by the macro and the necessary transaction preparations done at compile time.

    At runtime, the returned statements from the tx function transacted as one atomic transaction using Datomic's asynchronous API.

    for {
      // Transact transfer
      _ <- transactFn(
        transfer(fromAccount, toAccount, 20)
      )
    
      // Amount has been transferred safely
      _ <- Account(fromAccount).balance.get.map(_.head ==> 80)
      _ <- Account(toAccount).balance.get.map(_.head ==> 720)
    } yield ()

    Additional transaction meta data can be added

    for {
      _ <- transactFn(
        transfer(fromAccount, toAccount, 20),
    
        // Tx meta data that John made the transfer
        Person.name("John"),
    
        // Tx meta data that the transfer was part of use case "Scheduled transfer)
        UseCase.name("Scheduled transfer")
      )
    
      _ <- Account(fromAccount).balance
        .Tx(Person.name_("John") + UseCase.name_("Scheduled transfer"))
        .get.map(_.head ==> 80)
    } yield ()
    txFnCall

    Tx function invocation

    txMolecules

    Optional tx meta data molecules

    returns

    Future with TxReport with result of transaction

    Definition Classes
    TxFunctions
  87. def truncateDateStr(dateStr: String): String
    Definition Classes
    DateHandling
  88. implicit final def tuple2Model[A, B](tpl: (A, B)): TermValue[(A, B)]

    Definition Classes
    LogicImplicits
  89. final def tupleToSeq(arg: Any): Seq[Any]
    Attributes
    protected
    Definition Classes
    Helpers
  90. def unescStr(s: String): String
    Definition Classes
    Helpers
  91. final def untupled(rawData: Iterable[Seq[Any]]): Iterable[Seq[Any]]
    Definition Classes
    Helpers
  92. implicit final def uri2Model(v: URI): TermValue[URI]

    Definition Classes
    LogicImplicits
  93. implicit val uriPickler: Pickler[URI]
    Definition Classes
    BooPicklers
  94. implicit final def uriSet2Model(set: Set[URI]): TermValue[Set[URI]]

    Definition Classes
    LogicImplicits
  95. implicit final def uuid2Model(v: UUID): TermValue[UUID]

    Definition Classes
    LogicImplicits
  96. implicit final def uuidSet2Model(set: Set[UUID]): TermValue[Set[UUID]]

    Definition Classes
    LogicImplicits
  97. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  98. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  99. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  100. def zone: ZoneId
    Definition Classes
    DateHandling
  101. object avg extends core.api.Keywords.avg
    Definition Classes
    Keywords
  102. object count extends core.api.Keywords.count
    Definition Classes
    Keywords
  103. object countDistinct extends core.api.Keywords.countDistinct
    Definition Classes
    Keywords
  104. object distinct extends core.api.Keywords.distinct
    Definition Classes
    Keywords
  105. object max extends core.api.Keywords.max
    Definition Classes
    Keywords
  106. object median extends core.api.Keywords.median
    Definition Classes
    Keywords
  107. object min extends core.api.Keywords.min
    Definition Classes
    Keywords
  108. object rand extends core.api.Keywords.rand
    Definition Classes
    Keywords
  109. object sample extends core.api.Keywords.sample
    Definition Classes
    Keywords
  110. object stddev extends core.api.Keywords.stddev
    Definition Classes
    Keywords
  111. object sum extends core.api.Keywords.sum
    Definition Classes
    Keywords
  112. object unify extends core.expression.AttrExpressions.unify_stable

    Unify attribute value in self-join.

    Unify attribute value in self-join.

    Apply unify marker to attribute to unify its value with previous values of the same attribute in the molecule in a self-join.

    for {
      _ <- m(Person.age.name.Beverages * Beverage.name.rating) insert List(
        (23, "Joe", List(("Coffee", 3), ("Cola", 2), ("Pepsi", 3))),
        (25, "Ben", List(("Coffee", 2), ("Tea", 3))),
        (23, "Liz", List(("Coffee", 1), ("Tea", 3), ("Pepsi", 1))))
    
      // What beverages do pairs of 23- AND 25-year-olds like in common?
      // Drink name is unified - Joe and Ben both drink coffee, etc..
      _ <- Person.age_(23).name.Beverages.name._Ns.Self
          .age_(25).name.Beverages.name_(unify).get.map(_.sorted ==> List(
        ("Joe", "Coffee", "Ben"),
        ("Liz", "Coffee", "Ben"),
        ("Liz", "Tea", "Ben")
      ))
    } yield ()
    Definition Classes
    Keywords
  113. object variance extends core.api.Keywords.variance
    Definition Classes
    Keywords

Inherited from CompositeFactory_0_5

Inherited from Molecule_Factory7

Inherited from api

Inherited from GenericVAET

Inherited from GenericEAVT

Inherited from GenericAVET

Inherited from GenericAEVT

Inherited from GenericLog

Inherited from GenericSchema

Inherited from TxFunctions

Inherited from TxBundles

Inherited from BooPicklers

Inherited from Helpers

Inherited from DateHandling

Inherited from RegexMatching

Inherited from EntityOps

Inherited from LogicImplicits

Inherited from Keywords

Inherited from AttrExpressions

Inherited from AggregateKeywords

Inherited from AnyRef

Inherited from Any

Entity operations

Bundled transactions

Multiple molecule operations in one atomic transaction.

Transaction functions

Atomic transaction logic with access to tx database value.

Attribute markers

Markers applied to attributes that change the semantics of the attribute/molecule.

Expression implicits

Turns basic types into TermValue's that can be used in Expression

Aggregate keywords

Keywords applied to attributes that return aggregated value(s).

Number aggregation keywords

Keywords applied to number attributes that return aggregated value(s).

Ungrouped