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.
    generic Interfaces to generic information about datoms and Datomic database.
    input Input molecules awaiting input.
    macro Internal macros generating molecule code from custom DSL molecule constructs.
    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 api

    Public interface to be imported to use Molecule.

    Public interface to be imported to use Molecule.

    To make the Molecule macro materializations as fast as possible we try to import as few macro implicits as possible. If your application code build molecules with at the most 10 attributes, then you can do the following import to start using Molecule:

    import molecule.api.out10._

    out means "output molecule" , and 10 the maximum arity or number of attributes of your molecules.

    If you use input molecules awaiting an input then you can add inX where X is how many inputs (1, 2 or 3) you will use, for instance:

    import molecule.api.in2_out10._

    This way we keep the implicit macro def lookups to a minimum and compilation speed as fast as possible.

    Arities can be changed anytime you like. But not to a lower arity than that of the molecules you use in scope of the import.

    Definition Classes
    molecule
  • package exception
    Definition Classes
    api
  • package get

    Synchronous getter methods to retrieve data from Datomic.

    Synchronous getter methods to retrieve data from Datomic.

    The Datomic On-Prem(ises) server model provides a Peer that returns data synchronously. The Peer which lives in application memory caches data aggressively and for data fitting in memory latency can be extremely low and queries return very fast. And even when access to disk is needed, clever branching is used. Memcached is also an option.

    The Datomic Cloud model data returns data asynchronously. If Datomic creates a Java API for the Cloud model, Molecule could relatively easy adapt to this model too. In the meanwhile, Future-wrapped methods in this package can be used.

    Molecule has 5 groups of synchronous getters, each returning data in various formats:

    • GetArray - fastest retrieved typed data set. Can be traversed with a fast while loop
    • GetIterable - for lazily traversing row by row
    • GetJson - data formatted as Json string
    • GetList - default getter returning Lists of tuples. Convenient typed data, suitable for smaller data sets
    • GetRaw - fastest retrieved raw un-typed data from Datomic

    Getters in each of the 5 groups come with 5 time-dependent variations:

    • get [current data]
    • getAsOf
    • getSince
    • getWith
    • getHistory

    Each time variation has various overloads taking different parameters (see each group for more info).

    Definition Classes
    api
    See also

    equivalent asynchronous getters in the getAsync package.

  • package getAsync

    Asynchronous getter methods to retrieve data from Datomic.

    Asynchronous getter methods to retrieve data from Datomic.

    For convenience, all synchronous getter methods from the get package are here wrapped in Futures.

    The Datomic On-Prem(ises) server model provides a Peer that returns data synchronously. The Peer which lives in application memory caches data aggressively and for data fitting in memory latency can be extremely low and queries return very fast. And even when access to disk is needed, clever branching is used. Memcached is also an option.

    The Datomic Cloud model data returns data asynchronously. If Datomic creates a Java API for the Cloud model, Molecule could relatively easy adapt to this model too. In the meanwhile, Future-wrapped methods in this package can be used.

    Molecule has 5 groups of asynchronous getters, each returning Futures of data in various formats:

    • GetAsyncArray - fastest retrieved typed data set. Can be traversed with a fast while loop
    • GetAsyncIterable - for lazily traversing row by row
    • GetAsyncJson - data formatted as Json string
    • GetAsyncList - default getter returning Lists of tuples. Convenient typed data, suitable for smaller data sets
    • GetAsyncRaw - fastest retrieved raw un-typed data from Datomic

    Getters in each of the 5 groups come with 5 time-dependent variations:

    • getAsync [current data]
    • getAsyncAsOf
    • getAsyncSince
    • getAsyncWith
    • getAsyncHistory

    Each time variation has various overloads taking different parameters (see each group for more info).

    Definition Classes
    api
    See also

    equivalent synchronous getters in the get package.

  • Entity
  • EntityOps
  • Molecule
  • OptionalMapOps
  • ShowDebug
  • TxMethods
  • core
  • in1_out1
  • in1_out10
  • in1_out11
  • in1_out12
  • in1_out13
  • in1_out14
  • in1_out15
  • in1_out16
  • in1_out17
  • in1_out18
  • in1_out19
  • in1_out2
  • in1_out20
  • in1_out21
  • in1_out22
  • in1_out3
  • in1_out4
  • in1_out5
  • in1_out6
  • in1_out7
  • in1_out8
  • in1_out9
  • in2_out1
  • in2_out10
  • in2_out11
  • in2_out12
  • in2_out13
  • in2_out14
  • in2_out15
  • in2_out16
  • in2_out17
  • in2_out18
  • in2_out19
  • in2_out2
  • in2_out20
  • in2_out21
  • in2_out22
  • in2_out3
  • in2_out4
  • in2_out5
  • in2_out6
  • in2_out7
  • in2_out8
  • in2_out9
  • in3_out1
  • in3_out10
  • in3_out11
  • in3_out12
  • in3_out13
  • in3_out14
  • in3_out15
  • in3_out16
  • in3_out17
  • in3_out18
  • in3_out19
  • in3_out2
  • in3_out20
  • in3_out21
  • in3_out22
  • in3_out3
  • in3_out4
  • in3_out5
  • in3_out6
  • in3_out7
  • in3_out8
  • in3_out9
  • out1
  • out10
  • out11
  • out12
  • out13
  • out14
  • out15
  • out16
  • out17
  • out18
  • out19
  • out2
  • out20
  • out21
  • out22
  • out3
  • out4
  • out5
  • out6
  • out7
  • out8
  • out9

trait Molecule[Tpl] extends MoleculeBase with CastHelpers[Tpl] with JsonBuilder with GetArray[Tpl] with GetIterable[Tpl] with GetList[Tpl] with GetRaw with GetJson with GetAsyncArray[Tpl] with GetAsyncIterable[Tpl] with GetAsyncList[Tpl] with GetAsyncRaw with GetAsyncJson with ShowDebug[Tpl]

Core molecule interface defining actions that can be called on molecules.

Groups of interfaces:

get getAsync Get molecule data.
getAsOf getAsyncAsOf Get molecule data asOf point in time.
getSince getAsyncSince Get molecule data since point in time.
getWith getAsyncWith Get molecule data with given data set.
getHistory getAsyncHistory     Get molecule data from history of database.
save saveAsync Save molecule with applied data.
insert insertAsync Insert multiple rows of data matching molecule.
update updateAsync Update molecule with applied data.
tx Molecule transaction data (input to `getWith`).
debug get Debug calling get method on molecule.
debug operation     Debug calling save/insert/update method on molecule.

Tpl

Type of molecule (tuple of its attribute types)

Source
Molecule.scala
See also

For retract ("delete") methods, see EntityOps and Entity.

Manual: get, time, asOf/since, history, with, getJson, debug/test, save, insert, update, retract

Tests: get, asOf, since, history, with, test asOf, test since, test with, getJson, save, insert, retract,

update, update map, update ref, update multiple attributes, update multiple entities

Linear Supertypes
ShowDebug[Tpl], GetAsyncJson, GetAsyncRaw, GetAsyncList[Tpl], GetAsyncIterable[Tpl], GetAsyncArray[Tpl], GetJson, GetRaw, GetList[Tpl], GetIterable[Tpl], GetArray[Tpl], JsonBuilder, CastHelpers[Tpl], Helpers, MoleculeBase, AnyRef, Any
Ordering
  1. Grouped
  2. Alphabetic
  3. By Inheritance
Inherited
  1. Molecule
  2. ShowDebug
  3. GetAsyncJson
  4. GetAsyncRaw
  5. GetAsyncList
  6. GetAsyncIterable
  7. GetAsyncArray
  8. GetJson
  9. GetRaw
  10. GetList
  11. GetIterable
  12. GetArray
  13. JsonBuilder
  14. CastHelpers
  15. Helpers
  16. MoleculeBase
  17. AnyRef
  18. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. trait checkInsertModel extends AnyRef

    Insert data is verified on instantiation of insert object in each arity molecule

    Insert data is verified on instantiation of insert object in each arity molecule

    Attributes
    protected
  2. trait debugInsert extends AnyRef

    Debug call to insert on a molecule (without affecting the db).

    Debug call to insert on a molecule (without affecting the db).

    Prints internal molecule transformation representations to output:

    Model --> Generic statements --> Datomic statements

  3. trait getInsertTx extends AnyRef

    Get transaction statements of a call to insert on a molecule (without affecting the db).

    Get transaction statements of a call to insert on a molecule (without affecting the db).

    returns

    Transaction statements

  4. trait insert extends AnyRef

    Insert one or more rows of data matching molecule.

    Insert one or more rows of data matching molecule.

    Returns Future with TxReport having info about the result of the insert transaction.

    Data matching the types of the molecule can be inserted either as individual args or an Iterable (List, Set etc) of tuples:

    // Insert single row of data with individual args
    Person.name.age.insert("Ann", 28)
    
    // Insert multiple rows of data. Accepts Iterable[Tpl]
    Person.name.age insert List(
      ("Ben", 42),
      ("Liz", 37)
    )
    
    // Data was inserted
    Person.name.age.get.sorted === List(
      ("Ann", 28),
      ("Ben", 42),
      ("Liz", 37)
    )

    Each insert apply method returns a TxReport with info about the result of the transaction.

    Since insert is an object of each arity 1-22 Molecule implementation, we can make an "insert-molecule" at compile time that we can re-use for inserting data at runtime matching the molecule type:

    // At compiletime:
    
    // Make insert-molecule
    val insertPersonsWithAge = Person.name.age.insert
    
    // At runtime:
    
    // Apply individual args matching insert-molecule to insert single row
    insertPersonsWithAge("Ann", 28)
    
    // .. or apply Iterable of tuples matching insert-molecule to insert multiple rows
    insertPersonsWithAge(
      List(
        ("Ben", 42),
        ("Liz", 37)
      )
    )
    
    // Data was inserted
    Person.name.age.get.sorted === List(
      ("Ann", 28),
      ("Ben", 42),
      ("Liz", 37)
    )

    The insert operation is synchronous and blocking. Use insertAsync for non-blocking asynchronous inserts.

  5. trait insertAsync extends AnyRef

    Asynchronously insert one or more rows of data matching molecule.

    Asynchronously insert one or more rows of data matching molecule.

    Returns Future with TxReport having info about the result of the insert transaction.

    Data matching the types of the molecule can be inserted either as individual args or an Iterable (List, Set etc) of tuples:

    // Insert single row of data with individual args
    val singleInsertFuture: Future[TxReport] = Person.name.age.insertAsync("Ann", 28)
    
    // Insert multiple rows of data. Accepts Iterable[Tpl]
    val multipleInsertFuture: Future[TxReport] = Person.name.age insertAsync List(
      ("Ben", 42),
      ("Liz", 37)
    )
    
    for {
      _ <- singleInsertFuture
      _ <- multipleInsertFuture
      result <- Person.name.age.getAsync
    } yield {
      // Both inserts applied
      result === List(
        ("Ann", 28),
        ("Ben", 42),
        ("Liz", 37)
      )
    }

    The insert operation is asynchronous and non-blocking. Internally calls Datomic's asynchronous API.

Abstract Value Members

  1. abstract val _model: Model

    Internal Model representation of molecule.

    Internal Model representation of molecule.

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

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

    Definition Classes
    MoleculeBase
  2. abstract val _nestedQuery: Option[Query]

    Internal optional Query representation of nested molecule with added entity search for each level.

    Internal optional Query representation of nested molecule with added entity search for each level.

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

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

    Definition Classes
    MoleculeBase
  3. abstract val _query: Query

    Internal Query representation of molecule.

    Internal Query representation of molecule.

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

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

    Definition Classes
    MoleculeBase

Concrete 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. def _debugInsert(conn: Conn, dataRows: Iterable[Seq[Any]]): Unit
    Attributes
    protected
    Definition Classes
    ShowDebug
  5. def _getInsertTx(conn: Conn, dataRows: Iterable[Seq[Any]]): Seq[Seq[Statement]]
    Attributes
    protected
  6. def _insert(conn: Conn, model: Model, dataRows: Iterable[Seq[Any]]): TxReport
    Attributes
    protected
  7. def _insertAsync(conn: Conn, model: Model, dataRows: Iterable[Seq[Any]])(implicit ec: ExecutionContext): Future[TxReport]
    Attributes
    protected
  8. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  9. final def cast(value: Any): String
    Attributes
    protected
    Definition Classes
    Helpers
  10. def castAggrLazySeq[T](row: List[_], i: Int): T
    Attributes
    protected
    Definition Classes
    CastHelpers
  11. def castAggrLazySeqBigDecimal(row: List[_], i: Int): BigDecimal
    Attributes
    protected
    Definition Classes
    CastHelpers
  12. def castAggrLazySeqBigInt(row: List[_], i: Int): BigInt
    Attributes
    protected
    Definition Classes
    CastHelpers
  13. def castAggrLazySeqDouble(row: List[_], i: Int): Float
    Attributes
    protected
    Definition Classes
    CastHelpers
  14. def castAggrLazySeqInt(row: List[_], i: Int): Int
    Attributes
    protected
    Definition Classes
    CastHelpers
  15. def castAggrListHashSet[T](row: List[_], i: Int): List[T]
    Attributes
    protected
    Definition Classes
    CastHelpers
  16. def castAggrListHashSetBigDecimal(row: List[_], i: Int): List[BigDecimal]
    Attributes
    protected
    Definition Classes
    CastHelpers
  17. def castAggrListHashSetBigInt(row: List[_], i: Int): List[BigInt]
    Attributes
    protected
    Definition Classes
    CastHelpers
  18. def castAggrListHashSetFloat(row: List[_], i: Int): List[Float]
    Attributes
    protected
    Definition Classes
    CastHelpers
  19. def castAggrListHashSetInt(row: List[_], i: Int): List[Int]
    Attributes
    protected
    Definition Classes
    CastHelpers
  20. def castAggrListLazySeq[T](row: List[_], i: Int): List[T]
    Attributes
    protected
    Definition Classes
    CastHelpers
  21. def castAggrListLazySeqBigDecimal(row: List[_], i: Int): List[BigDecimal]
    Attributes
    protected
    Definition Classes
    CastHelpers
  22. def castAggrListLazySeqBigInt(row: List[_], i: Int): List[BigInt]
    Attributes
    protected
    Definition Classes
    CastHelpers
  23. def castAggrListLazySeqFloat(row: List[_], i: Int): List[Float]
    Attributes
    protected
    Definition Classes
    CastHelpers
  24. def castAggrListLazySeqInt(row: List[_], i: Int): List[Int]
    Attributes
    protected
    Definition Classes
    CastHelpers
  25. def castAggrListVector[T](row: List[_], i: Int): List[T]
    Attributes
    protected
    Definition Classes
    CastHelpers
  26. def castAggrListVectorBigDecimal(row: List[_], i: Int): List[BigDecimal]
    Attributes
    protected
    Definition Classes
    CastHelpers
  27. def castAggrListVectorBigInt(row: List[_], i: Int): List[BigInt]
    Attributes
    protected
    Definition Classes
    CastHelpers
  28. def castAggrListVectorFloat(row: List[_], i: Int): List[Float]
    Attributes
    protected
    Definition Classes
    CastHelpers
  29. def castAggrListVectorInt(row: List[_], i: Int): List[Int]
    Attributes
    protected
    Definition Classes
    CastHelpers
  30. def castAggrVector[T](row: List[_], i: Int): T
    Attributes
    protected
    Definition Classes
    CastHelpers
  31. def castAggrVectorBigDecimal(row: List[_], i: Int): BigDecimal
    Attributes
    protected
    Definition Classes
    CastHelpers
  32. def castAggrVectorBigInt(row: List[_], i: Int): BigInt
    Attributes
    protected
    Definition Classes
    CastHelpers
  33. def castAggrVectorDouble(row: List[_], i: Int): Float
    Attributes
    protected
    Definition Classes
    CastHelpers
  34. def castAggrVectorInt(row: List[_], i: Int): Int
    Attributes
    protected
    Definition Classes
    CastHelpers
  35. def castMany[T](row: List[_], i: Int): Set[T]
    Attributes
    protected
    Definition Classes
    CastHelpers
  36. def castManyBigDecimal(row: List[_], i: Int): Set[BigDecimal]
    Attributes
    protected
    Definition Classes
    CastHelpers
  37. def castManyBigInt(row: List[_], i: Int): Set[BigInt]
    Attributes
    protected
    Definition Classes
    CastHelpers
  38. def castManyEnum(row: List[_], i: Int): Set[String]
    Attributes
    protected
    Definition Classes
    CastHelpers
  39. def castManyFloat(row: List[_], i: Int): Set[Float]
    Attributes
    protected
    Definition Classes
    CastHelpers
  40. def castManyInt(row: List[_], i: Int): Set[Int]
    Attributes
    protected
    Definition Classes
    CastHelpers
  41. def castMapBigDecimal(row: List[_], i: Int): Map[String, BigDecimal]
    Attributes
    protected
    Definition Classes
    CastHelpers
  42. def castMapBigInt(row: List[_], i: Int): Map[String, BigInt]
    Attributes
    protected
    Definition Classes
    CastHelpers
  43. def castMapBoolean(row: List[_], i: Int): Map[String, Boolean]
    Attributes
    protected
    Definition Classes
    CastHelpers
  44. def castMapDate(row: List[_], i: Int): Map[String, Date]
    Attributes
    protected
    Definition Classes
    CastHelpers
  45. def castMapDouble(row: List[_], i: Int): Map[String, Double]
    Attributes
    protected
    Definition Classes
    CastHelpers
  46. def castMapFloat(row: List[_], i: Int): Map[String, Float]
    Attributes
    protected
    Definition Classes
    CastHelpers
  47. def castMapInt(row: List[_], i: Int): Map[String, Int]
    Attributes
    protected
    Definition Classes
    CastHelpers
  48. def castMapLong(row: List[_], i: Int): Map[String, Long]
    Attributes
    protected
    Definition Classes
    CastHelpers
  49. def castMapString(row: List[_], i: Int): Map[String, String]
    Attributes
    protected
    Definition Classes
    CastHelpers
  50. def castMapURI(row: List[_], i: Int): Map[String, URI]
    Attributes
    protected
    Definition Classes
    CastHelpers
  51. def castMapUUID(row: List[_], i: Int): Map[String, UUID]
    Attributes
    protected
    Definition Classes
    CastHelpers
  52. def castOne[T](row: List[_], i: Int): T
    Attributes
    protected
    Definition Classes
    CastHelpers
  53. def castOneBigDecimal(row: List[_], i: Int): BigDecimal
    Attributes
    protected
    Definition Classes
    CastHelpers
  54. def castOneBigInt(row: List[_], i: Int): BigInt
    Attributes
    protected
    Definition Classes
    CastHelpers
  55. def castOneFloat(row: List[_], i: Int): Float
    Attributes
    protected
    Definition Classes
    CastHelpers
  56. def castOneInt(row: List[_], i: Int): Int
    Attributes
    protected
    Definition Classes
    CastHelpers
  57. def castOptMany[T](row: List[_], i: Int): Option[Set[T]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  58. def castOptManyApply[T](row: List[_], i: Int): Option[Set[T]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  59. def castOptManyApplyBigDecimal(row: List[_], i: Int): Option[Set[BigDecimal]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  60. def castOptManyApplyBigInt(row: List[_], i: Int): Option[Set[BigInt]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  61. def castOptManyApplyDouble(row: List[_], i: Int): Option[Set[Double]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  62. def castOptManyApplyFloat(row: List[_], i: Int): Option[Set[Float]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  63. def castOptManyApplyInt(row: List[_], i: Int): Option[Set[Int]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  64. def castOptManyApplyLong(row: List[_], i: Int): Option[Set[Long]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  65. def castOptManyBigDecimal(row: List[_], i: Int): Option[Set[BigDecimal]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  66. def castOptManyBigInt(row: List[_], i: Int): Option[Set[BigInt]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  67. def castOptManyDouble(row: List[_], i: Int): Option[Set[Double]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  68. def castOptManyEnum(row: List[_], i: Int): Option[Set[String]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  69. def castOptManyFloat(row: List[_], i: Int): Option[Set[Float]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  70. def castOptManyInt(row: List[_], i: Int): Option[Set[Int]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  71. def castOptManyLong(row: List[_], i: Int): Option[Set[Long]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  72. def castOptManyRefAttr(row: List[_], i: Int): Option[Set[Long]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  73. def castOptMapApplyBigDecimal(row: List[_], i: Int): Option[Map[String, BigDecimal]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  74. def castOptMapApplyBigInt(row: List[_], i: Int): Option[Map[String, BigInt]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  75. def castOptMapApplyBoolean(row: List[_], i: Int): Option[Map[String, Boolean]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  76. def castOptMapApplyDate(row: List[_], i: Int): Option[Map[String, Date]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  77. def castOptMapApplyDouble(row: List[_], i: Int): Option[Map[String, Double]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  78. def castOptMapApplyFloat(row: List[_], i: Int): Option[Map[String, Float]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  79. def castOptMapApplyInt(row: List[_], i: Int): Option[Map[String, Int]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  80. def castOptMapApplyLong(row: List[_], i: Int): Option[Map[String, Long]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  81. def castOptMapApplyString(row: List[_], i: Int): Option[Map[String, String]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  82. def castOptMapApplyURI(row: List[_], i: Int): Option[Map[String, URI]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  83. def castOptMapApplyUUID(row: List[_], i: Int): Option[Map[String, UUID]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  84. def castOptMapBigDecimal(row: List[_], i: Int): Option[Map[String, BigDecimal]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  85. def castOptMapBigInt(row: List[_], i: Int): Option[Map[String, BigInt]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  86. def castOptMapBoolean(row: List[_], i: Int): Option[Map[String, Boolean]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  87. def castOptMapDate(row: List[_], i: Int): Option[Map[String, Date]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  88. def castOptMapDouble(row: List[_], i: Int): Option[Map[String, Double]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  89. def castOptMapFloat(row: List[_], i: Int): Option[Map[String, Float]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  90. def castOptMapInt(row: List[_], i: Int): Option[Map[String, Int]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  91. def castOptMapLong(row: List[_], i: Int): Option[Map[String, Long]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  92. def castOptMapString(row: List[_], i: Int): Option[Map[String, String]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  93. def castOptMapURI(row: List[_], i: Int): Option[Map[String, URI]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  94. def castOptMapUUID(row: List[_], i: Int): Option[Map[String, UUID]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  95. def castOptOne[T](row: List[_], i: Int): Option[T]
    Attributes
    protected
    Definition Classes
    CastHelpers
  96. def castOptOneApply[T](row: List[_], i: Int): Option[T]
    Attributes
    protected
    Definition Classes
    CastHelpers
  97. def castOptOneApplyBigDecimal(row: List[_], i: Int): Option[BigDecimal]
    Attributes
    protected
    Definition Classes
    CastHelpers
  98. def castOptOneApplyBigInt(row: List[_], i: Int): Option[BigInt]
    Attributes
    protected
    Definition Classes
    CastHelpers
  99. def castOptOneApplyDouble(row: List[_], i: Int): Option[Double]
    Attributes
    protected
    Definition Classes
    CastHelpers
  100. def castOptOneApplyFloat(row: List[_], i: Int): Option[Float]
    Attributes
    protected
    Definition Classes
    CastHelpers
  101. def castOptOneApplyInt(row: List[_], i: Int): Option[Int]
    Attributes
    protected
    Definition Classes
    CastHelpers
  102. def castOptOneApplyLong(row: List[_], i: Int): Option[Long]
    Attributes
    protected
    Definition Classes
    CastHelpers
  103. def castOptOneBigDecimal(row: List[_], i: Int): Option[BigDecimal]
    Attributes
    protected
    Definition Classes
    CastHelpers
  104. def castOptOneBigInt(row: List[_], i: Int): Option[BigInt]
    Attributes
    protected
    Definition Classes
    CastHelpers
  105. def castOptOneDouble(row: List[_], i: Int): Option[Double]
    Attributes
    protected
    Definition Classes
    CastHelpers
  106. def castOptOneEnum(row: List[_], i: Int): Option[String]
    Attributes
    protected
    Definition Classes
    CastHelpers
  107. def castOptOneFloat(row: List[_], i: Int): Option[Float]
    Attributes
    protected
    Definition Classes
    CastHelpers
  108. def castOptOneInt(row: List[_], i: Int): Option[Int]
    Attributes
    protected
    Definition Classes
    CastHelpers
  109. def castOptOneLong(row: List[_], i: Int): Option[Long]
    Attributes
    protected
    Definition Classes
    CastHelpers
  110. def castOptOneRefAttr(row: List[_], i: Int): Option[Long]
    Attributes
    protected
    Definition Classes
    CastHelpers
  111. def castRow(row: List[AnyRef]): Tpl
    Attributes
    protected
    Definition Classes
    CastHelpers
  112. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  113. final def date(s: String): Date
    Attributes
    protected
    Definition Classes
    Helpers
  114. def debugGet(implicit conn: Conn): Unit

    Debug call to get on a molecule (without affecting the db).

    Debug call to get on a molecule (without affecting the db).

    Prints the following to output:

    1. Internal molecule transformation representations:
    Molecule DSL --> Model --> Query --> Datomic query

    2. Data returned from get query (max 500 rows).

    conn

    Implicit Conn value in scope

    Definition Classes
    ShowDebug
  115. def debugGetAsOf(date: Date)(implicit conn: Conn): Unit

    Debug call to getAsOf(date) on a molecule (without affecting the db).

    Debug call to getAsOf(date) on a molecule (without affecting the db).

    Prints the following to output:

    1. Internal molecule transformation representations:
    Molecule DSL --> Model --> Query --> Datomic query

    2. Data returned from get query (max 500 rows).

    conn

    Implicit Conn value in scope

    Definition Classes
    ShowDebug
  116. def debugGetAsOf(tx: TxReport)(implicit conn: Conn): Unit

    Debug call to getAsOf(tx) on a molecule (without affecting the db).

    Debug call to getAsOf(tx) on a molecule (without affecting the db).

    Prints the following to output:

    1. Internal molecule transformation representations:
    Molecule DSL --> Model --> Query --> Datomic query

    2. Data returned from get query (max 500 rows).

    tx

    TxReport

    conn

    Implicit Conn value in scope

    Definition Classes
    ShowDebug
  117. def debugGetAsOf(t: Long)(implicit conn: Conn): Unit

    Debug call to getAsOf(t) on a molecule (without affecting the db).

    Debug call to getAsOf(t) on a molecule (without affecting the db).

    Prints the following to output:

    1. Internal molecule transformation representations:
    Molecule DSL --> Model --> Query --> Datomic query

    2. Data returned from get query (max 500 rows).

    conn

    Implicit Conn value in scope

    Definition Classes
    ShowDebug
  118. def debugGetHistory(implicit conn: Conn): Unit

    Debug call to getHistory on a molecule (without affecting the db).

    Debug call to getHistory on a molecule (without affecting the db).

    Prints the following to output:

    1. Internal molecule transformation representations:
    Molecule DSL --> Model --> Query --> Datomic query

    2. Data returned from get query (max 500 rows).

    conn

    Implicit Conn value in scope

    Definition Classes
    ShowDebug
  119. def debugGetSince(date: Date)(implicit conn: Conn): Unit

    Debug call to getSince(date) on a molecule (without affecting the db).

    Debug call to getSince(date) on a molecule (without affecting the db).

    Prints the following to output:

    1. Internal molecule transformation representations:
    Molecule DSL --> Model --> Query --> Datomic query

    2. Data returned from get query (max 500 rows).

    conn

    Implicit Conn value in scope

    Definition Classes
    ShowDebug
  120. def debugGetSince(tx: TxReport)(implicit conn: Conn): Unit

    Debug call to getSince(tx) on a molecule (without affecting the db).

    Debug call to getSince(tx) on a molecule (without affecting the db).

    Prints the following to output:

    1. Internal molecule transformation representations:
    Molecule DSL --> Model --> Query --> Datomic query

    2. Data returned from get query (max 500 rows).

    tx

    TxReport

    conn

    Implicit Conn value in scope

    Definition Classes
    ShowDebug
  121. def debugGetSince(t: Long)(implicit conn: Conn): Unit

    Debug call to getSince(t) on a molecule (without affecting the db).

    Debug call to getSince(t) on a molecule (without affecting the db).

    Prints the following to output:

    1. Internal molecule transformation representations:
    Molecule DSL --> Model --> Query --> Datomic query

    2. Data returned from get query (max 500 rows).

    conn

    Implicit Conn value in scope

    Definition Classes
    ShowDebug
  122. def debugGetWith(txData: List[List[_]])(implicit conn: Conn): Unit

    Debug call to getWith(txData) on a molecule (without affecting the db).

    Debug call to getWith(txData) on a molecule (without affecting the db).

    Prints the following to output:

    1. Internal molecule transformation representations:
    Molecule DSL --> Model --> Query --> Datomic query

    2. Data returned from get query (max 500 rows).

    3. Transactions of applied transaction data.

    txData

    Raw transaction data as java.util.List[Object]

    conn

    Implicit Conn value in scope

    Definition Classes
    ShowDebug
  123. def debugGetWith(txMolecules: Seq[Seq[Statement]]*)(implicit conn: Conn): Unit

    Debug call to getWith(txMolecules) on a molecule (without affecting the db).

    Debug call to getWith(txMolecules) on a molecule (without affecting the db).

    Prints the following to output:

    1. Internal molecule transformation representations:
    Molecule DSL --> Model --> Query --> Datomic query

    2. Data returned from get query (max 500 rows).

    3. Transactions of applied transaction molecules.

    txMolecules

    Transaction statements from applied Molecules with test data

    conn

    Implicit Conn value in scope

    Definition Classes
    ShowDebug
  124. def debugSave(implicit conn: Conn): Unit

    Debug call to save on a molecule (without affecting the db).

    Debug call to save on a molecule (without affecting the db).

    Prints internal molecule transformation representations to output:

    Model --> Generic statements --> Datomic statements

    conn

    Implicit Conn value in scope

    returns

    Unit

    Definition Classes
    ShowDebug
  125. def debugUpdate(implicit conn: Conn): Unit

    Debug call to update on a molecule (without affecting the db).

    Debug call to update on a molecule (without affecting the db).

    Prints internal molecule transformation representations to output:

    Model --> Generic statements --> Datomic statements

    conn

    Implicit Conn value in scope

    Definition Classes
    ShowDebug
  126. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  127. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  128. final def f(a: Any): Any
    Attributes
    protected
    Definition Classes
    Helpers
  129. final def f2(a: Any): Any
    Attributes
    protected
    Definition Classes
    Helpers
  130. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  131. final def format(date: Date): String
    Attributes
    protected
    Definition Classes
    Helpers
  132. final def format2(date: Date): String
    Attributes
    protected
    Definition Classes
    Helpers
  133. def get(n: Int)(implicit conn: Conn, tplType: ClassTag[Tpl]): List[Tpl]

    Get List of n rows as tuples matching molecule.

    Get List of n rows as tuples matching molecule.

    Only n rows are type-casted.

    Person.name.age.get(1) === List(
      ("Ben", 42)
    )

    Since retrieving a List is considered the default fetch format, the getter method is simply named get (and not getList).

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array extraction

    returns

    List[Tpl] where Tpl is a tuple of types matching the attributes of the molecule

    Definition Classes
    GetList
    See also

    Equivalent asynchronous getAsync method.

  134. def get(implicit conn: Conn, tplType: ClassTag[Tpl]): List[Tpl]

    Get List of all rows as tuples matching molecule.

    Get List of all rows as tuples matching molecule.

    Person.name.age.get === List(
      ("Ben", 42),
      ("Liz", 37),
    )

    Since retrieving a List is considered the default fetch format, the getter method is simply named get (and not getList).

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array extraction

    returns

    List[Tpl] where Tpl is a tuple of types matching the attributes of the molecule

    Definition Classes
    GetList
    See also

    Equivalent asynchronous getAsync method.

  135. def getArray(n: Int)(implicit conn: Conn, tplType: ClassTag[Tpl]): Array[Tpl]

    Get Array of n rows as tuples matching molecule.

    Get Array of n rows as tuples matching molecule.

    Person.name.age.getArray(1) === Array(
      ("Ben", 42)
    )

    Getting a pre-allocated Array populated with typed data is the fastest way to query Datomic with Molecule. Looping the Array in a while loop with a mutable index pointer will also be the fastest way to traverse the data set.

    The Array is only populated with n rows of type-casted tuples. Setting n to -1 fetches all rows (same as calling getArray without any number of rows parameter).

    n

    Number of rows

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array

    returns

    Array[Tpl] where Tpl is a tuple of types matching the attributes of the molecule

    Definition Classes
    GetArray
    See also

    Equivalent asynchronous getAsyncArray method.

  136. def getArray(implicit conn: Conn, tplType: ClassTag[Tpl]): Array[Tpl]

    Get Array of all rows as tuples matching molecule.

    Get Array of all rows as tuples matching molecule.

    Person.name.age.getArray === Array(
      ("Ben", 42),
      ("Liz", 37)
    )

    Getting a pre-allocated Array populated with typed data is the fastest way to query Datomic with Molecule. Looping the Array in a while loop with a mutable index pointer will also be the fastest way to traverse the data set.

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array

    returns

    Array[Tpl] where Tpl is a tuple of types matching the attributes of the molecule

    Definition Classes
    GetArray
    See also

    Equivalent asynchronous getAsyncArray method.

  137. def getArrayAsOf(date: Date, n: Int)(implicit conn: Conn, tplType: ClassTag[Tpl]): Array[Tpl]

    Get Array of n rows as tuples matching molecule as of date.

    Get Array of n rows as tuples matching molecule as of date.

    Get data at a human point in time (a java.util.Date).

    val beforeInsert = new java.util.Date
    
    // Insert
    val tx1 = Person.name.age insert List(
      ("Ben", 42),
      ("Liz", 37)
    )
    val List(ben, liz) = tx1.eids
    val afterInsert = new java.util.Date
    
    // Update
    val tx2 = Person(ben).age(43).update
    val afterUpdate = new java.util.Date
    
    // Get Array of all rows as of afterUpdate
    Person.name.age.getArrayAsOf(afterUpdate) === Array(
      ("Ben", 43),
      ("Liz", 37)
    )
    
    // Get Array of n rows as of afterUpdate
    Person.name.age.getArrayAsOf(afterUpdate, 1) === Array(
      ("Ben", 43)
    )

    Getting a pre-allocated Array populated with typed data is the fastest way to query Datomic with Molecule. Looping the Array in a while loop with a mutable index pointer will also be the fastest way to traverse the data set.

    The Array is only populated with n rows of type-casted tuples.

    date

    java.util.Date

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array

    returns

    Array[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetArray
    See also

    Manual on asof/since

    Equivalent asynchronous getAsyncArrayAsOf method.

  138. def getArrayAsOf(date: Date)(implicit conn: Conn, tplType: ClassTag[Tpl]): Array[Tpl]

    Get Array of all rows as tuples matching molecule as of date.

    Get Array of all rows as tuples matching molecule as of date.

    Get data at a human point in time (a java.util.Date).

    val beforeInsert = new java.util.Date
    
    // Insert
    val tx1 = Person.name.age insert List(
      ("Ben", 42),
      ("Liz", 37)
    )
    val List(ben, liz) = tx1.eids
    val afterInsert = new java.util.Date
    
    // Update
    val tx2 = Person(ben).age(43).update
    val afterUpdate = new java.util.Date
    
    // Retract
    val tx3 = ben.retract
    val afterRetract = new java.util.Date
    
    // No data yet before insert
    Person.name.age.getArrayAsOf(beforeInsert) === Array()
    
    // Get Array of all rows as of afterInsert
    Person.name.age.getArrayAsOf(afterInsert) === Array(
      ("Ben", 42),
      ("Liz", 37)
    )
    
    // Get Array of all rows as of afterUpdate
    Person.name.age.getArrayAsOf(afterUpdate) === Array(
      ("Ben", 43), // Ben now 43
      ("Liz", 37)
    )
    
    // Get Array of all rows as of afterRetract
    Person.name.age.getArrayAsOf(afterRetract) === Array(
      ("Liz", 37) // Ben gone
    )

    Getting a pre-allocated Array populated with typed data is the fastest way to query Datomic with Molecule. Looping the Array in a while loop with a mutable index pointer will also be the fastest way to traverse the data set.

    date

    java.util.Date

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array

    returns

    Array[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetArray
    See also

    Manual on asof/since

    Equivalent asynchronous getAsyncArrayAsOf method.

  139. def getArrayAsOf(tx: TxReport, n: Int)(implicit conn: Conn, tplType: ClassTag[Tpl]): Array[Tpl]

    Get Array of n rows as tuples matching molecule as of tx.

    Get Array of n rows as tuples matching molecule as of tx.

    Datomic's internal asOf method can take a transaction entity id as argument to retrieve a database value as of that transaction (including).

    Instead of supplying the transaction entity id, in Molecule we supply a TxReport that contains the transaction entity id (which is used as argument to Datomic internally). This is more convenient when using Molecule since we get a TxReport from transaction operations like get, update, retract etc.

    // Insert (tx report 1)
    val tx1 = Person.name.age insert List(
      ("Ben", 42),
      ("Liz", 37)
    )
    val List(ben, liz) = tx1.eids
    
    // Update (tx report 2)
    val tx2 = Person(ben).age(43).update
    
    // Get Array of all rows as of tx2 (after update)
    Person.name.age.getArrayAsOf(tx2) === Array(
      ("Ben", 43),
      ("Liz", 37)
    )
    
    // Get Array of n rows as of tx2 (after update)
    Person.name.age.getArrayAsOf(tx2, 1) === Array(
      ("Ben", 43)
    )

    Getting a pre-allocated Array populated with typed data is the fastest way to query Datomic with Molecule. Looping the Array in a while loop with a mutable index pointer will also be the fastest way to traverse the data set.

    The Array is only populated with n rows of type-casted tuples.

    tx

    TxReport (returned from all molecule transaction operations)

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array

    returns

    Array[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetArray
    See also

    Manual on asof/since

    Equivalent asynchronous getAsyncArrayAsOf method.

  140. def getArrayAsOf(tx: TxReport)(implicit conn: Conn, tplType: ClassTag[Tpl]): Array[Tpl]

    Get Array of all rows as tuples matching molecule as of tx.

    Get Array of all rows as tuples matching molecule as of tx.

    Datomic's internal asOf method can take a transaction entity id as argument to retrieve a database value as of that transaction (including).

    Instead of supplying the transaction entity id, in Molecule we supply a TxReport that contains the transaction entity id (which is used as argument to Datomic internally). This is more convenient when using Molecule since we get a TxReport from transaction operations like get, update, retract etc.

    // Insert (tx report 1)
    val tx1 = Person.name.age insert List(
      ("Ben", 42),
      ("Liz", 37)
    )
    val List(ben, liz) = tx1.eids
    
    // Update (tx report 2)
    val tx2 = Person(ben).age(43).update
    
    // Retract (tx report 3)
    val tx3 = ben.retract
    
    // Get Array of all rows as of tx1 (after insert)
    Person.name.age.getArrayAsOf(tx1) === Array(
      ("Ben", 42),
      ("Liz", 37)
    )
    
    // Get Array of all rows as of tx2 (after update)
    Person.name.age.getArrayAsOf(tx2) === Array(
      ("Ben", 43), // Ben now 43
      ("Liz", 37)
    )
    
    // Get Array of all rows as of tx3 (after retract)
    Person.name.age.getArrayAsOf(tx3) === Array(
      ("Liz", 37) // Ben gone
    )

    Getting a pre-allocated Array populated with typed data is the fastest way to query Datomic with Molecule. Looping the Array in a while loop with a mutable index pointer will also be the fastest way to traverse the data set.

    tx

    TxReport (returned from all molecule transaction operations)

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array

    returns

    Array[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetArray
    See also

    Manual on asof/since

    Equivalent asynchronous getAsyncArrayAsOf method.

  141. def getArrayAsOf(t: Long, n: Int)(implicit conn: Conn, tplType: ClassTag[Tpl]): Array[Tpl]

    Get Array of n rows as tuples matching molecule as of transaction time t.

    Get Array of n rows as tuples matching molecule as of transaction time t.

    Transaction time t is an auto-incremented transaction number assigned internally by Datomic.

    t can for instance be retrieved in a getHistory call for an attribute and then be used to get data as of that point in time (including that transaction):

    // Insert (t 1028)
    val List(ben, liz) = Person.name.age insert List(
      ("Ben", 42),
      ("Liz", 37)
    ) eids
    
    // Update (t 1031)
    Person(ben).age(43).update
    
    // History of Ben
    Person(ben).age.t.op.getHistory.sortBy(r => (r._2, r._3)) === List(
      (42, 1028, true),  // Insert:  42 asserted
      (42, 1031, false), // Update:  42 retracted
      (43, 1031, true),  //          43 asserted
    )
    
    // Get Array of all rows as of transaction t 1031 (after update)
    Person.name.age.getArrayAsOf(1031) === Array(
      ("Ben", 43),
      ("Liz", 37)
    )
    
    // Get Array of n rows as of transaction t 1031 (after update)
    Person.name.age.getArrayAsOf(1031, 1) === Array(
      ("Ben", 43)
    )

    Getting a pre-allocated Array populated with typed data is the fastest way to query Datomic with Molecule. Looping the Array in a while loop with a mutable index pointer will also be the fastest way to traverse the data set.

    The Array is only populated with n rows of type-casted tuples.

    t

    Long Transaction time t

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array

    returns

    Array[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetArray
    See also

    Manual on asof/since

    Equivalent asynchronous getAsyncArrayAsOf method.

  142. def getArrayAsOf(t: Long)(implicit conn: Conn, tplType: ClassTag[Tpl]): Array[Tpl]

    Get Array of all rows as tuples matching molecule as of transaction time t.

    Get Array of all rows as tuples matching molecule as of transaction time t.

    Transaction time t is an auto-incremented transaction number assigned internally by Datomic.

    t can for instance be retrieved in a getHistory call for an attribute and then be used to get data as of that point in time (including that transaction):

    // Insert (t 1028)
    val List(ben, liz) = Person.name.age insert List(
      ("Ben", 42),
      ("Liz", 37)
    ) eids
    
    // Update (t 1031)
    Person(ben).age(43).update
    
    // Retract (t 1032)
    ben.retract
    
    // History of Ben
    Person(ben).age.t.op.getHistory.sortBy(r => (r._2, r._3)) === List(
      (42, 1028, true),  // Insert:  42 asserted
      (42, 1031, false), // Update:  42 retracted
      (43, 1031, true),  //          43 asserted
      (43, 1032, false)  // Retract: 43 retracted
    )
    
    // Get Array of data as of transaction t 1028 (after insert)
    Person.name.age.getArrayAsOf(1028) === Array(
      ("Ben", 42),
      ("Liz", 37)
    )
    
    // Get Array of all rows as of transaction t 1031 (after update)
    Person.name.age.getArrayAsOf(1031) === Array(
      ("Ben", 43),
      ("Liz", 37)
    )
    
    // Get Array of all rows as of transaction t 1032 (after retract)
    Person.name.age.getArrayAsOf(1032) === Array(
      ("Liz", 37)
    )

    Getting a pre-allocated Array populated with typed data is the fastest way to query Datomic with Molecule. Looping the Array in a while loop with a mutable index pointer will also be the fastest way to traverse the data set.

    t

    Transaction time t

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array

    returns

    Array[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetArray
    See also

    Manual on asof/since

    Equivalent asynchronous getAsyncArrayAsOf method.

  143. def getArraySince(date: Date, n: Int)(implicit conn: Conn, tplType: ClassTag[Tpl]): Array[Tpl]

    Get Array of n rows as tuples matching molecule since date.

    Get Array of n rows as tuples matching molecule since date.

    Get data added/retracted since a human point in time (a java.util.Date).

    // Transact 3 times (`inst` retrieves transaction time/Date from tx report)
    val date1 = Person.name("Ann").save.inst
    val date2 = Person.name("Ben").save.inst
    val date3 = Person.name("Cay").save.inst
    
    // Current values
    Person.name.get === List("Ann", "Ben", "Cay")
    
    // Ben and Cay added since date1
    Person.name.getArraySince(date1) === Array("Ben", "Cay")
    
    // Ben and Cay added since date1 - only n (1) rows returned
    Person.name.getArraySince(date1, 1) === Array("Ben")

    Getting a pre-allocated Array populated with typed data is the fastest way to query Datomic with Molecule. Looping the Array in a while loop with a mutable index pointer will also be the fastest way to traverse the data set.

    The Array is only populated with n rows of type-casted tuples.

    date

    java.util.Date

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array

    returns

    Array[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetArray
    See also

    Manual on asof/since

    Equivalent asynchronous getAsyncArraySince method.

  144. def getArraySince(date: Date)(implicit conn: Conn, tplType: ClassTag[Tpl]): Array[Tpl]

    Get Array of all rows as tuples matching molecule since date.

    Get Array of all rows as tuples matching molecule since date.

    Get data added/retracted since a human point in time (a java.util.Date).

    // Transact 3 times (`inst` retrieves transaction time/Date from tx report)
    val date1 = Person.name("Ann").save.inst
    val date2 = Person.name("Ben").save.inst
    val date3 = Person.name("Cay").save.inst
    
    // Current values
    Person.name.get === List("Ann", "Ben", "Cay")
    
    // Ben and Cay added since date1
    Person.name.getArraySince(date1) === Array("Ben", "Cay")
    
    // Cay added since date2
    Person.name.getArraySince(date2) === Array("Cay")
    
    // Nothing added since date3
    Person.name.getArraySince(date3) === Nil

    Getting a pre-allocated Array populated with typed data is the fastest way to query Datomic with Molecule. Looping the Array in a while loop with a mutable index pointer will also be the fastest way to traverse the data set.

    date

    java.util.Date

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array

    returns

    Array[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetArray
    See also

    Manual on asof/since

    Equivalent asynchronous getAsyncArraySince method.

  145. def getArraySince(tx: TxReport, n: Int)(implicit conn: Conn, tplType: ClassTag[Tpl]): Array[Tpl]

    Get Array of n rows as tuples matching molecule since tx.

    Get Array of n rows as tuples matching molecule since tx.

    Datomic's internal since can take a transaction entity id as argument to retrieve a database value since that transaction (excluding the transaction itself).

    Instead of supplying the transaction entity id, in Molecule we supply a TxReport that contains the transaction entity id (which is used as argument to Datomic internally). This is more convenient when using Molecule since we getAsync a TxReport from transaction operations like get, update, retract etc.

    // Get tx reports for 3 transactions
    val tx1 = Person.name("Ann").save
    val tx2 = Person.name("Ben").save
    val tx3 = Person.name("Cay").save
    
    // Current values
    Person.name.get === List("Ann", "Ben", "Cay")
    
    // Ben and Cay added since tx1
    Person.name.getArraySince(tx1) === Array("Ben", "Cay")
    
    // Ben and Cay added since tx1 - only n (1) rows returned
    Person.name.getArraySince(tx1, 1) === Array("Ben")

    Getting a pre-allocated Array populated with typed data is the fastest way to query Datomic with Molecule. Looping the Array in a while loop with a mutable index pointer will also be the fastest way to traverse the data set.

    The Array is only populated with n rows of type-casted tuples.

    tx

    TxReport

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array

    returns

    Array[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetArray
    See also

    Manual on asof/since

    Equivalent asynchronous getAsyncArraySince method.

  146. def getArraySince(tx: TxReport)(implicit conn: Conn, tplType: ClassTag[Tpl]): Array[Tpl]

    Get Array of all rows as tuples matching molecule since tx.

    Get Array of all rows as tuples matching molecule since tx.

    Datomic's internal since can take a transaction entity id as argument to retrieve a database value since that transaction (excluding the transaction itself).

    Instead of supplying the transaction entity id, in Molecule we supply a TxReport that contains the transaction entity id (which is used as argument to Datomic internally). This is more convenient when using Molecule since we getAsync a TxReport from transaction operations like get, update, retract etc.

    // Get tx reports for 3 transactions
    val tx1 = Person.name("Ann").save
    val tx2 = Person.name("Ben").save
    val tx3 = Person.name("Cay").save
    
    // Current values
    Person.name.get === List("Ann", "Ben", "Cay")
    
    // Ben and Cay added since tx1
    Person.name.getArraySince(tx1) === Array("Ben", "Cay")
    
    // Cay added since tx2
    Person.name.getArraySince(tx2) === Array("Cay")
    
    // Nothing added since tx3
    Person.name.getArraySince(tx3) === Nil

    Getting a pre-allocated Array populated with typed data is the fastest way to query Datomic with Molecule. Looping the Array in a while loop with a mutable index pointer will also be the fastest way to traverse the data set.

    tx

    TxReport

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array

    returns

    Array[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetArray
    See also

    Manual on asof/since

    Equivalent asynchronous getAsyncArraySince method.

  147. def getArraySince(t: Long, n: Int)(implicit conn: Conn, tplType: ClassTag[Tpl]): Array[Tpl]

    Get Array of n rows as tuples matching molecule since transaction time t.

    Get Array of n rows as tuples matching molecule since transaction time t.

    Transaction time t is an auto-incremented transaction number assigned internally by Datomic.

    t can for instance be retrieved by calling t on the tx report returned from transactional operations and then be used to get data since that point in time (excluding that transaction):

    // 3 transaction times `t`
    val t1 = Person.name("Ann").save.t
    val t2 = Person.name("Ben").save.t
    val t3 = Person.name("Cay").save.t
    
    // Current values
    Person.name.get === List("Ann", "Ben", "Cay")
    
    // Ben and Cay added since transaction time t 1028
    Person.name.getArraySince(t1) === Array("Ben", "Cay")
    
    // Ben and Cay added since transaction time t 1028 - only n (1) rows returned
    Person.name.getArraySince(t1, 1) === Array("Ben")

    Getting a pre-allocated Array populated with typed data is the fastest way to query Datomic with Molecule. Looping the Array in a while loop with a mutable index pointer will also be the fastest way to traverse the data set.

    The Array is only populated with n rows of type-casted tuples.

    t

    Transaction time t

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array

    returns

    Array[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetArray
    See also

    Manual on asof/since

    Equivalent asynchronous getAsyncArraySince method.

  148. def getArraySince(t: Long)(implicit conn: Conn, tplType: ClassTag[Tpl]): Array[Tpl]

    Get Array of all rows as tuples matching molecule since transaction time t.

    Get Array of all rows as tuples matching molecule since transaction time t.

    Transaction time t is an auto-incremented transaction number assigned internally by Datomic.

    t can for instance be retrieved by calling t on the tx report returned from transactional operations and then be used to get data since that point in time (excluding that transaction):

    // 3 transaction times `t`
    val t1 = Person.name("Ann").save.t
    val t2 = Person.name("Ben").save.t
    val t3 = Person.name("Cay").save.t
    
    // Current values
    Person.name.get === List("Ann", "Ben", "Cay")
    
    // Ben and Cay added since transaction time t 1028
    Person.name.getArraySince(t1) === Array("Ben", "Cay")
    
    // Cay added since transaction time t 1030
    Person.name.getArraySince(t2) === Array("Cay")
    
    // Nothing added since transaction time t 1032
    Person.name.getArraySince(t3) === Nil

    Getting a pre-allocated Array populated with typed data is the fastest way to query Datomic with Molecule. Looping the Array in a while loop with a mutable index pointer will also be the fastest way to traverse the data set.

    t

    Transaction time t

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array

    returns

    Array[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetArray
    See also

    Manual on asof/since

    Equivalent asynchronous getAsyncArraySince method.

  149. def getArrayWith(txData: List[_], n: Int)(implicit conn: Conn, tplType: ClassTag[Tpl]): Array[Tpl]

    Get Array of n rows as tuples matching molecule with applied raw transaction data.

    Get Array of n rows as tuples matching molecule with applied raw transaction data.

    Apply raw transaction data to in-memory "branch" of db without affecting db to see how it would then look:

    // Live size of Person db
    Person.name.get.size === 150
    
    // Read some transaction data from file
    val data_rdr2 = new FileReader("examples/resources/seattle/seattle-data1a.dtm")
    val newDataTx = Util.readAll(data_rdr2).get(0).asInstanceOf[java.util.List[Object]]
    
    // Imagine future db - 100 persons would be added, apparently
    Person.name.getArrayWith(newDataTx).size === 250
    
    // Imagine future db - Let's just take 10
    Person.name.getArrayWith(newDataTx, 10).size === 10

    Getting a pre-allocated Array populated with typed data is the fastest way to query Datomic with Molecule. Looping the Array in a while loop with a mutable index pointer will also be the fastest way to traverse the data set.

    The Array is only populated with n rows of type-casted tuples.

    txData

    Raw transaction data as java.util.List[Object]

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array

    returns

    Array[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetArray
    See also

    Manual on with

    Equivalent asynchronous getAsyncArrayWith method.

  150. def getArrayWith(txData: List[_])(implicit conn: Conn, tplType: ClassTag[Tpl]): Array[Tpl]

    Get Array of all rows as tuples matching molecule with applied raw transaction data.

    Get Array of all rows as tuples matching molecule with applied raw transaction data.

    Apply raw transaction data to in-memory "branch" of db without affecting db to see how it would then look:

    // Live size of Person db
    Person.name.get.size === 150
    
    // Read some transaction data from file
    val data_rdr2 = new FileReader("examples/resources/seattle/seattle-data1a.dtm")
    val newDataTx = Util.readAll(data_rdr2).get(0).asInstanceOf[java.util.List[Object]]
    
    // Imagine future db - 100 persons would be added, apparently
    Person.name.getArrayWith(newDataTx).size === 250

    Getting a pre-allocated Array populated with typed data is the fastest way to query Datomic with Molecule. Looping the Array in a while loop with a mutable index pointer will also be the fastest way to traverse the data set.

    txData

    Raw transaction data as java.util.List[Object]

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array

    returns

    Array[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetArray
    See also

    Manual on with

    Equivalent asynchronous getAsyncArrayWith method.

  151. def getArrayWith(n: Int, txMolecules: Seq[Seq[Statement]]*)(implicit conn: Conn, tplType: ClassTag[Tpl]): Array[Tpl]

    Get Array of n rows as tuples matching molecule with applied molecule transaction data.

    Get Array of n rows as tuples matching molecule with applied molecule transaction data.

    Apply one or more molecule transactions to in-memory "branch" of db without affecting db to see how it would then look:

    // Current state
    val List(ben, liz) = Person.name.likes.insert(
      ("Ben", "pasta"),
      ("Liz", "pizza")
    ).eids
    
    // Test multiple transactions
    Person.name.likes.getArrayWith(
      Person(ben).likes("sushi").getUpdateTx,
      Person(liz).likes("cake").getUpdateTx
    ) === Array(
      ("Ben", "sushi")
      ("Liz", "cake")
    )
    
    // Same as above, but only n (1) rows returned:
    Person.name.likes.getArrayWith(
      1
      Person(ben).likes("sushi").getUpdateTx,
      Person(liz).likes("cake").getUpdateTx
    ) === Array(
      ("Ben", "sushi")
    )

    Getting a pre-allocated Array populated with typed data is the fastest way to query Datomic with Molecule. Looping the Array in a while loop with a mutable index pointer will also be the fastest way to traverse the data set.

    The Array is only populated with n rows of type-casted tuples.

    n

    Int Number of rows returned

    txMolecules

    Transaction statements from applied Molecules with test data

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array

    returns

    Array[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetArray
    Note

    Note how the n parameter has to come before the txMolecules vararg.

    See also

    Manual on with

    Equivalent asynchronous getAsyncArrayWith method.

  152. def getArrayWith(txMolecules: Seq[Seq[Statement]]*)(implicit conn: Conn, tplType: ClassTag[Tpl]): Array[Tpl]

    Get Array of all rows as tuples matching molecule with applied molecule transaction data.

    Get Array of all rows as tuples matching molecule with applied molecule transaction data.

    Apply one or more molecule transactions to in-memory "branch" of db without affecting db to see how it would then look:

    // Current state
    val ben = Person.name("Ben").likes("pasta").save.eid
    
    // Base data
    Person.name.likes.getArrayWith(
      // apply imaginary transaction data
      Person(ben).likes("sushi").getUpdateTx
    ) === Array(
      // Effect: Ben would like sushi if tx was applied
      ("Ben", "sushi")
    )
    
    // Current state is still the same
    Person.name.likes.get === Array(
      ("Ben", "pasta")
    )

    Multiple transactions can be applied to test more complex what-if scenarios!

    Getting a pre-allocated Array populated with typed data is the fastest way to query Datomic with Molecule. Looping the Array in a while loop with a mutable index pointer will also be the fastest way to traverse the data set.

    txMolecules

    Transaction statements from applied Molecules with test data

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array

    returns

    Array[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetArray
    See also

    Manual on with

    Equivalent asynchronous getAsyncArrayWith method.

  153. def getAsOf(date: Date, n: Int)(implicit conn: Conn, tplType: ClassTag[Tpl]): List[Tpl]

    Get List of n rows as tuples matching molecule as of date.

    Get List of n rows as tuples matching molecule as of date.

    Get data at a human point in time (a java.util.Date).

    val beforeInsert = new java.util.Date
    
    // Insert
    val tx1 = Person.name.age insert List(
      ("Ben", 42),
      ("Liz", 37)
    )
    val List(ben, liz) = tx1.eids
    val afterInsert = new java.util.Date
    
    // Update
    val tx2 = Person(ben).age(43).update
    val afterUpdate = new java.util.Date
    
    // Get List of all rows as of afterUpdate
    Person.name.age.getAsOf(afterUpdate) === List(
      ("Ben", 43),
      ("Liz", 37)
    )
    
    // Get List of n rows as of afterUpdate
    Person.name.age.getAsOf(afterUpdate, 1) === List(
      ("Ben", 43)
    )
    date

    java.util.Date

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array extraction

    returns

    List[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetList
    See also

    Manual on asof/since

    Equivalent asynchronous getAsyncAsOf method.

  154. def getAsOf(date: Date)(implicit conn: Conn, tplType: ClassTag[Tpl]): List[Tpl]

    Get List of all rows as tuples matching molecule as of date.

    Get List of all rows as tuples matching molecule as of date.

    Get data at a human point in time (a java.util.Date).

    val beforeInsert = new java.util.Date
    
    // Insert
    val tx1 = Person.name.age insert List(
      ("Ben", 42),
      ("Liz", 37),
    )
    val List(ben, liz) = tx1.eids
    val afterInsert = new java.util.Date
    
    // Update
    val tx2 = Person(ben).age(43).update
    val afterUpdate = new java.util.Date
    
    // Retract
    val tx3 = ben.retract
    val afterRetract = new java.util.Date
    
    // No data yet before insert
    Person.name.age.getAsOf(beforeInsert) === Nil
    
    // Get List of all rows as of afterInsert
    Person.name.age.getAsOf(afterInsert) === List(
      ("Ben", 42),
      ("Liz", 37)´
    )
    
    // Get List of all rows as of afterUpdate
    Person.name.age.getAsOf(afterUpdate) === List(
      ("Ben", 43), // Ben now 43
      ("Liz", 37)
    )
    
    // Get List of all rows as of afterRetract
    Person.name.age.getAsOf(afterRetract) === List(
      ("Liz", 37) // Ben gone
    )
    date

    java.util.Date

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array extraction

    returns

    List[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetList
    See also

    Manual on asof/since

    Equivalent asynchronous getAsyncAsOf method.

  155. def getAsOf(tx: TxReport, n: Int)(implicit conn: Conn, tplType: ClassTag[Tpl]): List[Tpl]

    Get List of n rows as tuples matching molecule as of tx.

    Get List of n rows as tuples matching molecule as of tx.

    Datomic's internal asOf method can take a transaction entity id as argument to retrieve a database value as of that transaction (including).

    Instead of supplying the transaction entity id, in Molecule we supply a TxReport that contains the transaction entity id (which is used as argument to Datomic internally). This is more convenient when using Molecule since we get a TxReport from transaction operations like get, update, retract etc.

    // Insert (tx report 1)
    val tx1 = Person.name.age insert List(
      ("Ben", 42),
      ("Liz", 37)
    )
    val List(ben, liz) = tx1.eids
    
    // Update (tx report 2)
    val tx2 = Person(ben).age(43).update
    
    // Current data
    Person.name.age.get === List(
      ("Ben", 43),
      ("Liz", 37)
    )
    
    // Get List of all rows as of tx2 (after update)
    Person.name.age.getAsOf(tx2) === List(
      ("Ben", 43),
      ("Liz", 37)
    )
    
    // Get List of n rows as of tx2 (after update)
    Person.name.age.getAsOf(tx2, 1) === List(
      ("Ben", 43)
    )
    tx

    TxReport (returned from all molecule transaction operations)

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array extraction

    returns

    List[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetList
    See also

    Manual on asof/since

    Equivalent asynchronous getAsyncAsOf method.

  156. def getAsOf(tx: TxReport)(implicit conn: Conn, tplType: ClassTag[Tpl]): List[Tpl]

    Get List of all rows as tuples matching molecule as of tx.

    Get List of all rows as tuples matching molecule as of tx.

    Datomic's internal asOf method can take a transaction entity id as argument to retrieve a database value as of that transaction (including).

    Instead of supplying the transaction entity id, in Molecule we supply a TxReport that contains the transaction entity id (which is used as argument to Datomic internally). This is more convenient when using Molecule since we get a TxReport from transaction operations like get, update, retract etc.

    // Insert (tx report 1)
    val tx1 = Person.name.age insert List(
      ("Ben", 42),
      ("Liz", 37),
    )
    val List(ben, liz) = tx1.eids
    
    // Update (tx report 2)
    val tx2 = Person(ben).age(43).update
    
    // Retract (tx report 3)
    val tx3 = ben.retract
    
    // Get List of all rows as of tx1 (after insert)
    Person.name.age.getAsOf(tx1) === List(
      ("Ben", 42),
      ("Liz", 37)
    )
    
    // Get List of all rows as of tx2 (after update)
    Person.name.age.getAsOf(tx2) === List(
      ("Ben", 43), // Ben now 43
      ("Liz", 37)
    )
    
    // Get List of all rows as of tx3 (after retract)
    Person.name.age.getAsOf(tx3) === List(
      ("Liz", 37) // Ben gone
    )
    tx

    TxReport (returned from all molecule transaction operations)

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array extraction

    returns

    List[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetList
    See also

    Manual on asof/since

    Equivalent asynchronous getAsyncAsOf method.

  157. def getAsOf(t: Long, n: Int)(implicit conn: Conn, tplType: ClassTag[Tpl]): List[Tpl]

    Get List of n rows as tuples matching molecule as of transaction time t.

    Get List of n rows as tuples matching molecule as of transaction time t.

    Transaction time t is an auto-incremented transaction number assigned internally by Datomic.

    t can for instance be retrieved in a getHistory call for an attribute and then be used to get data as of that point in time (including that transaction):

    // Insert (t 1028)
    val List(ben, liz) = Person.name.age insert List(
      ("Ben", 42),
      ("Liz", 37),
    ) eids
    
    // Update (t 1031)
    Person(ben).age(43).update
    
    // History of Ben
    Person(ben).age.t.op.getHistory.sortBy(r => (r._2, r._3)) === List(
      (42, 1028, true),  // Insert:  42 asserted
      (42, 1031, false), // Update:  42 retracted
      (43, 1031, true),  //          43 asserted
    )
    
    // Get List of all all rows as of transaction t 1031 (after update)
    Person.name.age.getAsOf(1031) === List(
      ("Ben", 43),
      ("Liz", 37)
    )
    
    // Get List of n rows as of transaction t 1031 (after update)
    Person.name.age.getAsOf(1031, 1) === List(
      ("Ben", 43)
    )
    t

    Long Transaction time t

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array extraction

    returns

    List[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetList
    See also

    Manual on asof/since

    Equivalent asynchronous getAsyncAsOf method.

  158. def getAsOf(t: Long)(implicit conn: Conn, tplType: ClassTag[Tpl]): List[Tpl]

    Get List of all rows as tuples matching molecule as of transaction time t.

    Get List of all rows as tuples matching molecule as of transaction time t.

    Transaction time t is an auto-incremented transaction number assigned internally by Datomic.

    t can for instance be retrieved in a getHistory call for an attribute and then be used to get data as of that point in time (including that transaction):

    // Insert (t 1028)
    val List(ben, liz) = Person.name.age insert List(
      ("Ben", 42),
      ("Liz", 37),
    ) eids
    
    // Update (t 1031)
    Person(ben).age(43).update
    
    // Retract (t 1032)
    ben.retract
    
    // History of Ben
    Person(ben).age.t.op.getHistory.sortBy(r => (r._2, r._3)) === List(
      (42, 1028, true),  // Insert:  42 asserted
      (42, 1031, false), // Update:  42 retracted
      (43, 1031, true),  //          43 asserted
      (43, 1032, false)  // Retract: 43 retracted
    )
    
    // Get List of all rows as of transaction t 1028 (after insert)
    Person.name.age.getAsOf(1028) === List(
      ("Liz", 37),
      ("Ben", 42)
    )
    
    // Get List of all rows as of transaction t 1031 (after update)
    Person.name.age.getAsOf(1031) === List(
      ("Liz", 37),
      ("Ben", 43)
    )
    
    // Get List of all rows as of transaction t 1032 (after retract)
    Person.name.age.getAsOf(1032) === List(
      ("Liz", 37)
    )
    t

    Transaction time t

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array extraction

    returns

    List[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetList
    See also

    Manual on asof/since

    Equivalent asynchronous getAsyncAsOf method.

  159. def getAsync(n: Int)(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[List[Tpl]]

    Get Future with List of n rows as tuples matching molecule.

    Get Future with List of n rows as tuples matching molecule.

    For more info and code examples see equivalent synchronous get method.

    Since retrieving a List is considered the default fetch format, the getter method is simply named get (and not getList).

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array extraction

    returns

    List[Tpl] where Tpl is a tuple of types matching the attributes of the molecule

    Definition Classes
    GetAsyncList
  160. def getAsync(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[List[Tpl]]

    Get Future with List of all rows as tuples matching molecule.

    Get Future with List of all rows as tuples matching molecule.

    For more info and code examples see equivalent synchronous get method.

    Since retrieving a List is considered the default fetch format, the getter method is simply named get (and not getList).

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array extraction

    returns

    List[Tpl] where Tpl is a tuple of types matching the attributes of the molecule

    Definition Classes
    GetAsyncList
  161. def getAsyncArray(n: Int)(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[Array[Tpl]]

    Get Future with Array of n rows as tuples matching molecule.

    Get Future with Array of n rows as tuples matching molecule.

    For more info and code examples see equivalent synchronous getArray method.

    n

    Number of rows

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array

    returns

    Future[Array[Tpl]] where Tpl is a tuple of types matching the attributes of the molecule

    Definition Classes
    GetAsyncArray
  162. def getAsyncArray(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[Array[Tpl]]

    Get Future with Array of all rows as tuples matching molecule.

    Get Future with Array of all rows as tuples matching molecule.

    For more info and code examples see equivalent synchronous getArray method.

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array

    returns

    Future[Array[Tpl]] where Tpl is a tuple of types matching the attributes of the molecule

    Definition Classes
    GetAsyncArray
  163. def getAsyncArrayAsOf(date: Date, n: Int)(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[Array[Tpl]]

    Get Future with Array of n rows as tuples matching molecule as of date.

    Get Future with Array of n rows as tuples matching molecule as of date.

    Get data at a human point in time (a java.util.Date).

    For more info and code examples see equivalent synchronous getArrayAsOf method.

    Getting a pre-allocated Array populated with typed data is the fastest way to query Datomic with Molecule. Looping the Array in a while loop with a mutable index pointer will also be the fastest way to traverse the data set.

    The Array is only populated with n rows of type-casted tuples.

    date

    java.util.Date

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array

    returns

    Array[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetAsyncArray
    See also

    Manual on asof/since

  164. def getAsyncArrayAsOf(date: Date)(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[Array[Tpl]]

    Get Future with Array of all rows as tuples matching molecule as of date.

    Get Future with Array of all rows as tuples matching molecule as of date.

    Get data at a human point in time (a java.util.Date).

    For more info and code examples see equivalent synchronous getArrayAsOf method.

    Getting a pre-allocated Array populated with typed data is the fastest way to query Datomic with Molecule. Looping the Array in a while loop with a mutable index pointer will also be the fastest way to traverse the data set.

    date

    java.util.Date

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array

    returns

    Array[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetAsyncArray
    See also

    Manual on asof/since

  165. def getAsyncArrayAsOf(tx: TxReport, n: Int)(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[Array[Tpl]]

    Get Future with Array of n rows as tuples matching molecule as of tx.

    Get Future with Array of n rows as tuples matching molecule as of tx.

    Datomic's internal asOf method can take a transaction entity id as argument to retrieve a database value as of that transaction (including).

    Instead of supplying the transaction entity id, in Molecule we supply a TxReport that contains the transaction entity id (which is used as argument to Datomic internally). This is more convenient when using Molecule since we get a TxReport from transaction operations like get, update, retract etc.

    For more info and code examples see equivalent synchronous getArrayAsOf method.

    Getting a pre-allocated Array populated with typed data is the fastest way to query Datomic with Molecule. Looping the Array in a while loop with a mutable index pointer will also be the fastest way to traverse the data set.

    The Array is only populated with n rows of type-casted tuples.

    tx

    TxReport (returned from all molecule transaction operations)

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array

    returns

    Array[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetAsyncArray
    See also

    Manual on asof/since

  166. def getAsyncArrayAsOf(tx: TxReport)(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[Array[Tpl]]

    Get Future with Array of all rows as tuples matching molecule as of tx.

    Get Future with Array of all rows as tuples matching molecule as of tx.

    Datomic's internal asOf method can take a transaction entity id as argument to retrieve a database value as of that transaction (including).

    Instead of supplying the transaction entity id, in Molecule we supply a TxReport that contains the transaction entity id (which is used as argument to Datomic internally). This is more convenient when using Molecule since we get a TxReport from transaction operations like get, update, retract etc.

    For more info and code examples see equivalent synchronous getArrayAsOf method.

    Getting a pre-allocated Array populated with typed data is the fastest way to query Datomic with Molecule. Looping the Array in a while loop with a mutable index pointer will also be the fastest way to traverse the data set.

    tx

    TxReport (returned from all molecule transaction operations)

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array

    returns

    Array[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetAsyncArray
    See also

    Manual on asof/since

  167. def getAsyncArrayAsOf(t: Long, n: Int)(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[Array[Tpl]]

    Get Future with Array of n rows as tuples matching molecule as of transaction time t.

    Get Future with Array of n rows as tuples matching molecule as of transaction time t.

    Transaction time t is an auto-incremented transaction number assigned internally by Datomic.

    t can for instance be retrieved in a getHistory call for an attribute and then be used to get data as of that point in time (including that transaction).

    For more info and code examples see equivalent synchronous getArrayAsOf method.

    Getting a pre-allocated Array populated with typed data is the fastest way to query Datomic with Molecule. Looping the Array in a while loop with a mutable index pointer will also be the fastest way to traverse the data set.

    The Array is only populated with n rows of type-casted tuples.

    t

    Long Transaction time t

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array

    returns

    Array[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetAsyncArray
    See also

    Manual on asof/since

  168. def getAsyncArrayAsOf(t: Long)(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[Array[Tpl]]

    Get Future with Array of all rows as tuples matching molecule as of transaction time t.

    Get Future with Array of all rows as tuples matching molecule as of transaction time t.

    Transaction time t is an auto-incremented transaction number assigned internally by Datomic.

    t can for instance be retrieved in a getHistory call for an attribute and then be used to get data as of that point in time (including that transaction).

    For more info and code examples see equivalent synchronous getArrayAsOf method.

    Getting a pre-allocated Array populated with typed data is the fastest way to query Datomic with Molecule. Looping the Array in a while loop with a mutable index pointer will also be the fastest way to traverse the data set.

    t

    Transaction time t

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array

    returns

    Array[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetAsyncArray
    See also

    Manual on asof/since

  169. def getAsyncArraySince(date: Date, n: Int)(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[Array[Tpl]]

    Get Future with Array of n rows as tuples matching molecule since date.

    Get Future with Array of n rows as tuples matching molecule since date.

    Get data added/retracted since a human point in time (a java.util.Date).

    For more info and code examples see equivalent synchronous getArraySince method.

    Getting a pre-allocated Array populated with typed data is the fastest way to query Datomic with Molecule. Looping the Array in a while loop with a mutable index pointer will also be the fastest way to traverse the data set.

    The Array is only populated with n rows of type-casted tuples.

    date

    java.util.Date

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array

    returns

    Array[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetAsyncArray
    See also

    Manual on asof/since

  170. def getAsyncArraySince(date: Date)(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[Array[Tpl]]

    Get Future with Array of all rows as tuples matching molecule since date.

    Get Future with Array of all rows as tuples matching molecule since date.

    Get data added/retracted since a human point in time (a java.util.Date).

    For more info and code examples see equivalent synchronous getArraySince method.

    Getting a pre-allocated Array populated with typed data is the fastest way to query Datomic with Molecule. Looping the Array in a while loop with a mutable index pointer will also be the fastest way to traverse the data set.

    date

    java.util.Date

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array

    returns

    Array[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetAsyncArray
    See also

    Manual on asof/since

  171. def getAsyncArraySince(tx: TxReport, n: Int)(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[Array[Tpl]]

    Get Future with Array of n rows as tuples matching molecule since tx.

    Get Future with Array of n rows as tuples matching molecule since tx.

    Datomic's internal since can take a transaction entity id as argument to retrieve a database value since that transaction (excluding the transaction itself).

    Instead of supplying the transaction entity id, in Molecule we supply a TxReport that contains the transaction entity id (which is used as argument to Datomic internally). This is more convenient when using Molecule since we get a TxReport from transaction operations like get, update, retract etc.

    For more info and code examples see equivalent synchronous getArraySince method.

    Getting a pre-allocated Array populated with typed data is the fastest way to query Datomic with Molecule. Looping the Array in a while loop with a mutable index pointer will also be the fastest way to traverse the data set.

    The Array is only populated with n rows of type-casted tuples.

    tx

    TxReport

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array

    returns

    Array[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetAsyncArray
    See also

    Manual on asof/since

  172. def getAsyncArraySince(tx: TxReport)(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[Array[Tpl]]

    Get Future with Array of all rows as tuples matching molecule since tx.

    Get Future with Array of all rows as tuples matching molecule since tx.

    Datomic's internal since can take a transaction entity id as argument to retrieve a database value since that transaction (excluding the transaction itself).

    Instead of supplying the transaction entity id, in Molecule we supply a TxReport that contains the transaction entity id (which is used as argument to Datomic internally). This is more convenient when using Molecule since we get a TxReport from transaction operations like get, update, retract etc.

    For more info and code examples see equivalent synchronous getArraySince method.

    Getting a pre-allocated Array populated with typed data is the fastest way to query Datomic with Molecule. Looping the Array in a while loop with a mutable index pointer will also be the fastest way to traverse the data set.

    tx

    TxReport

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array

    returns

    Array[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetAsyncArray
    See also

    Manual on asof/since

  173. def getAsyncArraySince(t: Long, n: Int)(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[Array[Tpl]]

    Get Future with Array of n rows as tuples matching molecule since transaction time t.

    Get Future with Array of n rows as tuples matching molecule since transaction time t.

    Transaction time t is an auto-incremented transaction number assigned internally by Datomic.

    t can for instance be retrieved by calling t on the tx report returned from transactional operations and then be used to get data since that point in time (excluding that transaction).

    For more info and code examples see equivalent synchronous getArraySince method.

    Getting a pre-allocated Array populated with typed data is the fastest way to query Datomic with Molecule. Looping the Array in a while loop with a mutable index pointer will also be the fastest way to traverse the data set.

    The Array is only populated with n rows of type-casted tuples.

    t

    Transaction time t

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array

    returns

    Array[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetAsyncArray
    See also

    Manual on asof/since

  174. def getAsyncArraySince(t: Long)(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[Array[Tpl]]

    Get Future with Array of all rows as tuples matching molecule since transaction time t.

    Get Future with Array of all rows as tuples matching molecule since transaction time t.

    Transaction time t is an auto-incremented transaction number assigned internally by Datomic.

    t can for instance be retrieved by calling t on the tx report returned from transactional operations and then be used to get data since that point in time (excluding that transaction).

    For more info and code examples see equivalent synchronous getArraySince method.

    Getting a pre-allocated Array populated with typed data is the fastest way to query Datomic with Molecule. Looping the Array in a while loop with a mutable index pointer will also be the fastest way to traverse the data set.

    t

    Transaction time t

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array

    returns

    Array[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetAsyncArray
    See also

    Manual on asof/since

  175. def getAsyncArrayWith(txData: List[_], n: Int)(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[Array[Tpl]]

    Get Future with Array of n rows as tuples matching molecule with applied raw transaction data.

    Get Future with Array of n rows as tuples matching molecule with applied raw transaction data.

    Apply raw transaction data to in-memory "branch" of db without affecting db.

    For more info and code examples see equivalent synchronous getArrayWith method.

    Getting a pre-allocated Array populated with typed data is the fastest way to query Datomic with Molecule. Looping the Array in a while loop with a mutable index pointer will also be the fastest way to traverse the data set.

    The Array is only populated with n rows of type-casted tuples.

    txData

    Raw transaction data as java.util.List[Object]

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array

    returns

    Array[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetAsyncArray
    See also

    Manual on with

  176. def getAsyncArrayWith(txData: List[_])(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[Array[Tpl]]

    Get Future with Array of all rows as tuples matching molecule with applied raw transaction data.

    Get Future with Array of all rows as tuples matching molecule with applied raw transaction data.

    Apply raw transaction data to in-memory "branch" of db without affecting db.

    For more info and code examples see equivalent synchronous getArrayWith method.

    Getting a pre-allocated Array populated with typed data is the fastest way to query Datomic with Molecule. Looping the Array in a while loop with a mutable index pointer will also be the fastest way to traverse the data set.

    txData

    Raw transaction data as java.util.List[Object]

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array

    returns

    Array[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetAsyncArray
    See also

    Manual on with

  177. def getAsyncArrayWith(n: Int, txMolecules: Seq[Seq[Statement]]*)(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[Array[Tpl]]

    Get Future with Array of n rows as tuples matching molecule with applied molecule transaction data.

    Get Future with Array of n rows as tuples matching molecule with applied molecule transaction data.

    Apply one or more molecule transactions to in-memory "branch" of db without affecting db.

    For more info and code examples see equivalent synchronous getArrayWith method.

    Getting a pre-allocated Array populated with typed data is the fastest way to query Datomic with Molecule. Looping the Array in a while loop with a mutable index pointer will also be the fastest way to traverse the data set.

    The Array is only populated with n rows of type-casted tuples.

    n

    Int Number of rows returned

    txMolecules

    Transaction statements from applied Molecules with test data

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array

    returns

    Array[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetAsyncArray
    Note

    Note how the n parameter has to come before the txMolecules vararg.

    See also

    Manual on with

  178. def getAsyncArrayWith(txMolecules: Seq[Seq[Statement]]*)(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[Array[Tpl]]

    Get Future with Array of all rows as tuples matching molecule with applied molecule transaction data.

    Get Future with Array of all rows as tuples matching molecule with applied molecule transaction data.

    Apply one or more molecule transactions to in-memory "branch" of db without affecting db.

    For more info and code examples see equivalent synchronous getArrayWith method.

    Multiple transactions can be applied to test more complex what-if scenarios!

    Getting a pre-allocated Array populated with typed data is the fastest way to query Datomic with Molecule. Looping the Array in a while loop with a mutable index pointer will also be the fastest way to traverse the data set.

    txMolecules

    Transaction statements from applied Molecules with test data

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array

    returns

    Array[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetAsyncArray
    See also

    Manual on with

  179. def getAsyncAsOf(date: Date, n: Int)(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[List[Tpl]]

    Get Future with List of n rows as tuples matching molecule as of date.

    Get Future with List of n rows as tuples matching molecule as of date.

    Get data at a human point in time (a java.util.Date).

    For more info and code examples see equivalent synchronous getAsOf method.

    date

    java.util.Date

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array extraction

    returns

    List[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetAsyncList
    See also

    Manual on asof/since

  180. def getAsyncAsOf(date: Date)(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[List[Tpl]]

    Get Future with List of all rows as tuples matching molecule as of date.

    Get Future with List of all rows as tuples matching molecule as of date.

    Get data at a human point in time (a java.util.Date).

    For more info and code examples see equivalent synchronous getAsOf method.

    date

    java.util.Date

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array extraction

    returns

    List[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetAsyncList
    See also

    Manual on asof/since

  181. def getAsyncAsOf(tx: TxReport, n: Int)(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[List[Tpl]]

    Get Future with List of n rows as tuples matching molecule as of tx.

    Get Future with List of n rows as tuples matching molecule as of tx.

    Datomic's internal asOf method can take a transaction entity id as argument to retrieve a database value as of that transaction (including).

    Instead of supplying the transaction entity id, in Molecule we supply a TxReport that contains the transaction entity id (which is used as argument to Datomic internally). This is more convenient when using Molecule since we get a TxReport from transaction operations like get, update, retract etc.

    For more info and code examples see equivalent synchronous getAsOf method.

    tx

    TxReport (returned from all molecule transaction operations)

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array extraction

    returns

    List[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetAsyncList
    See also

    Manual on asof/since

  182. def getAsyncAsOf(tx: TxReport)(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[List[Tpl]]

    Get Future with List of all rows as tuples matching molecule as of tx.

    Get Future with List of all rows as tuples matching molecule as of tx.

    Datomic's internal asOf method can take a transaction entity id as argument to retrieve a database value as of that transaction (including).

    Instead of supplying the transaction entity id, in Molecule we supply a TxReport that contains the transaction entity id (which is used as argument to Datomic internally). This is more convenient when using Molecule since we get a TxReport from transaction operations like get, update, retract etc.

    For more info and code examples see equivalent synchronous getAsOf method.

    tx

    TxReport (returned from all molecule transaction operations)

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array extraction

    returns

    List[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetAsyncList
    See also

    Manual on asof/since

  183. def getAsyncAsOf(t: Long, n: Int)(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[List[Tpl]]

    Get Future with List of n rows as tuples matching molecule as of transaction time t.

    Get Future with List of n rows as tuples matching molecule as of transaction time t.

    Transaction time t is an auto-incremented transaction number assigned internally by Datomic.

    t can for instance be retrieved in a getHistory call for an attribute and then be used to get data as of that point in time (including that transaction).

    For more info and code examples see equivalent synchronous getAsOf method.

    t

    Long Transaction time t

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array extraction

    returns

    List[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetAsyncList
    See also

    Manual on asof/since

  184. def getAsyncAsOf(t: Long)(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[List[Tpl]]

    Get Future with List of all rows as tuples matching molecule as of transaction time t.

    Get Future with List of all rows as tuples matching molecule as of transaction time t.

    Transaction time t is an auto-incremented transaction number assigned internally by Datomic.

    t can for instance be retrieved in a getHistory call for an attribute and then be used to get data as of that point in time (including that transaction).

    For more info and code examples see equivalent synchronous getAsOf method.

    t

    Transaction time t

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array extraction

    returns

    List[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetAsyncList
    See also

    Manual on asof/since

  185. def getAsyncHistory(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[List[Tpl]]

    Get Future with history of operations as List on an attribute in the db.

    Get Future with history of operations as List on an attribute in the db.

    For more info and code examples see equivalent synchronous getHistory method.

    conn

    Implicit Conn value in scope

    returns

    List[Tpl] where Tpl is tuple of data matching molecule

    Definition Classes
    GetAsyncList
    See also

    manual for more info on generic attributes.

  186. def getAsyncIterable(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[Iterable[Tpl]]

    Get Future with Iterable of all rows as tuples matching the molecule.

    Get Future with Iterable of all rows as tuples matching the molecule.

    Rows are lazily type-casted on each call to iterator.next().

    For more info and code examples see equivalent synchronous getIterable method.

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for later Array extractions

    returns

    Iterable[Tpl] where Tpl is a tuple of types matching the attributes of the molecule

    Definition Classes
    GetAsyncIterable
  187. def getAsyncIterableAsOf(date: Date)(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[Iterable[Tpl]]

    Get Future with Iterable of all rows as tuples matching molecule as of date.

    Get Future with Iterable of all rows as tuples matching molecule as of date.

    Get data at a human point in time (a java.util.Date).

    For more info and code examples see equivalent synchronous getIterableAsOf method.

    date

    java.util.Date

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for later Array extractions

    returns

    Iterable[Tpl] where Tpl is tuple of data matching molecule

    Definition Classes
    GetAsyncIterable
    See also

    Manual on asof/since

  188. def getAsyncIterableAsOf(tx: TxReport)(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[Iterable[Tpl]]

    Get Future with Iterable of all rows as tuples matching molecule as of tx.

    Get Future with Iterable of all rows as tuples matching molecule as of tx.

    Datomic's internal asOf method can take a transaction entity id as argument to retrieve a database value as of that transaction (including).

    Instead of supplying the transaction entity id, in Molecule we supply a TxReport that contains the transaction entity id (which is used as argument to Datomic internally). This is more convenient when using Molecule since we get a TxReport from transaction operations like get, update, retract etc.

    For more info and code examples see equivalent synchronous getIterableAsOf method.

    tx

    TxReport (returned from all molecule transaction operations)

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for later Array extractions

    returns

    Iterable[Tpl] where Tpl is tuple of data matching molecule

    Definition Classes
    GetAsyncIterable
    See also

    Manual on asof/since

  189. def getAsyncIterableAsOf(t: Long)(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[Iterable[Tpl]]

    Get Future with Iterable of all rows as tuples matching molecule as of transaction time t.

    Get Future with Iterable of all rows as tuples matching molecule as of transaction time t.

    Transaction time t is an auto-incremented transaction number assigned internally by Datomic.

    t can for instance be retrieved in a getHistory call for an attribute and then be used to get data as of that point in time (including that transaction).

    Call getIterableAsOf for large result sets to maximize runtime performance. Data is lazily type-casted on each call to next on the iterator.

    For more info and code examples see equivalent synchronous getIterableAsOf method.

    t

    Transaction time t

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for later Array extractions

    returns

    Iterable[Tpl] where Tpl is tuple of data matching molecule

    Definition Classes
    GetAsyncIterable
    See also

    Manual on asof/since

  190. def getAsyncIterableSince(date: Date)(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[Iterable[Tpl]]

    Get Future with Iterable of all rows as tuples matching molecule since date.

    Get Future with Iterable of all rows as tuples matching molecule since date.

    Get data added/retracted since a human point in time (a java.util.Date).

    For more info and code examples see equivalent synchronous getIterableSince method.

    date

    java.util.Date

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for later Array extractions

    returns

    Iterable[Tpl] where Tpl is tuple of data matching molecule

    Definition Classes
    GetAsyncIterable
    See also

    Manual on asof/since

  191. def getAsyncIterableSince(tx: TxReport)(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[Iterable[Tpl]]

    Get Future with Iterable of all rows as tuples matching molecule since tx.

    Get Future with Iterable of all rows as tuples matching molecule since tx.

    Datomic's internal since method can take a transaction entity id as argument to retrieve a database value since that transaction (excluding the transaction itself).

    Instead of supplying the transaction entity id, in Molecule we supply a TxReport that contains the transaction entity id (which is used as argument to Datomic internally). This is more convenient when using Molecule since we get a TxReport from transaction operations like get, update, retract etc.

    For more info and code examples see equivalent synchronous getIterableSince method.

    tx

    TxReport

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for later Array extractions

    returns

    Iterable[Tpl] where Tpl is tuple of data matching molecule

    Definition Classes
    GetAsyncIterable
    See also

    Manual on asof/since

  192. def getAsyncIterableSince(t: Long)(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[Iterable[Tpl]]

    Get Future with Iterable of all rows as tuples matching molecule since transaction time t.

    Get Future with Iterable of all rows as tuples matching molecule since transaction time t.

    Transaction time t is an auto-incremented transaction number assigned internally by Datomic.

    Call getIterableSince for large result sets to maximize runtime performance. Data is lazily type-casted on each call to next on the iterator.

    For more info and code examples see equivalent synchronous getIterableSince method.

    t

    Transaction time t

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for later Array extractions

    returns

    Iterable[Tpl] where Tpl is tuple of data matching molecule

    Definition Classes
    GetAsyncIterable
    See also

    Manual on asof/since

  193. def getAsyncIterableWith(txData: List[_])(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[Iterable[Tpl]]

    Get Future with Iterable of all rows as tuples matching molecule with applied raw transaction data.

    Get Future with Iterable of all rows as tuples matching molecule with applied raw transaction data.

    Apply raw transaction data to in-memory "branch" of db without affecting db. *

    * For more info and code examples see equivalent synchronous * getIterableWith method.

    txData

    Raw transaction data as java.util.List[Object]

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for later Array extractions

    returns

    Iterable of molecule data

    Definition Classes
    GetAsyncIterable
    See also

    Manual on with

  194. def getAsyncIterableWith(txMolecules: Seq[Seq[Statement]]*)(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[Iterable[Tpl]]

    Get Future with Iterable of all rows as tuples matching molecule with applied molecule transaction data.

    Get Future with Iterable of all rows as tuples matching molecule with applied molecule transaction data.

    Apply one or more molecule transactions to in-memory "branch" of db without affecting db.

    For more info and code examples see equivalent synchronous getIterableWith method.

    Multiple transactions can be applied to test more complex what-if scenarios!

    txMolecules

    Transaction statements from applied Molecules with test data

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for later Array extractions

    returns

    Iterable of molecule data

    Definition Classes
    GetAsyncIterable
    See also

    Manual on with

  195. def getAsyncJson(n: Int)(implicit conn: Conn): Future[String]

    Get Future with json data for n rows matching molecule.

    Get Future with json data for n rows matching molecule.

    Namespace.Attribute is used as json fields. Values are quoted when necessary. Nested data becomes json objects etc.

    For more info and code examples see equivalent synchronous getJson method.

    n

    Number of rows returned

    conn

    Implicit Conn value in scope

    returns

    String of json

    Definition Classes
    GetAsyncJson
    See also

    Manual on getJson

  196. def getAsyncJson(implicit conn: Conn): Future[String]

    Get Future with json data for all rows matching molecule.

    Get Future with json data for all rows matching molecule.

    Namespace.Attribute is used as json fields. Values are quoted when necessary. Nested data becomes json objects etc.

    For more info and code examples see equivalent synchronous getJson method.

    conn

    Implicit Conn value in scope

    returns

    String of json

    Definition Classes
    GetAsyncJson
    See also

    Manual on getJson

  197. def getAsyncJsonAsOf(date: Date, n: Int)(implicit conn: Conn): Future[String]

    Get Future with json data for n rows matching molecule as of tx.

    Get Future with json data for n rows matching molecule as of tx.

    Get data at a human point in time (a java.util.Date).

    For more info and code examples see equivalent synchronous getJsonAsOf method.

    date

    java.util.Date

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    returns

    String of json

    Definition Classes
    GetAsyncJson
    See also

    Manual on asof/since

  198. def getAsyncJsonAsOf(date: Date)(implicit conn: Conn): Future[String]

    Get Future with json data for all rows matching molecule as of date.

    Get Future with json data for all rows matching molecule as of date.

    Get data at a human point in time (a java.util.Date).

    For more info and code examples see equivalent synchronous getJsonAsOf method.

    date

    java.util.Date

    conn

    Implicit Conn value in scope

    returns

    String of json

    Definition Classes
    GetAsyncJson
    See also

    Manual on asof/since

  199. def getAsyncJsonAsOf(tx: TxReport, n: Int)(implicit conn: Conn): Future[String]

    Get Future with json data for n rows matching molecule as of tx.

    Get Future with json data for n rows matching molecule as of tx.

    Datomic's internal asOf method can take a transaction entity id as argument to retrieve a database value as of that transaction (including).

    Instead of supplying the transaction entity id, in Molecule we supply a TxReport that contains the transaction entity id (which is used as argument to Datomic internally). This is more convenient when using Molecule since we get a TxReport from transaction operations like get, update, retract etc.

    For more info and code examples see equivalent synchronous getJsonAsOf method.

    tx

    TxReport (returned from all molecule transaction operations)

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    returns

    String of json

    Definition Classes
    GetAsyncJson
    See also

    Manual on asof/since

  200. def getAsyncJsonAsOf(tx: TxReport)(implicit conn: Conn): Future[String]

    Get Future with json data for all rows matching molecule as of tx.

    Get Future with json data for all rows matching molecule as of tx.

    Datomic's internal asOf method can take a transaction entity id as argument to retrieve a database value as of that transaction (including).

    Instead of supplying the transaction entity id, in Molecule we supply a TxReport that contains the transaction entity id (which is used as argument to Datomic internally). This is more convenient when using Molecule since we get a TxReport from transaction operations like get, update, retract etc.

    For more info and code examples see equivalent synchronous getJsonAsOf method.

    tx

    TxReport (returned from all molecule transaction operations)

    conn

    Implicit Conn value in scope

    returns

    String of json

    Definition Classes
    GetAsyncJson
    See also

    Manual on asof/since

  201. def getAsyncJsonAsOf(t: Long, n: Int)(implicit conn: Conn): Future[String]

    Get Future with json data for n rows matching molecule as of transaction time t.

    Get Future with json data for n rows matching molecule as of transaction time t.

    Transaction time t is an auto-incremented transaction number assigned internally by Datomic.

    t can for instance be retrieved in a getHistory call for an attribute and then be used to get data as of that point in time (including that transaction).

    For more info and code examples see equivalent synchronous getJsonAsOf method.

    t

    Transaction time t

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    returns

    String of json

    Definition Classes
    GetAsyncJson
    See also

    Manual on asof/since

  202. def getAsyncJsonAsOf(t: Long)(implicit conn: Conn): Future[String]

    Get Future with json data for all rows matching molecule as of transaction time t.

    Get Future with json data for all rows matching molecule as of transaction time t.

    Transaction time t is an auto-incremented transaction number assigned internally by Datomic.

    t can for instance be retrieved in a getHistory call for an attribute and then be used to get data as of that point in time (including that transaction).

    For more info and code examples see equivalent synchronous getJsonAsOf method.

    t

    Transaction time t

    conn

    Implicit Conn value in scope

    returns

    String of json

    Definition Classes
    GetAsyncJson
    See also

    Manual on asof/since

  203. def getAsyncJsonSince(date: Date, n: Int)(implicit conn: Conn): Future[String]

    Get Future with json data for n rows matching molecule since date.

    Get Future with json data for n rows matching molecule since date.

    Get data added/retracted since a human point in time (a java.util.Date).

    For more info and code examples see equivalent synchronous getJsonSince method.

    date

    java.util.Date

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    returns

    String of json

    Definition Classes
    GetAsyncJson
    See also

    Manual on asof/since

  204. def getAsyncJsonSince(date: Date)(implicit conn: Conn): Future[String]

    Get Future with json data for all rows matching molecule since date.

    Get Future with json data for all rows matching molecule since date.

    Get data added/retracted since a human point in time (a java.util.Date).

    For more info and code examples see equivalent synchronous getJsonSince method.

    date

    java.util.Date

    conn

    Implicit Conn value in scope

    returns

    String of json

    Definition Classes
    GetAsyncJson
    See also

    Manual on asof/since

  205. def getAsyncJsonSince(tx: TxReport, n: Int)(implicit conn: Conn): Future[String]

    Get Future with json data for n rows matching molecule since tx.

    Get Future with json data for n rows matching molecule since tx.

    Datomic's internal since can take a transaction entity id as argument to retrieve a database value since that transaction (excluding the transaction itself).

    Instead of supplying the transaction entity id, in Molecule we supply a TxReport that contains the transaction entity id (which is used as argument to Datomic internally). This is more convenient when using Molecule since we get a TxReport from transaction operations like get, update, retract etc.

    For more info and code examples see equivalent synchronous getJsonSince method.

    tx

    TxReport (returned from all molecule transaction operations)

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    returns

    String of json

    Definition Classes
    GetAsyncJson
    See also

    Manual on asof/since

  206. def getAsyncJsonSince(tx: TxReport)(implicit conn: Conn): Future[String]

    Get Future with json data for all rows matching molecule since tx.

    Get Future with json data for all rows matching molecule since tx.

    Datomic's internal since can take a transaction entity id as argument to retrieve a database value since that transaction (excluding the transaction itself).

    Instead of supplying the transaction entity id, in Molecule we supply a TxReport that contains the transaction entity id (which is used as argument to Datomic internally). This is more convenient when using Molecule since we get a TxReport from transaction operations like get, update, retract etc.

    For more info and code examples see equivalent synchronous getJsonSince method.

    tx

    TxReport (returned from all molecule transaction operations)

    conn

    Implicit Conn value in scope

    returns

    String of json

    Definition Classes
    GetAsyncJson
    See also

    Manual on asof/since

  207. def getAsyncJsonSince(t: Long, n: Int)(implicit conn: Conn): Future[String]

    Get Future with json data for n rows matching molecule since transaction time t.

    Get Future with json data for n rows matching molecule since transaction time t.

    Transaction time t is an auto-incremented transaction number assigned internally by Datomic.

    For more info and code examples see equivalent synchronous getJsonSince method.

    t

    Transaction time t

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    returns

    String of json

    Definition Classes
    GetAsyncJson
    See also

    Manual on asof/since

  208. def getAsyncJsonSince(t: Long)(implicit conn: Conn): Future[String]

    Get Future with json data for all rows matching molecule since transaction time t.

    Get Future with json data for all rows matching molecule since transaction time t.

    Transaction time t is an auto-incremented transaction number assigned internally by Datomic.

    For more info and code examples see equivalent synchronous getJsonSince method.

    t

    Transaction time t

    conn

    Implicit Conn value in scope

    returns

    String of json

    Definition Classes
    GetAsyncJson
    See also

    Manual on asof/since

  209. def getAsyncJsonWith(txData: List[_], n: Int)(implicit conn: Conn): Future[String]

    Get Future with json data for n rows matching molecule with applied raw transaction data.

    Get Future with json data for n rows matching molecule with applied raw transaction data.

    Apply raw transaction data to in-memory "branch" of db without affecting db.

    For more info and code examples see equivalent synchronous getJsonWith method.

    txData

    Raw transaction data as java.util.List[Object]

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    returns

    String of json

    Definition Classes
    GetAsyncJson
    See also

    Manual on with

  210. def getAsyncJsonWith(txData: List[_])(implicit conn: Conn): Future[String]

    Get Future with json data for all rows matching molecule with applied raw transaction data.

    Get Future with json data for all rows matching molecule with applied raw transaction data.

    Apply raw transaction data to in-memory "branch" of db without affecting db.

    For more info and code examples see equivalent synchronous getJsonWith method.

    txData

    Raw transaction data as java.util.List[Object]

    conn

    Implicit Conn value in scope

    returns

    String of json

    Definition Classes
    GetAsyncJson
    See also

    Manual on with

  211. def getAsyncJsonWith(n: Int, txMolecules: Seq[Seq[Statement]]*)(implicit conn: Conn): Future[String]

    Get Future with json data for all rows matching molecule with applied molecule transaction data.

    Get Future with json data for all rows matching molecule with applied molecule transaction data.

    Apply one or more molecule transactions to in-memory "branch" of db without affecting db.

    For more info and code examples see equivalent synchronous getJsonWith method.

    Multiple transactions can be applied to test more complex what-if scenarios!

    txMolecules

    Transaction statements from applied Molecules with test data

    conn

    Implicit Conn value in scope

    returns

    String of json

    Definition Classes
    GetAsyncJson
    See also

    Manual on with

  212. def getAsyncJsonWith(txMolecules: Seq[Seq[Statement]]*)(implicit conn: Conn): Future[String]

    Get Future with json data for all rows matching molecule with applied molecule transaction data.

    Get Future with json data for all rows matching molecule with applied molecule transaction data.

    Apply one or more molecule transactions to in-memory "branch" of db without affecting db.

    For more info and code examples see equivalent synchronous getJsonWith method.

    Multiple transactions can be applied to test more complex what-if scenarios!

    txMolecules

    Transaction statements from applied Molecules with test data

    conn

    Implicit Conn value in scope

    returns

    String of json

    Definition Classes
    GetAsyncJson
    See also

    Manual on with

  213. def getAsyncRaw(n: Int)(implicit conn: Conn): Future[Collection[List[AnyRef]]]

    Get Future with java.util.Collection of n untyped rows matching molecule.

    Get Future with java.util.Collection of n untyped rows matching molecule.

    Person.name.age.getRaw(1).toString === """[["Ben" 42]]"""



    For more info and code examples see equivalent synchronous getRaw method.

    n

    Number of rows

    conn

    Implicit Conn value in scope

    returns

    java.util.Collection[java.util.List[AnyRef]]

    Definition Classes
    GetAsyncRaw
  214. def getAsyncRaw(implicit conn: Conn): Future[Collection[List[AnyRef]]]

    Get Future with java.util.Collection of all untyped rows matching molecule.

    Get Future with java.util.Collection of all untyped rows matching molecule.

    Person.name.age.getRaw.toString === """`[["Ben" 42], ["Liz" 37]]"""



    For more info and code examples see equivalent synchronous getRaw method.

    conn

    Implicit Conn value in scope

    returns

    java.util.Collection[java.util.List[AnyRef]]

    Definition Classes
    GetAsyncRaw
  215. def getAsyncRawAsOf(date: Date, n: Int)(implicit conn: Conn): Future[Collection[List[AnyRef]]]

    Get Future with java.util.Collection of n untyped rows matching molecule as of date.

    Get Future with java.util.Collection of n untyped rows matching molecule as of date.

    Call getRawAsOf when data doesn't need to be type-casted. Datomic's raw data is returned as-is.

    Get data at a human point in time (a java.util.Date).

    For more info and code examples see equivalent synchronous getRawAsOf method.

    date

    java.util.Date

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    returns

    java.util.Collection[java.util.List[AnyRef]]

    Definition Classes
    GetAsyncRaw
    See also

    Manual on asof/since

  216. def getAsyncRawAsOf(date: Date)(implicit conn: Conn): Future[Collection[List[AnyRef]]]

    Get Future with java.util.Collection of all untyped rows matching molecule as of date.

    Get Future with java.util.Collection of all untyped rows matching molecule as of date.

    Call getRawAsOf when data doesn't need to be type-casted. Datomic's raw data is returned as-is.

    Get data at a human point in time (a java.util.Date).

    For more info and code examples see equivalent synchronous getRawAsOf method.

    date

    java.util.Date

    conn

    Implicit Conn value in scope

    returns

    java.util.Collection[java.util.List[AnyRef]]

    Definition Classes
    GetAsyncRaw
    See also

    Manual on asof/since

  217. def getAsyncRawAsOf(tx: TxReport, n: Int)(implicit conn: Conn): Future[Collection[List[AnyRef]]]

    Get Future with java.util.Collection of n untyped rows matching molecule as of tx.

    Get Future with java.util.Collection of n untyped rows matching molecule as of tx.

    Call getRawAsOf when data doesn't need to be type-casted. Datomic's raw data is returned as-is.

    Datomic's internal asOf method can take a transaction entity id as argument to retrieve a database value as of that transaction (including).

    Instead of supplying the transaction entity id, in Molecule we supply a TxReport that contains the transaction entity id (which is used as argument to Datomic internally). This is more convenient when using Molecule since we get a TxReport from transaction operations like get, update, retract etc.

    For more info and code examples see equivalent synchronous getRawAsOf method.

    tx

    TxReport (returned from all molecule transaction operations)

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    returns

    java.util.Collection[java.util.List[AnyRef]]

    Definition Classes
    GetAsyncRaw
    See also

    Manual on asof/since

  218. def getAsyncRawAsOf(tx: TxReport)(implicit conn: Conn): Future[Collection[List[AnyRef]]]

    Get Future with java.util.Collection of all untyped rows matching molecule as of tx.

    Get Future with java.util.Collection of all untyped rows matching molecule as of tx.

    Call getRawAsOf when data doesn't need to be type-casted. Datomic's raw data is returned as-is.

    Datomic's internal asOf method can take a transaction entity id as argument to retrieve a database value as of that transaction (including).

    Instead of supplying the transaction entity id, in Molecule we supply a TxReport that contains the transaction entity id (which is used as argument to Datomic internally). This is more convenient when using Molecule since we get a TxReport from transaction operations like get, update, retract etc.

    For more info and code examples see equivalent synchronous getRawAsOf method.

    tx

    TxReport (returned from all molecule transaction operations)

    conn

    Implicit Conn value in scope

    returns

    java.util.Collection[java.util.List[AnyRef]]

    Definition Classes
    GetAsyncRaw
    See also

    Manual on asof/since

  219. def getAsyncRawAsOf(t: Long, n: Int)(implicit conn: Conn): Future[Collection[List[AnyRef]]]

    Get Future with java.util.Collection of n untyped rows matching molecule as of transaction time t.

    Get Future with java.util.Collection of n untyped rows matching molecule as of transaction time t.

    Call getRawAsOf when data doesn't need to be type-casted. Datomic's raw data is returned as-is.

    Transaction time t is an auto-incremented transaction number assigned internally by Datomic.

    t can for instance be retrieved in a getHistory call for an attribute and then be used to get data as of that point in time (including that transaction).

    t can for instance be retrieved in a getHistory call for an attribute and then be used to get data as of that point in time (including that transaction).

    For more info and code examples see equivalent synchronous getRawAsOf method.

    t

    Transaction time t

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    returns

    java.util.Collection[java.util.List[AnyRef]]

    Definition Classes
    GetAsyncRaw
    See also

    Manual on asof/since

  220. def getAsyncRawAsOf(t: Long)(implicit conn: Conn): Future[Collection[List[AnyRef]]]

    Get Future with java.util.Collection of all untyped rows matching molecule as of transaction time t.

    Get Future with java.util.Collection of all untyped rows matching molecule as of transaction time t.

    Call getRawAsOf when data doesn't need to be type-casted. Datomic's raw data is returned as-is.

    Transaction time t is an auto-incremented transaction number assigned internally by Datomic.

    t can for instance be retrieved in a getHistory call for an attribute and then be used to get data as of that point in time (including that transaction).

    For more info and code examples see equivalent synchronous getRawAsOf method.

    t

    Transaction time t

    conn

    Implicit Conn value in scope

    returns

    java.util.Collection[java.util.List[AnyRef]]

    Definition Classes
    GetAsyncRaw
    See also

    Manual on asof/since

  221. def getAsyncRawSince(date: Date, n: Int)(implicit conn: Conn): Future[Collection[List[AnyRef]]]

    Get Future with java.util.Collection of n untyped rows matching molecule since date.

    Get Future with java.util.Collection of n untyped rows matching molecule since date.

    Call getRawSince when data doesn't need to be type-casted. Datomic's raw data is returned as-is.

    Get data added/retracted since a human point in time (a java.util.Date).

    For more info and code examples see equivalent synchronous getRawSince method.

    date

    java.util.Date

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    returns

    java.util.Collection[java.util.List[AnyRef]]

    Definition Classes
    GetAsyncRaw
    See also

    Manual on asof/since

  222. def getAsyncRawSince(date: Date)(implicit conn: Conn): Future[Collection[List[AnyRef]]]

    Get Future with java.util.Collection of all untyped rows matching molecule since date.

    Get Future with java.util.Collection of all untyped rows matching molecule since date.

    Call getRawSince when data doesn't need to be type-casted. Datomic's raw data is returned as-is.

    Get data added/retracted since a human point in time (a java.util.Date).

    For more info and code examples see equivalent synchronous getRawSince method.

    date

    java.util.Date

    conn

    Implicit Conn value in scope

    returns

    java.util.Collection[java.util.List[AnyRef]]

    Definition Classes
    GetAsyncRaw
    See also

    Manual on asof/since

  223. def getAsyncRawSince(tx: TxReport, n: Int)(implicit conn: Conn): Future[Collection[List[AnyRef]]]

    Get Future with java.util.Collection of n untyped rows matching molecule since tx.

    Get Future with java.util.Collection of n untyped rows matching molecule since tx.

    Call getRawSince when data doesn't need to be type-casted. Datomic's raw data is returned as-is.

    Datomic's internal since method can take a transaction entity id as argument to retrieve a database value since that transaction (excluding).

    Instead of supplying the transaction entity id, in Molecule we supply a TxReport that contains the transaction entity id (which is used as argument to Datomic internally). This is more convenient when using Molecule since we get a TxReport from transaction operations like get, update, retract etc.

    For more info and code examples see equivalent synchronous getRawSince method.

    tx

    TxReport (returned from all molecule transaction operations)

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    returns

    java.util.Collection[java.util.List[AnyRef]]

    Definition Classes
    GetAsyncRaw
    See also

    Manual on asof/since

  224. def getAsyncRawSince(tx: TxReport)(implicit conn: Conn): Future[Collection[List[AnyRef]]]

    Get Future with java.util.Collection of all untyped rows matching molecule since tx.

    Get Future with java.util.Collection of all untyped rows matching molecule since tx.

    Call getRawSince when data doesn't need to be type-casted. Datomic's raw data is returned as-is.

    Datomic's internal since method can take a transaction entity id as argument to retrieve a database value since that transaction (excluding).

    Instead of supplying the transaction entity id, in Molecule we supply a TxReport that contains the transaction entity id (which is used as argument to Datomic internally). This is more convenient when using Molecule since we get a TxReport from transaction operations like get, update, retract etc.

    For more info and code examples see equivalent synchronous getRawSince method.

    tx

    TxReport (returned from all molecule transaction operations)

    conn

    Implicit Conn value in scope

    returns

    java.util.Collection[java.util.List[AnyRef]]

    Definition Classes
    GetAsyncRaw
    See also

    Manual on asof/since

  225. def getAsyncRawSince(t: Long, n: Int)(implicit conn: Conn): Future[Collection[List[AnyRef]]]

    Get Future with java.util.Collection of n untyped rows matching molecule since transaction time t.

    Get Future with java.util.Collection of n untyped rows matching molecule since transaction time t.

    Call getRawSince when data doesn't need to be type-casted. Datomic's raw data is returned as-is.

    Transaction time t is an auto-incremented transaction number assigned internally by Datomic.

    t can for instance be retrieved calling t on the tx report returned from transactional operations and then be used to get data since that point in time (excluding that transaction).

    For more info and code examples see equivalent synchronous getRawSince method.

    t

    Transaction time t

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    returns

    java.util.Collection[java.util.List[AnyRef]]

    Definition Classes
    GetAsyncRaw
    See also

    Manual on asof/since

  226. def getAsyncRawSince(t: Long)(implicit conn: Conn): Future[Collection[List[AnyRef]]]

    Get Future with java.util.Collection of all untyped rows matching molecule since transaction time t.

    Get Future with java.util.Collection of all untyped rows matching molecule since transaction time t.

    Call getRawSince when data doesn't need to be type-casted. Datomic's raw data is returned as-is.

    Transaction time t is an auto-incremented transaction number assigned internally by Datomic.

    t can for instance be retrieved calling t on the tx report returned from transactional operations and then be used to get data since that point in time (excluding that transaction).

    For more info and code examples see equivalent synchronous getRawSince method.

    t

    Transaction time t

    conn

    Implicit Conn value in scope

    returns

    java.util.Collection[java.util.List[AnyRef]]

    Definition Classes
    GetAsyncRaw
    See also

    Manual on asof/since

  227. def getAsyncRawWith(txData: List[_], n: Int)(implicit conn: Conn): Future[Collection[List[AnyRef]]]

    Get Future with java.util.Collection of n untyped rows matching molecule with applied raw transaction data.

    Get Future with java.util.Collection of n untyped rows matching molecule with applied raw transaction data.

    Apply raw transaction data to in-memory "branch" of db without affecting db.

    For more info and code examples see equivalent synchronous getRawWith method.

    txData

    Raw transaction data as java.util.List[Object]

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    returns

    java.util.Collection[java.util.List[AnyRef]]

    Definition Classes
    GetAsyncRaw
    See also

    Manual on with

  228. def getAsyncRawWith(txData: List[_])(implicit conn: Conn): Future[Collection[List[AnyRef]]]

    Get Future with java.util.Collection of all untyped rows matching molecule with applied raw transaction data.

    Get Future with java.util.Collection of all untyped rows matching molecule with applied raw transaction data.

    Apply raw transaction data to in-memory "branch" of db without affecting db.

    For more info and code examples see equivalent synchronous getRawWith method.

    txData

    Raw transaction data as java.util.List[Object]

    conn

    Implicit Conn value in scope

    returns

    java.util.Collection[java.util.List[AnyRef]]

    Definition Classes
    GetAsyncRaw
    See also

    Manual on with

  229. def getAsyncRawWith(n: Int, txMolecules: Seq[Seq[Statement]]*)(implicit conn: Conn): Future[Collection[List[AnyRef]]]

    Get Future with java.util.Collection of n untyped rows matching molecule with applied molecule transaction data.

    Get Future with java.util.Collection of n untyped rows matching molecule with applied molecule transaction data.

    Apply one or more molecule transactions to in-memory "branch" of db without affecting db.

    For more info and code examples see equivalent synchronous getRawWith method.

    Multiple transactions can be applied to test more complex what-if scenarios!

    n

    Int Number of rows returned

    txMolecules

    Transaction statements from applied Molecules with test data

    conn

    Implicit Conn value in scope

    returns

    java.util.Collection[java.util.List[AnyRef]]

    Definition Classes
    GetAsyncRaw
    Note

    Note how the n parameter has to come before the txMolecules vararg.

    See also

    Manual on with

  230. def getAsyncRawWith(txMolecules: Seq[Seq[Statement]]*)(implicit conn: Conn): Future[Collection[List[AnyRef]]]

    Get Future with java.util.Collection of all untyped rows matching molecule with applied molecule transaction data.

    Get Future with java.util.Collection of all untyped rows matching molecule with applied molecule transaction data.

    Apply one or more molecule transactions to in-memory "branch" of db without affecting db.

    For more info and code examples see equivalent synchronous getRawWith method.

    Multiple transactions can be applied to test more complex what-if scenarios!

    txMolecules

    Transaction statements from applied Molecules with test data

    conn

    Implicit Conn value in scope

    returns

    java.util.Collection[java.util.List[AnyRef]]

    Definition Classes
    GetAsyncRaw
    See also

    Manual on with

  231. def getAsyncSince(date: Date, n: Int)(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[List[Tpl]]

    Get Future with List of n rows as tuples matching molecule since date.

    Get Future with List of n rows as tuples matching molecule since date.

    Get data added/retracted since a human point in time (a java.util.Date).

    For more info and code examples see equivalent synchronous getSince method.

    date

    java.util.Date

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array extraction

    returns

    List[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetAsyncList
    See also

    Manual on asof/since

  232. def getAsyncSince(date: Date)(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[List[Tpl]]

    Get Future with List of all rows as tuples matching molecule since date.

    Get Future with List of all rows as tuples matching molecule since date.

    Get data added/retracted since a human point in time (a java.util.Date).

    For more info and code examples see equivalent synchronous getSince method.

    date

    java.util.Date

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array extraction

    returns

    List[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetAsyncList
    See also

    Manual on asof/since

  233. def getAsyncSince(tx: TxReport, n: Int)(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[List[Tpl]]

    Get Future with List of n rows as tuples matching molecule since tx.

    Get Future with List of n rows as tuples matching molecule since tx.

    Datomic's internal since can take a transaction entity id as argument to retrieve a database value since that transaction (excluding the transaction itself).

    Instead of supplying the transaction entity id, in Molecule we supply a TxReport that contains the transaction entity id (which is used as argument to Datomic internally). This is more convenient when using Molecule since we get a TxReport from transaction operations like get, update, retract etc.

    For more info and code examples see equivalent synchronous getSince method.

    tx

    TxReport

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array extraction

    returns

    List[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetAsyncList
    See also

    Manual on asof/since

  234. def getAsyncSince(tx: TxReport)(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[List[Tpl]]

    Get Future with List of all rows as tuples matching molecule since tx.

    Get Future with List of all rows as tuples matching molecule since tx.

    Datomic's internal since can take a transaction entity id as argument to retrieve a database value since that transaction (excluding the transaction itself).

    Instead of supplying the transaction entity id, in Molecule we supply a TxReport that contains the transaction entity id (which is used as argument to Datomic internally). This is more convenient when using Molecule since we get a TxReport from transaction operations like get, update, retract etc.

    For more info and code examples see equivalent synchronous getSince method.

    tx

    TxReport

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array extraction

    returns

    List[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetAsyncList
    See also

    Manual on asof/since

  235. def getAsyncSince(t: Long, n: Int)(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[List[Tpl]]

    Get Future with List of n rows as tuples matching molecule since transaction time t.

    Get Future with List of n rows as tuples matching molecule since transaction time t.

    Transaction time t is an auto-incremented transaction number assigned internally by Datomic.

    For more info and code examples see equivalent synchronous getSince method.

    t

    Transaction time t

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array extraction

    returns

    List[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetAsyncList
    See also

    Manual on asof/since

  236. def getAsyncSince(t: Long)(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[List[Tpl]]

    Get Future with List of all rows as tuples matching molecule since transaction time t.

    Get Future with List of all rows as tuples matching molecule since transaction time t.

    Transaction time t is an auto-incremented transaction number assigned internally by Datomic.

    For more info and code examples see equivalent synchronous getSince method.

    t

    Transaction time t

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array extraction

    returns

    List[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetAsyncList
    See also

    Manual on asof/since

  237. def getAsyncWith(txData: List[_], n: Int)(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[List[Tpl]]

    Get Future with List of n rows as tuples matching molecule with applied raw transaction data.

    Get Future with List of n rows as tuples matching molecule with applied raw transaction data.

    Apply raw transaction data to in-memory "branch" of db without affecting db.

    For more info and code examples see equivalent synchronous getWith method.

    txData

    Raw transaction data as java.util.List[Object]

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array extraction

    returns

    List[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetAsyncList
    See also

    Manual on with

  238. def getAsyncWith(txData: List[_])(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[List[Tpl]]

    Get Future with List of all rows as tuples matching molecule with applied raw transaction data.

    Get Future with List of all rows as tuples matching molecule with applied raw transaction data.

    Apply raw transaction data to in-memory "branch" of db without affecting db.

    For more info and code examples see equivalent synchronous getWith method.

    txData

    Raw transaction data as java.util.List[Object]

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array extraction

    returns

    List[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetAsyncList
    See also

    Manual on with

  239. def getAsyncWith(n: Int, txMolecules: Seq[Seq[Statement]]*)(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[List[Tpl]]

    Get Future with List of n rows as tuples matching molecule with applied molecule transaction data.

    Get Future with List of n rows as tuples matching molecule with applied molecule transaction data.

    Apply one or more molecule transactions to in-memory "branch" of db without affecting db.

    For more info and code examples see equivalent synchronous getWith method.

    n

    Int Number of rows returned

    txMolecules

    Transaction statements from applied Molecules with test data

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array extraction

    returns

    List[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetAsyncList
    Note

    Note how the n parameter has to come before the txMolecules vararg.

    See also

    Manual on with

  240. def getAsyncWith(txMolecules: Seq[Seq[Statement]]*)(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[List[Tpl]]

    Get Future with List of all rows as tuples matching molecule with applied molecule transaction data.

    Get Future with List of all rows as tuples matching molecule with applied molecule transaction data.

    Apply one or more molecule transactions to in-memory "branch" of db without affecting db.

    For more info and code examples see equivalent synchronous getWith method. Multiple transactions can be applied to test more complex what-if scenarios!

    txMolecules

    Transaction statements from applied Molecules with test data

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array extraction

    returns

    List[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetAsyncList
    See also

    Manual on with

  241. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  242. def getHistory(implicit conn: Conn, tplType: ClassTag[Tpl]): List[Tpl]

    Get history of operations as List on an attribute in the db.

    Get history of operations as List on an attribute in the db.

    Generic datom attributes that can be called when getHistory is called:

    e - Entity id
    a - Attribute name
    v - Attribute value
    ns - Namespace name
    tx - TxReport
    t - Transaction time t
    txInstant - Transaction time as java.util.Date
    op - Operation: true (add) or false (retract)

    Example:

    // Insert (t 1028)
    val List(ben, liz) = Person.name.age insert List(
      ("Ben", 42),
      ("Liz", 37),
    ) eids
    
    // Update (t 1031)
    Person(ben).age(43).update
    
    // Retract (t 1032)
    ben.retract
    
    // History of Ben
    Person(ben).age.t.op.getHistory.sortBy(r => (r._2, r._3)) === List(
      (42, 1028, true),  // Insert:  42 asserted
      (42, 1031, false), // Update:  42 retracted
      (43, 1031, true),  //          43 asserted
      (43, 1032, false)  // Retract: 43 retracted
    )
    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array extraction

    returns

    List[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetList
    See also

    manual for more info on generic attributes.

    Equivalent asynchronous getAsyncHistory method.

  243. def getIterable(implicit conn: Conn, tplType: ClassTag[Tpl]): Iterable[Tpl]

    Get Iterable of all rows as tuples matching the molecule.

    Get Iterable of all rows as tuples matching the molecule.

    Rows are lazily type-casted on each call to iterator.next().

    Person.name.age.getIterable.toList === List(
      ("Ben", 42),
      ("Liz", 37),
    )
    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for later Array extractions

    returns

    Iterable[Tpl] where Tpl is a tuple of types matching the attributes of the molecule

    Definition Classes
    GetIterable
    See also

    Equivalent asynchronous getAsyncIterable method.

  244. def getIterableAsOf(date: Date)(implicit conn: Conn, tplType: ClassTag[Tpl]): Iterable[Tpl]

    Get Iterable of all rows as tuples matching molecule as of date.

    Get Iterable of all rows as tuples matching molecule as of date.

    Get data at a human point in time (a java.util.Date).

    val beforeInsert = new java.util.Date
    
    // Insert
    val tx1 = Person.name.age insert List(
      ("Ben", 42),
      ("Liz", 37)
    )
    val List(ben, liz) = tx1.eids
    val afterInsert = new java.util.Date
    
    // Update
    val tx2 = Person(ben).age(43).update
    val afterUpdate = new java.util.Date
    
    // Retract
    val tx3 = ben.retract
    val afterRetract = new java.util.Date
    
    // Get Iterable of all rows as of beforeInsert
    val iterable0: Iterable[(String, Int)] = Person.name.age.getIterableAsOf(beforeInsert)
    val iterator0: Iterator[(String, Int)] = iterable0.iterator
    iterator0.hasNext === false // Nothing yet
    
    // Get Iterable of all rows as of afterInsert
    val iterable1: Iterable[(String, Int)] = Person.name.age.getIterableAsOf(afterInsert)
    val iterator1: Iterator[(String, Int)] = iterable1.iterator
    
    // Type casting lazily performed with each call to `next`
    iterator1.next === ("Ben", 42)
    iterator1.next === ("Liz", 37)
    
    // Get Iterable of all rows as of afterUpdate
    val iterable2: Iterable[(String, Int)] = Person.name.age.getIterableAsOf(afterUpdate)
    val iterator2: Iterator[(String, Int)] = iterable2.iterator
    
    // Type casting lazily performed with each call to `next`
    iterator2.next === ("Ben", 43) // Ben now 43
    iterator2.next === ("Liz", 37)
    
    // Get Iterable of all rows as of afterRetract
    val iterable3: Iterable[(String, Int)] = Person.name.age.getIterableAsOf(afterRetract)
    val iterator3: Iterator[(String, Int)] = iterable3.iterator
    
    // Type casting lazily performed with each call to `next`
    iterator3.next === ("Liz", 37)
    iterator3.hasNext === false // Ben gone
    date

    java.util.Date

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for later Array extractions

    returns

    Iterable[Tpl] where Tpl is tuple of data matching molecule

    Definition Classes
    GetIterable
    See also

    Manual on asof/since

    Equivalent asynchronous getAsyncIterableAsOf method.

  245. def getIterableAsOf(tx: TxReport)(implicit conn: Conn, tplType: ClassTag[Tpl]): Iterable[Tpl]

    Get Iterable of all rows as tuples matching molecule as of tx.

    Get Iterable of all rows as tuples matching molecule as of tx.

    Datomic's internal asOf method can take a transaction entity id as argument to retrieve a database value as of that transaction (including).

    Instead of supplying the transaction entity id, in Molecule we supply a TxReport that contains the transaction entity id (which is used as argument to Datomic internally). This is more convenient when using Molecule since we getAsync a TxReport from transaction operations like get, update, retract etc.

    // Insert (tx report 1)
    val tx1 = Person.name.age insert List(
      ("Ben", 42),
      ("Liz", 37)
    )
    val List(ben, liz) = tx1.eids
    
    // Update (tx report 2)
    val tx2 = Person(ben).age(43).update
    
    // Retract (tx report 3)
    val tx3 = ben.retract
    
    // Get Iterable of all rows as of tx1 (after insert)
    val iterable1: Iterable[(String, Int)] = Person.name.age.getIterableAsOf(tx1)
    val iterator1: Iterator[(String, Int)] = iterable1.iterator
    
    // Type casting lazily performed with each call to `next`
    iterator1.next === ("Ben", 42)
    iterator1.next === ("Liz", 37)
    
    // Get Iterable of all rows as of tx2 (after update)
    val iterable2: Iterable[(String, Int)] = Person.name.age.getIterableAsOf(tx2)
    val iterator2: Iterator[(String, Int)] = iterable2.iterator
    
    // Type casting lazily performed with each call to `next`
    iterator2.next === ("Ben", 43) // Ben now 43
    iterator2.next === ("Liz", 37)
    
    // Get Iterable of all rows as of tx3 (after retract)
    val iterable3: Iterable[(String, Int)] = Person.name.age.getIterableAsOf(tx3)
    val iterator3: Iterator[(String, Int)] = iterable3.iterator
    
    // Type casting lazily performed with each call to `next`
    iterator3.next === ("Liz", 37)
    iterator3.hasNext === false // Ben gone
    tx

    TxReport (returned from all molecule transaction operations)

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for later Array extractions

    returns

    Iterable[Tpl] where Tpl is tuple of data matching molecule

    Definition Classes
    GetIterable
    See also

    Manual on asof/since

    Equivalent asynchronous getAsyncIterableAsOf method.

  246. def getIterableAsOf(t: Long)(implicit conn: Conn, tplType: ClassTag[Tpl]): Iterable[Tpl]

    Get Iterable of all rows as tuples matching molecule as of transaction time t.

    Get Iterable of all rows as tuples matching molecule as of transaction time t.

    Transaction time t is an auto-incremented transaction number assigned internally by Datomic.

    Call getIterableAsOf for large result sets to maximize runtime performance. Data is lazily type-casted on each call to next on the iterator.

    t can for instance be retrieved in a getHistory call for an attribute and then be used to get data as of that point in time (including that transaction):

    // Insert (t 1028)
    val List(ben, liz) = Person.name.age insert List(
      ("Ben", 42),
      ("Liz", 37)
    ) eids
    
    // Update (t 1031)
    Person(ben).age(43).update
    
    // Retract (t 1032)
    ben.retract
    
    // History of Ben
    Person(ben).age.t.op.getHistory.sortBy(r => (r._2, r._3)) === List(
      (42, 1028, true),  // Insert:  42 asserted
      (42, 1031, false), // Update:  42 retracted
      (43, 1031, true),  //          43 asserted
      (43, 1032, false)  // Retract: 43 retracted
    )
    
    // Get Iterable of all rows as of transaction t 1028 (after insert)
    val iterable1: Iterable[(String, Int)] = Person.name.age.getIterableAsOf(1028)
    val iterator1: Iterator[(String, Int)] = iterable1.iterator
    
    // Type casting lazily performed with each call to `next`
    iterator1.next === ("Liz", 37)
    iterator1.next === ("Ben", 42)
    
    // Get Iterable of all rows as of transaction t 1031 (after update)
    val iterable2: Iterable[(String, Int)] = Person.name.age.getIterableAsOf(1031)
    val iterator2: Iterator[(String, Int)] = iterable2.iterator
    
    // Type casting lazily performed with each call to `next`
    iterator2.next === ("Liz", 37)
    iterator2.next === ("Ben", 43) // Ben now 43
    
    // Get Iterable of all rows as of transaction t 1032 (after retract)
    val iterable3: Iterable[(String, Int)] = Person.name.age.getIterableAsOf(1032)
    val iterator3: Iterator[(String, Int)] = iterable3.iterator
    
    // Type casting lazily performed with each call to `next`
    iterator3.next === ("Liz", 37)
    iterator3.hasNext === false // Ben gone
    t

    Transaction time t

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for later Array extractions

    returns

    Iterable[Tpl] where Tpl is tuple of data matching molecule

    Definition Classes
    GetIterable
    See also

    Manual on asof/since

    Equivalent asynchronous getAsyncIterableAsOf method.

  247. def getIterableSince(date: Date)(implicit conn: Conn, tplType: ClassTag[Tpl]): Iterable[Tpl]

    Get Iterable of all rows as tuples matching molecule since date.

    Get Iterable of all rows as tuples matching molecule since date.

    Get data added/retracted since a human point in time (a java.util.Date).

    // Transact 3 times (`inst` retrieves transaction time from tx report)
    val date1 = Person.name("Ann").save.inst
    val date2 = Person.name("Ben").save.inst
    val date3 = Person.name("Cay").save.inst
    
    // Current values
    Person.name.getIterable.iterator.toList === List("Ann", "Ben", "Cay")
    
    // Ben and Cay added since date1
    Person.name.getIterableSince(date1).iterator.toList === List("Ben", "Cay")
    
    // Cay added since date2
    Person.name.getIterableSince(date2).iterator.toList === List("Cay")
    
    // Nothing added since date3
    Person.name.getIterableSince(date3).iterator.toList === Nil
    date

    java.util.Date

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for later Array extractions

    returns

    Iterable[Tpl] where Tpl is tuple of data matching molecule

    Definition Classes
    GetIterable
    See also

    Manual on asof/since

    Equivalent asynchronous getAsyncIterableSince method.

  248. def getIterableSince(tx: TxReport)(implicit conn: Conn, tplType: ClassTag[Tpl]): Iterable[Tpl]

    Get Iterable of all rows as tuples matching molecule since tx.

    Get Iterable of all rows as tuples matching molecule since tx.

    Datomic's internal since method can take a transaction entity id as argument to retrieve a database value since that transaction (excluding the transaction itself).

    Instead of supplying the transaction entity id, in Molecule we supply a TxReport that contains the transaction entity id (which is used as argument to Datomic internally). This is more convenient when using Molecule since we getAsync a TxReport from transaction operations like get, update, retract etc.

    // Get tx reports for 3 transactions
    val tx1 = Person.name("Ann").save
    val tx2 = Person.name("Ben").save
    val tx3 = Person.name("Cay").save
    
    // Current values
    Person.name.getIterable.iterator.toList === List("Ann", "Ben", "Cay")
    
    // Ben and Cay added since tx1
    Person.name.getIterableSince(tx1).iterator.toList === List("Ben", "Cay")
    
    // Cay added since tx2
    Person.name.getIterableSince(tx2).iterator.toList === List("Cay")
    
    // Nothing added since tx3
    Person.name.getIterableSince(tx3).iterator.toList === Nil
    tx

    TxReport

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for later Array extractions

    returns

    Iterable[Tpl] where Tpl is tuple of data matching molecule

    Definition Classes
    GetIterable
    See also

    Manual on asof/since

    Equivalent asynchronous getAsyncIterableSince method.

  249. def getIterableSince(t: Long)(implicit conn: Conn, tplType: ClassTag[Tpl]): Iterable[Tpl]

    Get Iterable of all rows as tuples matching molecule since transaction time t.

    Get Iterable of all rows as tuples matching molecule since transaction time t.

    Transaction time t is an auto-incremented transaction number assigned internally by Datomic.

    Call getIterableSince for large result sets to maximize runtime performance. Data is lazily type-casted on each call to next on the iterator.

    t can for instance be retrieved calling t on the tx report returned from transactional operations and then be used to get data since that point in time (excluding that transaction):

    // 3 transaction times `t`
    val t1 = Person.name("Ann").save.t
    val t2 = Person.name("Ben").save.t
    val t3 = Person.name("Cay").save.t
    
    // Current values as Iterable
    Person.name.getIterable.iterator.toList === List("Ann", "Ben", "Cay")
    
    // Ben and Cay added since transaction time t1
    Person.name.getIterableSince(t1).iterator.toList === List("Ben", "Cay")
    
    // Cay added since transaction time t2
    Person.name.getIterableSince(t2).iterator.toList === List("Cay")
    
    // Nothing added since transaction time t3
    Person.name.getIterableSince(t3).iterator.toList === Nil
    t

    Transaction time t

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for later Array extractions

    returns

    Iterable[Tpl] where Tpl is tuple of data matching molecule

    Definition Classes
    GetIterable
    See also

    Manual on asof/since

    Equivalent asynchronous getAsyncIterableSince method.

  250. def getIterableWith(txData: List[_])(implicit conn: Conn, tplType: ClassTag[Tpl]): Iterable[Tpl]

    Get Iterable of all rows as tuples matching molecule with applied raw transaction data.

    Get Iterable of all rows as tuples matching molecule with applied raw transaction data.

    Apply raw transaction data to in-memory "branch" of db without affecting db to see how it would then look:

    // Live size of Person db
    Person.name.get.size === 150
    
    // Read some transaction data from file
    val data_rdr2 = new FileReader("examples/resources/seattle/seattle-data1a.dtm")
    val newDataTx = Util.readAll(data_rdr2).get(0).asInstanceOf[java.util.List[Object]]
    
    // Imagine future db - 100 persons would be added, apparently
    Person.name.getIterableWith(newDataTx).size === 250
    txData

    Raw transaction data as java.util.List[Object]

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for later Array extractions

    returns

    Iterable of molecule data

    Definition Classes
    GetIterable
    See also

    Manual on with

    Equivalent asynchronous getAsyncIterableWith method.

  251. def getIterableWith(txMolecules: Seq[Seq[Statement]]*)(implicit conn: Conn, tplType: ClassTag[Tpl]): Iterable[Tpl]

    Get Iterable of all rows as tuples matching molecule with applied molecule transaction data.

    Get Iterable of all rows as tuples matching molecule with applied molecule transaction data.

    Apply one or more molecule transactions to in-memory "branch" of db without affecting db to see how it would then look:

    // Current state
    val ben = Person.name("Ben").likes("pasta").save.eid
    
    // Base data
    Person.name.likes.getIterableWith(
      // apply imaginary transaction data
      Person(ben).likes("sushi").getUpdateTx
    ).iterator.toList === List(
      // Effect: Ben would like sushi if tx was applied
      ("Ben", "sushi")
    )
    
    // Current state is still the same
    Person.name.likes.get === List(
      ("Ben", "pasta")
    )

    Multiple transactions can be applied to test more complex what-if scenarios!

    txMolecules

    Transaction statements from applied Molecules with test data

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for later Array extractions

    returns

    Iterable of molecule data

    Definition Classes
    GetIterable
    See also

    Manual on with

    Equivalent asynchronous getAsyncIterableWith method.

  252. def getJson(n: Int)(implicit conn: Conn): String

    Get json data for n rows matching molecule

    Get json data for n rows matching molecule

    Person.name.age.getJson(1) ===
      """[
        |{"person.name": "Ben", "person.age": 42}
        |]""".stripMargin

    Namespace.Attribute is used as json fields. Values are quoted when necessary. Nested data becomes json objects etc.

    n

    Number of rows returned

    conn

    Implicit Conn value in scope

    returns

    String of json

    Definition Classes
    GetJson
    See also

    Manual on getJson

    Equivalent asynchronous getAsyncJson method.

  253. def getJson(implicit conn: Conn): String

    Get json data for all rows matching molecule.

    Get json data for all rows matching molecule.

    Person.name.age.getJson ===
      """[
        |{"person.name": "Ben", "person.age": 42},
        |{"person.name": "Liz", "person.age": 37}
        |]""".stripMargin

    Namespace.Attribute is used as json fields. Values are quoted when necessary. Nested data becomes json objects etc.

    conn

    Implicit Conn value in scope

    returns

    String of json

    Definition Classes
    GetJson
    See also

    Manual on getJson

    Equivalent asynchronous getAsyncJson method.

  254. def getJsonAsOf(date: Date, n: Int)(implicit conn: Conn): String

    Get json data for n rows matching molecule as of tx.

    Get json data for n rows matching molecule as of tx.

    Get data at a human point in time (a java.util.Date).

    val beforeInsert = new java.util.Date
    
    // Insert
    val tx1 = Person.name.age insert List(
      ("Ben", 42),
      ("Liz", 37)
    )
    val List(ben, liz) = tx1.eids
    val afterInsert = new java.util.Date
    
    // Update
    val tx2 = Person(ben).age(43).update
    val afterUpdate = new java.util.Date
    
    // Get List of all rows as of afterUpdate
    Person.name.age.getJsonAsOf(afterUpdate) ===
      """[
        |{"person.name": "Ben", "person.age": 43},
        |{"person.name": "Liz", "person.age": 37}
        |]""".stripMargin
    
    // Get List of n rows as of afterUpdate
    Person.name.age.getJsonAsOf(afterUpdate, 1) ===
      """[
        |{"person.name": "Ben", "person.age": 43}
        |]""".stripMargin
    date

    java.util.Date

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    returns

    String of json

    Definition Classes
    GetJson
    See also

    Manual on asof/since

    Equivalent asynchronous getAsyncJsonAsOf method.

  255. def getJsonAsOf(date: Date)(implicit conn: Conn): String

    Get json data for all rows matching molecule as of date.

    Get json data for all rows matching molecule as of date.

    Get data at a human point in time (a java.util.Date).

    val beforeInsert = new java.util.Date
    
    // Insert
    val tx1 = Person.name.age insert List(
      ("Ben", 42),
      ("Liz", 37),
    )
    val List(ben, liz) = tx1.eids
    val afterInsert = new java.util.Date
    
    // Update
    val tx2 = Person(ben).age(43).update
    val afterUpdate = new java.util.Date
    
    // Retract
    val tx3 = ben.retract
    val afterRetract = new java.util.Date
    
    // No data yet before insert
    Person.name.age.getJsonAsOf(beforeInsert) === ""
    
    // Get List of all rows as of afterInsert
    Person.name.age.getJsonAsOf(afterInsert) ===
      """[
        |{"person.name": "Ben", "person.age": 42},
        |{"person.name": "Liz", "person.age": 37}
        |]""".stripMargin
    
    // Get List of all rows as of afterUpdate
    Person.name.age.getJsonAsOf(afterUpdate) ===
      """[
        |{"person.name": "Ben", "person.age": 43},
        |{"person.name": "Liz", "person.age": 37}
        |]""".stripMargin
    
    // Get List of all rows as of afterRetract
    Person.name.age.getJsonAsOf(afterRetract) ===
      """[
        |{"person.name": "Liz", "person.age": 37}
        |]""".stripMargin
    date

    java.util.Date

    conn

    Implicit Conn value in scope

    returns

    String of json

    Definition Classes
    GetJson
    See also

    Manual on asof/since

    Equivalent asynchronous getAsyncJsonAsOf method.

  256. def getJsonAsOf(tx: TxReport, n: Int)(implicit conn: Conn): String

    Get json data for n rows matching molecule as of tx.

    Get json data for n rows matching molecule as of tx.

    Datomic's internal asOf method can take a transaction entity id as argument to retrieve a database value as of that transaction (including).

    Instead of supplying the transaction entity id, in Molecule we supply a TxReport that contains the transaction entity id (which is used as argument to Datomic internally). This is more convenient when using Molecule since we get a TxReport from transaction operations like get, update, retract etc.

    // Insert (tx report 1)
    val tx1 = Person.name.age insert List(
      ("Ben", 42),
      ("Liz", 37)
    )
    val List(ben, liz) = tx1.eids
    
    // Update (tx report 2)
    val tx2 = Person(ben).age(43).update
    
    // Get json for all rows as of transaction tx2 (after update) - Ben now 43
    Person.name.age.getJsonAsOf(tx2) ===
      """[
        |{"person.name": "Ben", "person.age": 43},
        |{"person.name": "Liz", "person.age": 37}
        |]""".stripMargin
    
    // Get json for n rows as of transaction tx2 (after update) - Ben now 43
    Person.name.age.getJsonAsOf(tx2, 1) ===
      """[
        |{"person.name": "Ben", "person.age": 43}
        |]""".stripMargin
    tx

    TxReport (returned from all molecule transaction operations)

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    returns

    String of json

    Definition Classes
    GetJson
    See also

    Manual on asof/since

    Equivalent asynchronous getAsyncJsonAsOf method.

  257. def getJsonAsOf(tx: TxReport)(implicit conn: Conn): String

    Get json data for all rows matching molecule as of tx.

    Get json data for all rows matching molecule as of tx.

    Datomic's internal asOf method can take a transaction entity id as argument to retrieve a database value as of that transaction (including).

    Instead of supplying the transaction entity id, in Molecule we supply a TxReport that contains the transaction entity id (which is used as argument to Datomic internally). This is more convenient when using Molecule since we get a TxReport from transaction operations like get, update, retract etc.

    // Insert (tx report 1)
    val tx1 = Person.name.age insert List(
      ("Ben", 42),
      ("Liz", 37)
    )
    val List(ben, liz) = tx1.eids
    
    // Update (tx report 2)
    val tx2 = Person(ben).age(43).update
    
    // Retract (tx report 3)
    val tx3 = ben.retract
    
    // Get json for all rows as of transaction tx1 (after insert)
    Person.name.age.getJsonAsOf(tx1) ===
      """[
        |{"person.name": "Ben", "person.age": 42},
        |{"person.name": "Liz", "person.age": 37}
        |]""".stripMargin
    
    // Get json for all rows as of transaction tx2 (after update) - Ben now 43
    Person.name.age.getJsonAsOf(tx2) ===
      """[
        |{"person.name": "Ben", "person.age": 43},
        |{"person.name": "Liz", "person.age": 37}
        |]""".stripMargin
    
    // Get json for all rows as of transaction tx3 (after retract) - Ben gone
    Person.name.age.getJsonAsOf(tx3) ===
      """[
        |{"person.name": "Liz", "person.age": 37}
        |]""".stripMargin
    tx

    TxReport (returned from all molecule transaction operations)

    conn

    Implicit Conn value in scope

    returns

    String of json

    Definition Classes
    GetJson
    See also

    Manual on asof/since

    Equivalent asynchronous getAsyncJsonAsOf method.

  258. def getJsonAsOf(t: Long, n: Int)(implicit conn: Conn): String

    Get json data for n rows matching molecule as of transaction time t.

    Get json data for n rows matching molecule as of transaction time t.

    Transaction time t is an auto-incremented transaction number assigned internally by Datomic.

    t can for instance be retrieved in a getHistory call for an attribute and then be used to get data as of that point in time (including that transaction):

    // Insert (t 1028)
    val List(ben, liz) = Person.name.age insert List(
      ("Ben", 42),
      ("Liz", 37)
    ) eids
    
    // Update (t 1031)
    Person(ben).age(43).update
    
    // History of Ben
    Person(ben).age.t.op.getHistory.sortBy(r => (r._2, r._3)) === List(
      (42, 1028, true),  // Insert:  42 asserted
      (42, 1031, false), // Update:  42 retracted
      (43, 1031, true),  //          43 asserted
    )
    
    // Get json for all rows as of transaction t 1031 (after update)
    Person.name.age.getJsonAsOf(1031) ===
      """[
        |{"person.name": "Ben", "person.age": 43},
        |{"person.name": "Liz", "person.age": 37}
        |]""".stripMargin
    
    // Get json for n (1) rows as of transaction t 1031 (after update)
    Person.name.age.getJsonAsOf(1031, 1) ===
      """[
        |{"person.name": "Ben", "person.age": 43}
        |]""".stripMargin
    t

    Transaction time t

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    returns

    String of json

    Definition Classes
    GetJson
    See also

    Manual on asof/since

    Equivalent asynchronous getAsyncJsonAsOf method.

  259. def getJsonAsOf(t: Long)(implicit conn: Conn): String

    Get json data for all rows matching molecule as of transaction time t.

    Get json data for all rows matching molecule as of transaction time t.

    Transaction time t is an auto-incremented transaction number assigned internally by Datomic.

    t can for instance be retrieved in a getHistory call for an attribute and then be used to get data as of that point in time (including that transaction):

    // Insert (t 1028)
    val List(ben, liz) = Person.name.age insert List(
      ("Ben", 42),
      ("Liz", 37)
    ) eids
    
    // Update (t 1031)
    Person(ben).age(43).update
    
    // Retract (t 1032)
    ben.retract
    
    // History of Ben
    Person(ben).age.t.op.getHistory.sortBy(r => (r._2, r._3)) === List(
      (42, 1028, true),  // Insert:  42 asserted
      (42, 1031, false), // Update:  42 retracted
      (43, 1031, true),  //          43 asserted
      (43, 1032, false)  // Retract: 43 retracted
    )
    
    // Get json for all rows as of transaction t 1028 (after insert)
    Person.name.age.getJsonAsOf(1028) ===
      """[
        |{"person.name": "Ben", "person.age": 42},
        |{"person.name": "Liz", "person.age": 37}
        |]""".stripMargin
    
    // Get json for all rows as of transaction t 1031 (after update) - Ben now 43
    Person.name.age.getJsonAsOf(1031) ===
      """[
        |{"person.name": "Ben", "person.age": 43},
        |{"person.name": "Liz", "person.age": 37}
        |]""".stripMargin
    
    // Get json for all rows as of transaction t 1032 (after retract) - Ben gone
    Person.name.age.getJsonAsOf(1032) ===
      """[
        |{"person.name": "Liz", "person.age": 37}
        |]""".stripMargin
    t

    Transaction time t

    conn

    Implicit Conn value in scope

    returns

    String of json

    Definition Classes
    GetJson
    See also

    Manual on asof/since

    Equivalent asynchronous getAsyncJsonAsOf method.

  260. def getJsonComposite(conn: Conn, n: Int): String
    Attributes
    protected
    Definition Classes
    GetJson
  261. def getJsonFlat(conn: Conn, n: Int): String
    Attributes
    protected
    Definition Classes
    GetJson
  262. def getJsonSince(date: Date, n: Int)(implicit conn: Conn): String

    Get json data for n rows matching molecule since date.

    Get json data for n rows matching molecule since date.

    Get data added/retracted since a human point in time (a java.util.Date).

    // Transact 3 times (`inst` retrieves transaction time/Date from tx report)
    val date1 = Person.name("Ann").save.inst
    val date2 = Person.name("Ben").save.inst
    val date3 = Person.name("Cay").save.inst
    
    // Current values
    Person.name.get === List("Ann", "Ben", "Cay")
    
    // Ben and Cay added since date1
    Person.name.getJsonSince(date1) ===
      """[
        |{"person.name": "Ben"},
        |{"person.name": "Cay"}
        |]""".stripMargin
    
    // Ben and Cay added since date1 - only n (1) rows returned
    Person.name.getJsonSince(date1, 1) ===
      """[
        |{"person.name": "Ben"}
        |]""".stripMargin
    date

    java.util.Date

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    returns

    String of json

    Definition Classes
    GetJson
    See also

    Manual on asof/since

    Equivalent asynchronous getAsyncJsonSince method.

  263. def getJsonSince(date: Date)(implicit conn: Conn): String

    Get json data for all rows matching molecule since date.

    Get json data for all rows matching molecule since date.

    Get data added/retracted since a human point in time (a java.util.Date).

    // Transact 3 times (`inst` retrieves transaction time/Date from tx report)
    val date1 = Person.name("Ann").save.inst
    val date2 = Person.name("Ben").save.inst
    val date3 = Person.name("Cay").save.inst
    
    // Current values
    Person.name.get === List("Ann", "Ben", "Cay")
    
    // Ben and Cay added since date1
    Person.name.getJsonSince(date1) ===
      """[
        |{"person.name": "Ben"},
        |{"person.name": "Cay"}
        |]""".stripMargin
    
    // Cay added since date2
    Person.name.getJsonSince(date2) ===
      """[
        |{"person.name": "Cay"}
        |]""".stripMargin
    
    // Nothing added since date3
    Person.name.getJsonSince(date3) === ""
    date

    java.util.Date

    conn

    Implicit Conn value in scope

    returns

    String of json

    Definition Classes
    GetJson
    See also

    Manual on asof/since

    Equivalent asynchronous getAsyncJsonSince method.

  264. def getJsonSince(tx: TxReport, n: Int)(implicit conn: Conn): String

    Get json data for n rows matching molecule since tx.

    Get json data for n rows matching molecule since tx.

    Datomic's internal since can take a transaction entity id as argument to retrieve a database value since that transaction (excluding the transaction itself).

    Instead of supplying the transaction entity id, in Molecule we supply a TxReport that contains the transaction entity id (which is used as argument to Datomic internally). This is more convenient when using Molecule since we getAsync a TxReport from transaction operations like get, update, retract etc.

    // Get tx reports for 3 transactions
    val tx1 = Person.name("Ann").save
    val tx2 = Person.name("Ben").save
    val tx3 = Person.name("Cay").save
    
    // Current values
    Person.name.get === List("Ann", "Ben", "Cay")
    
    // Ben and Cay added since tx1
    Person.name.getJsonSince(tx1) ===
      """[
        |{"person.name": "Ben"},
        |{"person.name": "Cay"}
        |]""".stripMargin
    
    // Ben and Cay added since tx1 - only n (1) rows returned
    Person.name.getJsonSince(tx1, 1) ===
      """[
        |{"person.name": "Ben"}
        |]""".stripMargin
    tx

    TxReport (returned from all molecule transaction operations)

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    returns

    String of json

    Definition Classes
    GetJson
    See also

    Manual on asof/since

    Equivalent asynchronous getAsyncJsonSince method.

  265. def getJsonSince(tx: TxReport)(implicit conn: Conn): String

    Get json data for all rows matching molecule since tx.

    Get json data for all rows matching molecule since tx.

    Datomic's internal since can take a transaction entity id as argument to retrieve a database value since that transaction (excluding the transaction itself).

    Instead of supplying the transaction entity id, in Molecule we supply a TxReport that contains the transaction entity id (which is used as argument to Datomic internally). This is more convenient when using Molecule since we getAsync a TxReport from transaction operations like get, update, retract etc.

    // Get tx reports for 3 transactions
    val tx1 = Person.name("Ann").save
    val tx2 = Person.name("Ben").save
    val tx3 = Person.name("Cay").save
    
    // Current values
    Person.name.get === List("Ann", "Ben", "Cay")
    
    // Ben and Cay added since tx1
    Person.name.getJsonSince(tx1) ===
      """[
        |{"person.name": "Ben"},
        |{"person.name": "Cay"}
        |]""".stripMargin
    
    // Cay added since tx2
    Person.name.getJsonSince(tx2) ===
      """[
        |{"person.name": "Cay"}
        |]""".stripMargin
    
    // Nothing added since tx3
    Person.name.getJsonSince(tx3) === ""
    tx

    TxReport (returned from all molecule transaction operations)

    conn

    Implicit Conn value in scope

    returns

    String of json

    Definition Classes
    GetJson
    See also

    Manual on asof/since

    Equivalent asynchronous getAsyncJsonSince method.

  266. def getJsonSince(t: Long, n: Int)(implicit conn: Conn): String

    Get json data for n rows matching molecule since transaction time t.

    Get json data for n rows matching molecule since transaction time t.

    Transaction time t is an auto-incremented transaction number assigned internally by Datomic.

    t can for instance be retrieved by calling t on the tx report returned from transactional operations and then be used to get data since that point in time (excluding that transaction):

    // 3 transaction times `t`
    val t1 = Person.name("Ann").save.t
    val t2 = Person.name("Ben").save.t
    val t3 = Person.name("Cay").save.t
    
    // Current values
    Person.name.get === List("Ann", "Ben", "Cay")
    
    // Ben and Cay added since transaction time t 1028
    Person.name.getJsonSince(t1) ===
      """[
        |{"person.name": "Ben"},
        |{"person.name": "Cay"}
        |]""".stripMargin
    
    // Ben and Cay added since transaction time t 1028 - only n (1) rows returned
    Person.name.getJsonSince(t1, 1) ===
      """[
        |{"person.name": "Ben"}
        |]""".stripMargin
    t

    Transaction time t

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    returns

    String of json

    Definition Classes
    GetJson
    See also

    Manual on asof/since

    Equivalent asynchronous getAsyncJsonSince method.

  267. def getJsonSince(t: Long)(implicit conn: Conn): String

    Get json data for all rows matching molecule since transaction time t.

    Get json data for all rows matching molecule since transaction time t.

    Transaction time t is an auto-incremented transaction number assigned internally by Datomic.

    t can for instance be retrieved by calling t on the tx report returned from transactional operations and then be used to get data since that point in time (excluding that transaction):

    // 3 transaction times `t`
    val t1 = Person.name("Ann").save.t
    val t2 = Person.name("Ben").save.t
    val t3 = Person.name("Cay").save.t
    
    // Current values
    Person.name.get === List("Ann", "Ben", "Cay")
    
    // Ben and Cay added since transaction time t 1028
    Person.name.getJsonSince(t1) ===
      """[
        |{"person.name": "Ben"},
        |{"person.name": "Cay"}
        |]""".stripMargin
    
    // Cay added since transaction time t 1030
    Person.name.getJsonSince(t2) ===
      """[
        |{"person.name": "Cay"}
        |]""".stripMargin
    
    // Nothing added since transaction time t 1032
    Person.name.getJsonSince(t3) === ""
    t

    Transaction time t

    conn

    Implicit Conn value in scope

    returns

    String of json

    Definition Classes
    GetJson
    See also

    Manual on asof/since

    Equivalent asynchronous getAsyncJsonSince method.

  268. def getJsonWith(txData: List[_], n: Int)(implicit conn: Conn): String

    Get json data for n rows matching molecule with applied raw transaction data.

    Get json data for n rows matching molecule with applied raw transaction data.

    Apply raw transaction data to in-memory "branch" of db without affecting db to see how it would then look:

    // Live size of Person db
    Person.name.get.size === 150
    
    // Read some transaction data from file
    val data_rdr2 = new FileReader("examples/resources/seattle/seattle-data1a.dtm")
    val newDataTx = Util.readAll(data_rdr2).get(0).asInstanceOf[java.util.List[Object]]
    
    // Imagine future db - 100 persons would be added, apparently
    Person.name.getJsonWith(newDataTx).size === 250
    
    // Imagine future db - Let's just take 10
    Person.name.getJsonWith(newDataTx, 10).size === 10
    txData

    Raw transaction data as java.util.List[Object]

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    returns

    String of json

    Definition Classes
    GetJson
    See also

    Manual on with

    Equivalent asynchronous getAsyncJsonWith method.

  269. def getJsonWith(txData: List[_])(implicit conn: Conn): String

    Get json data for all rows matching molecule with applied raw transaction data.

    Get json data for all rows matching molecule with applied raw transaction data.

    Apply raw transaction data to in-memory "branch" of db without affecting db to see how it would then look:

    // Live size of Person db
    Person.name.get.size === 150
    
    // Read some transaction data from file
    val data_rdr2 = new FileReader("examples/resources/seattle/seattle-data1a.dtm")
    val newDataTx = Util.readAll(data_rdr2).get(0).asInstanceOf[java.util.List[Object]]
    
    // Imagine future db - 100 persons would be added, apparently
    Person.name.getJsonWith(newDataTx).size === 250
    txData

    Raw transaction data as java.util.List[Object]

    conn

    Implicit Conn value in scope

    returns

    String of json

    Definition Classes
    GetJson
    See also

    Manual on with

    Equivalent asynchronous getAsyncJsonWith method.

  270. def getJsonWith(n: Int, txMolecules: Seq[Seq[Statement]]*)(implicit conn: Conn): String

    Get json data for all rows matching molecule with applied molecule transaction data.

    Get json data for all rows matching molecule with applied molecule transaction data.

    Apply one or more molecule transactions to in-memory "branch" of db without affecting db to see how it would then look:

    // Current state
    val List(ben, liz) = Person.name.likes.insert(
      ("Ben", "pasta"),
      ("Liz", "pizza")
    ).eids
    
    // Test multiple transactions
    Person.name.likes.getJsonWith(
      Person(ben).likes("sushi").getUpdateTx,
      Person(liz).likes("cake").getUpdateTx
    ) ===
      """[
        |{"person.name": "Ben", "person.likes": "sushi"},
        |{"person.name": "Liz", "person.likes": "cake"}
        |]""".stripMargin
    
    // Same as above, but only n (1) rows returned:
    Person.name.likes.getJsonWith(
      1
      Person(ben).likes("sushi").getUpdateTx,
      Person(liz).likes("cake").getUpdateTx
    ) ===
      """[
        |{"person.name": "Ben", "person.likes": "sushi"}
        |]""".stripMargin

    Multiple transactions can be applied to test more complex what-if scenarios!

    txMolecules

    Transaction statements from applied Molecules with test data

    conn

    Implicit Conn value in scope

    returns

    String of json

    Definition Classes
    GetJson
    See also

    Manual on with

    Equivalent asynchronous getAsyncJsonWith method.

  271. def getJsonWith(txMolecules: Seq[Seq[Statement]]*)(implicit conn: Conn): String

    Get json data for all rows matching molecule with applied molecule transaction data.

    Get json data for all rows matching molecule with applied molecule transaction data.

    Apply one or more molecule transactions to in-memory "branch" of db without affecting db to see how it would then look:

    // Current state
    val ben = Person.name("Ben").likes("pasta").save.eid
    
    // Base data
    Person.name.likes.getJsonWith(
      // apply imaginary transaction data
      Person(ben).likes("sushi").getUpdateTx
    ) ===
      """[
        |{"person.name": "Ben", "person.likes": "sushi"}
        |]""".stripMargin
    
    // Current state is still the same
    Person.name.likes.get === List(("Ben", "pasta"))

    Multiple transactions can be applied to test more complex what-if scenarios!

    txMolecules

    Transaction statements from applied Molecules with test data

    conn

    Implicit Conn value in scope

    returns

    String of json

    Definition Classes
    GetJson
    See also

    Manual on with

    Equivalent asynchronous getAsyncJsonWith method.

  272. def getRaw(n: Int)(implicit conn: Conn): Collection[List[AnyRef]]

    Get java.util.Collection of n untyped rows matching molecule.

    Get java.util.Collection of n untyped rows matching molecule.

    Person.name.age.getRaw(1).toString === """[["Ben" 42]]"""
    n

    Number of rows

    conn

    Implicit Conn value in scope

    returns

    java.util.Collection[java.util.List[AnyRef]]

    Definition Classes
    GetRaw
    See also

    Equivalent asynchronous getAsyncRaw method.

  273. def getRaw(implicit conn: Conn): Collection[List[AnyRef]]

    Get java.util.Collection of all untyped rows matching molecule.

    Get java.util.Collection of all untyped rows matching molecule.

    Person.name.age.getRaw.toString === """[["Ben" 42], ["Liz" 37]]"""
    conn

    Implicit Conn value in scope

    returns

    java.util.Collection[java.util.List[AnyRef]]

    Definition Classes
    GetRaw
    See also

    Equivalent asynchronous getAsyncRaw method.

  274. def getRawAsOf(date: Date, n: Int)(implicit conn: Conn): Collection[List[AnyRef]]

    Get java.util.Collection of n untyped rows matching molecule as of date.

    Get java.util.Collection of n untyped rows matching molecule as of date.

    Call getRawAsOf when data doesn't need to be type-casted. Datomic's raw data is returned as-is.

    Get data at a human point in time (a java.util.Date).

    val beforeInsert = new java.util.Date
    
    // Insert
    val tx1 = Person.name.age insert List(
      ("Ben", 42),
      ("Liz", 37),
    )
    val ben = tx1.eid
    val afterInsert = new java.util.Date
    
    // Update
    val tx2 = Person(ben).age(43).update
    val afterUpdate = new java.util.Date
    
    // Retract
    val tx3 = ben.retract
    val afterRetract = new java.util.Date
    
    // Get all rows of raw data as of beforeInsert
    Person.name.age.getRawAsOf(beforeInsert).toString === """[]"""
    
    // Get all rows of raw data as of afterInsert
    Person.name.age.getRawAsOf(afterInsert).toString === """[["Liz" 37], ["Ben" 42]]"""
    
    // Get n (1) rows of raw data as of afterInsert
    Person.name.age.getRawAsOf(afterInsert, 1).toString === """[["Liz" 37]]"""
    date

    java.util.Date

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    returns

    java.util.Collection[java.util.List[AnyRef]]

    Definition Classes
    GetRaw
    See also

    Manual on asof/since

    Equivalent asynchronous getAsyncRawAsOf method.

  275. def getRawAsOf(date: Date)(implicit conn: Conn): Collection[List[AnyRef]]

    Get java.util.Collection of all untyped rows matching molecule as of date.

    Get java.util.Collection of all untyped rows matching molecule as of date.

    Call getRawAsOf when data doesn't need to be type-casted. Datomic's raw data is returned as-is.

    Get data at a human point in time (a java.util.Date).

    val beforeInsert = new java.util.Date
    
    // Insert
    val tx1 = Person.name.age insert List(
      ("Ben", 42),
      ("Liz", 37),
    )
    val ben = tx1.eid
    val afterInsert = new java.util.Date
    
    // Update
    val tx2 = Person(ben).age(43).update
    val afterUpdate = new java.util.Date
    
    // Retract
    val tx3 = ben.retract
    val afterRetract = new java.util.Date
    
    // Get raw data as of beforeInsert
    Person.name.age.getRawAsOf(beforeInsert).toString === """[]"""
    
    // Get raw data as of afterInsert
    Person.name.age.getRawAsOf(afterInsert).toString === """[["Liz" 37], ["Ben" 42]]"""
    
    // Get raw data as of afterUpdate
    Person.name.age.getRawAsOf(afterUpdate).toString === """[["Liz" 37], ["Ben" 43]]""" // Ben now 43
    
    // Get raw data as of afterRetract
    Person.name.age.getRawAsOf(afterRetract).toString === """[["Liz" 37]]""" // Ben gone
    date

    java.util.Date

    conn

    Implicit Conn value in scope

    returns

    java.util.Collection[java.util.List[AnyRef]]

    Definition Classes
    GetRaw
    See also

    Manual on asof/since

    Equivalent asynchronous getAsyncRawAsOf method.

  276. def getRawAsOf(tx: TxReport, n: Int)(implicit conn: Conn): Collection[List[AnyRef]]

    Get java.util.Collection of n untyped rows matching molecule as of tx.

    Get java.util.Collection of n untyped rows matching molecule as of tx.

    The Array is only populated with n rows of type-casted tuples. Call getRawAsOf when data doesn't need to be type-casted. Datomic's raw data is returned as-is.

    Datomic's internal asOf method can take a transaction entity id as argument to retrieve a database value as of that transaction (including).

    Instead of supplying the transaction entity id, in Molecule we supply a TxReport that contains the transaction entity id (which is used as argument to Datomic internally). This is more convenient when using Molecule since we getAsync a TxReport from transaction operations like get, update, retract etc.

    // Insert (tx report 1)
    val tx1 = Person.name.age insert List(
      ("Ben", 42),
      ("Liz", 37),
    )
    val ben = tx1.eid
    
    // Update (tx report 2)
    val tx2 = Person(ben).age(43).update
    
    // Retract (tx report 3)
    val tx3 = ben.retract
    
    // Get all rows of raw data as of tx1 (after insert)
    Person.name.age.getRawAsOf(tx1).toString === """[["Liz" 37], ["Ben" 42]]"""
    
    // Get n (1) rows of raw data as of tx1 (after insert)
    Person.name.age.getRawAsOf(tx1, 1).toString === """[["Liz" 37]]"""
    tx

    TxReport (returned from all molecule transaction operations)

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    returns

    java.util.Collection[java.util.List[AnyRef]]

    Definition Classes
    GetRaw
    See also

    Manual on asof/since

    Equivalent asynchronous getAsyncRawAsOf method.

  277. def getRawAsOf(tx: TxReport)(implicit conn: Conn): Collection[List[AnyRef]]

    Get java.util.Collection of all untyped rows matching molecule as of tx.

    Get java.util.Collection of all untyped rows matching molecule as of tx.

    Call getRawAsOf when data doesn't need to be type-casted. Datomic's raw data is returned as-is.

    Datomic's internal asOf method can take a transaction entity id as argument to retrieve a database value as of that transaction (including).

    Instead of supplying the transaction entity id, in Molecule we supply a TxReport that contains the transaction entity id (which is used as argument to Datomic internally). This is more convenient when using Molecule since we getAsync a TxReport from transaction operations like get, update, retract etc.

    // Insert (tx report 1)
    val tx1 = Person.name.age insert List(
      ("Ben", 42),
      ("Liz", 37),
    )
    val ben = tx1.eid
    
    // Update (tx report 2)
    val tx2 = Person(ben).age(43).update
    
    // Retract (tx report 3)
    val tx3 = ben.retract
    
    // Get raw data as of tx1 (after insert)
    Person.name.age.getRawAsOf(tx1).toString === """[["Liz" 37], ["Ben" 42]]"""
    
    // Get raw data as of tx2 (after update)
    Person.name.age.getRawAsOf(tx2).toString === """[["Liz" 37], ["Ben" 43]]""" // Ben now 43
    
    // Get raw data as of tx3 (after retract)
    Person.name.age.getRawAsOf(tx3).toString === """[["Liz" 37]]""" // Ben gone
    tx

    TxReport (returned from all molecule transaction operations)

    conn

    Implicit Conn value in scope

    returns

    java.util.Collection[java.util.List[AnyRef]]

    Definition Classes
    GetRaw
    See also

    Manual on asof/since

    Equivalent asynchronous getAsyncRawAsOf method.

  278. def getRawAsOf(t: Long, n: Int)(implicit conn: Conn): Collection[List[AnyRef]]

    Get java.util.Collection of n untyped rows matching molecule as of transaction time t.

    Get java.util.Collection of n untyped rows matching molecule as of transaction time t.

    Call getRawAsOf when data doesn't need to be type-casted. Datomic's raw data is returned as-is.

    Transaction time t is an auto-incremented transaction number assigned internally by Datomic.

    t can for instance be retrieved in a getHistory call for an attribute and then be used to get data as of that point in time (including that transaction):

    // Insert (t 1028)
    val List(ben, liz) = Person.name.age insert List(
      ("Ben", 42),
      ("Liz", 37),
    ) eids
    
    // Update (t 1031)
    Person(ben).age(43).update
    
    // History of Ben
    Person(ben).age.t.op.getHistory.sortBy(r => (r._2, r._3)) === List(
      (42, 1028, true),  // Insert:  42 asserted
      (42, 1031, false), // Update:  42 retracted
      (43, 1031, true),  //          43 asserted
    )
    
    // Get all rows of raw data as of transaction t 1031 (after update)
    Person.name.age.getRawAsOf(1028).toString === """[["Ben" 43], ["Liz" 37]]"""
    
    // Get n (1) rows of raw data as of transaction t 1031 (after update)
    Person.name.age.getRawAsOf(1031, 1).toString === """[["Ben" 43]]"""
    t

    Transaction time t

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    returns

    java.util.Collection[java.util.List[AnyRef]]

    Definition Classes
    GetRaw
    See also

    Manual on asof/since

    Equivalent asynchronous getAsyncRawAsOf method.

  279. def getRawAsOf(t: Long)(implicit conn: Conn): Collection[List[AnyRef]]

    Get java.util.Collection of all untyped rows matching molecule as of transaction time t.

    Get java.util.Collection of all untyped rows matching molecule as of transaction time t.

    Call getRawAsOf when data doesn't need to be type-casted. Datomic's raw data is returned as-is.

    Transaction time t is an auto-incremented transaction number assigned internally by Datomic.

    t can for instance be retrieved in a getHistory call for an attribute and then be used to get data as of that point in time (including that transaction):

    // Insert (t 1028)
    val List(ben, liz) = Person.name.age insert List(
      ("Ben", 42),
      ("Liz", 37),
    ) eids
    
    // Update (t 1031)
    Person(ben).age(43).update
    
    // Retract (t 1032)
    ben.retract
    
    // History of Ben
    Person(ben).age.t.op.getHistory.sortBy(r => (r._2, r._3)) === List(
      (42, 1028, true),  // Insert:  42 asserted
      (42, 1031, false), // Update:  42 retracted
      (43, 1031, true),  //          43 asserted
      (43, 1032, false)  // Retract: 43 retracted
    )
    
    // Get raw data as of transaction t 1028 (after insert)
    Person.name.age.getRawAsOf(1028).toString === """[["Ben" 42], ["Liz" 37]]"""
    
    // Get raw data as of transaction t 1031 (after update)
    Person.name.age.getRawAsOf(1031).toString === """[["Ben" 43], ["Liz" 37]]""" // Ben now 43
    
    // Get raw data as of transaction t 1032 (after retract)
    Person.name.age.getRawAsOf(1032).toString === """[["Liz" 37]]""" // Ben gone
    t

    Transaction time t

    conn

    Implicit Conn value in scope

    returns

    java.util.Collection[java.util.List[AnyRef]]

    Definition Classes
    GetRaw
    See also

    Manual on asof/since

    Equivalent asynchronous getAsyncRawAsOf method.

  280. def getRawSince(date: Date, n: Int)(implicit conn: Conn): Collection[List[AnyRef]]

    Get java.util.Collection of n untyped rows matching molecule since date.

    Get java.util.Collection of n untyped rows matching molecule since date.

    Call getRawSince when data doesn't need to be type-casted. Datomic's raw data is returned as-is.

    Get data added/retracted since a human point in time (a java.util.Date).

    // Transact 3 times (`inst` retrieves transaction time from tx report)
    val date1 = Person.name("Ann").save.inst
    val date2 = Person.name("Ben").save.inst
    val date3 = Person.name("Cay").save.inst
    
    // Current values
    Person.name.get === List("Ann", "Ben", "Cay")
    
    // Ben and Cay added since date1
    Person.name.getRawSince(date1).toString === """[["Ben"], ["Cay"]]"""
    
    // Ben and Cay added since date1 - only n (1) rows returned
    Person.name.getRawSince(date1, 1).toString === """[["Ben"]]"""
    date

    java.util.Date

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    returns

    java.util.Collection[java.util.List[AnyRef]]

    Definition Classes
    GetRaw
    See also

    Manual on asof/since

    Equivalent asynchronous getAsyncRawSince method.

  281. def getRawSince(date: Date)(implicit conn: Conn): Collection[List[AnyRef]]

    Get java.util.Collection of all untyped rows matching molecule since date.

    Get java.util.Collection of all untyped rows matching molecule since date.

    Call getRawSince when data doesn't need to be type-casted. Datomic's raw data is returned as-is.

    Get data added/retracted since a human point in time (a java.util.Date).

    // Transact 3 times (`inst` retrieves transaction time from tx report)
    val date1 = Person.name("Ann").save.inst
    val date2 = Person.name("Ben").save.inst
    val date3 = Person.name("Cay").save.inst
    
    // Current values
    Person.name.get === List("Ann", "Ben", "Cay")
    
    // Ben and Cay added since date1
    Person.name.getRawSince(date1).toString === """[["Ben"], ["Cay"]]"""
    
    // Cay added since date2
    Person.name.getRawSince(date2).toString === """[["Cay"]]"""
    
    // Nothing added since date3
    Person.name.getRawSince(date3).toString === """[]"""
    date

    java.util.Date

    conn

    Implicit Conn value in scope

    returns

    java.util.Collection[java.util.List[AnyRef]]

    Definition Classes
    GetRaw
    See also

    Manual on asof/since

    Equivalent asynchronous getAsyncRawSince method.

  282. def getRawSince(tx: TxReport, n: Int)(implicit conn: Conn): Collection[List[AnyRef]]

    Get java.util.Collection of n untyped rows matching molecule since tx.

    Get java.util.Collection of n untyped rows matching molecule since tx.

    Call getRawSince when data doesn't need to be type-casted. Datomic's raw data is returned as-is.

    Datomic's internal since method can take a transaction entity id as argument to retrieve a database value since that transaction (excluding).

    Instead of supplying the transaction entity id, in Molecule we supply a TxReport that contains the transaction entity id (which is used as argument to Datomic internally). This is more convenient when using Molecule since we getAsync a TxReport from transaction operations like get, update, retract etc.

    // Get tx reports for 3 transactions
    val tx1 = Person.name("Ann").save
    val tx2 = Person.name("Ben").save
    val tx3 = Person.name("Cay").save
    
    // Current values
    Person.name.get === List("Ann", "Ben", "Cay")
    
    // Ben and Cay added since tx1
    Person.name.getRawSince(tx1).toString === """[["Ben"], ["Cay"]]"""
    
    // Ben and Cay added since tx1 - only n (1) rows returned
    Person.name.getRawSince(tx1, 1).toString === """[["Ben"]]"""
    tx

    TxReport (returned from all molecule transaction operations)

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    returns

    java.util.Collection[java.util.List[AnyRef]]

    Definition Classes
    GetRaw
    See also

    Manual on asof/since

    Equivalent asynchronous getAsyncRawSince method.

  283. def getRawSince(tx: TxReport)(implicit conn: Conn): Collection[List[AnyRef]]

    Get java.util.Collection of all untyped rows matching molecule since tx.

    Get java.util.Collection of all untyped rows matching molecule since tx.

    Call getRawSince when data doesn't need to be type-casted. Datomic's raw data is returned as-is.

    Datomic's internal since method can take a transaction entity id as argument to retrieve a database value since that transaction (excluding).

    Instead of supplying the transaction entity id, in Molecule we supply a TxReport that contains the transaction entity id (which is used as argument to Datomic internally). This is more convenient when using Molecule since we getAsync a TxReport from transaction operations like get, update, retract etc.

    // Get tx reports for 3 transactions
    val tx1 = Person.name("Ann").save
    val tx2 = Person.name("Ben").save
    val tx3 = Person.name("Cay").save
    
    // Current values
    Person.name.get === List("Ann", "Ben", "Cay")
    
    // Ben and Cay added since tx1
    Person.name.getRawSince(tx1).toString === """[["Ben"], ["Cay"]]"""
    
    // Cay added since tx2
    Person.name.getRawSince(tx2).toString === """[["Cay"]]"""
    
    // Nothing added since tx3
    Person.name.getRawSince(tx3).toString === """[]"""
    tx

    TxReport (returned from all molecule transaction operations)

    conn

    Implicit Conn value in scope

    returns

    java.util.Collection[java.util.List[AnyRef]]

    Definition Classes
    GetRaw
    See also

    Manual on asof/since

    Equivalent asynchronous getAsyncRawSince method.

  284. def getRawSince(t: Long, n: Int)(implicit conn: Conn): Collection[List[AnyRef]]

    Get java.util.Collection of n untyped rows matching molecule since transaction time t.

    Get java.util.Collection of n untyped rows matching molecule since transaction time t.

    Call getRawSince when data doesn't need to be type-casted. Datomic's raw data is returned as-is.

    Transaction time t is an auto-incremented transaction number assigned internally by Datomic.

    t can for instance be retrieved calling t on the tx report returned from transactional operations and then be used to get data since that point in time (excluding that transaction):

    // 3 transaction times `t`
    val t1 = Person.name("Ann").save.t
    val t2 = Person.name("Ben").save.t
    val t3 = Person.name("Cay").save.t
    
    // Current values as Iterable
    Person.name.get === List("Ann", "Ben", "Cay")
    
    // Ben and Cay added since transaction time t1
    Person.name.getRawSince(t1).toString === """[["Ben"], ["Cay"]]"""
    
    // Ben and Cay added since transaction time t1 - only n (1) rows returned
    Person.name.getRawSince(t1).toString === """[["Ben"]]"""
    t

    Transaction time t

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    returns

    java.util.Collection[java.util.List[AnyRef]]

    Definition Classes
    GetRaw
    See also

    Manual on asof/since

    Equivalent asynchronous getAsyncRawSince method.

  285. def getRawSince(t: Long)(implicit conn: Conn): Collection[List[AnyRef]]

    Get java.util.Collection of all untyped rows matching molecule since transaction time t.

    Get java.util.Collection of all untyped rows matching molecule since transaction time t.

    Call getRawSince when data doesn't need to be type-casted. Datomic's raw data is returned as-is.

    Transaction time t is an auto-incremented transaction number assigned internally by Datomic.

    t can for instance be retrieved calling t on the tx report returned from transactional operations and then be used to get data since that point in time (excluding that transaction):

    // 3 transaction times `t`
    val t1 = Person.name("Ann").save.t
    val t2 = Person.name("Ben").save.t
    val t3 = Person.name("Cay").save.t
    
    // Current values as Iterable
    Person.name.get === List("Ann", "Ben", "Cay")
    
    // Ben and Cay added since transaction time t1
    Person.name.getRawSince(t1).toString === """[["Ben"], ["Cay"]]"""
    
    // Cay added since transaction time t2
    Person.name.getRawSince(t2).toString === """[["Cay"]]"""
    
    // Nothing added since transaction time t3
    Person.name.getRawSince(t3).toString === """[]"""
    t

    Transaction time t

    conn

    Implicit Conn value in scope

    returns

    java.util.Collection[java.util.List[AnyRef]]

    Definition Classes
    GetRaw
    See also

    Manual on asof/since

    Equivalent asynchronous getAsyncRawSince method.

  286. def getRawWith(txData: List[_], n: Int)(implicit conn: Conn): Collection[List[AnyRef]]

    Get java.util.Collection of n untyped rows matching molecule with applied raw transaction data.

    Get java.util.Collection of n untyped rows matching molecule with applied raw transaction data.

    Apply raw transaction data to in-memory "branch" of db without affecting db to see how it would then look:

    // Live size of Person db
    Person.name.get.size === 150
    
    // Read some transaction data from file
    val data_rdr2 = new FileReader("examples/resources/seattle/seattle-data1a.dtm")
    val newDataTx = Util.readAll(data_rdr2).get(0).asInstanceOf[java.util.List[Object]]
    
    // Imagine future db - 100 persons would be added, apparently
    Person.name.getRawWith(newDataTx).size === 250
    
    // Imagine future db - Let's just take 10
    Person.name.getRawWith(newDataTx, 10).size === 10
    txData

    Raw transaction data as java.util.List[Object]

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    returns

    java.util.Collection[java.util.List[AnyRef]]

    Definition Classes
    GetRaw
    See also

    Manual on with

    Equivalent asynchronous getAsyncRawWith method.

  287. def getRawWith(txData: List[_])(implicit conn: Conn): Collection[List[AnyRef]]

    Get java.util.Collection of all untyped rows matching molecule with applied raw transaction data.

    Get java.util.Collection of all untyped rows matching molecule with applied raw transaction data.

    Apply raw transaction data to in-memory "branch" of db without affecting db to see how it would then look:

    // Live size of Person db
    Person.name.get.size === 150
    
    // Read some transaction data from file
    val data_rdr2 = new FileReader("examples/resources/seattle/seattle-data1a.dtm")
    val newDataTx = Util.readAll(data_rdr2).get(0).asInstanceOf[java.util.List[Object]]
    
    // Imagine future db - 100 persons would be added, apparently
    Person.name.getRawWith(newDataTx).size === 250
    txData

    Raw transaction data as java.util.List[Object]

    conn

    Implicit Conn value in scope

    returns

    java.util.Collection[java.util.List[AnyRef]]

    Definition Classes
    GetRaw
    See also

    Manual on with

    Equivalent asynchronous getAsyncRawWith method.

  288. def getRawWith(n: Int, txMolecules: Seq[Seq[Statement]]*)(implicit conn: Conn): Collection[List[AnyRef]]

    Get java.util.Collection of n untyped rows matching molecule with applied molecule transaction data.

    Get java.util.Collection of n untyped rows matching molecule with applied molecule transaction data.

    Apply one or more molecule transactions to in-memory "branch" of db without affecting db to see how it would then look:

    // Current state
    val List(ben, liz) = Person.name.likes.insert(
      ("Ben", "pasta"),
      ("Liz", "pizza")
    ).eids
    
    // Test multiple transactions
    Person.name.likes.getRawWith(
      Person(ben).likes("sushi").getUpdateTx,
      Person(liz).likes("cake").getUpdateTx
    ).toString === """[["Ben" "sushi"], ["Liz" "cake"]]"""
    
    // Same as above, but only n (1) rows returned:
    Person.name.likes.getRawWith(
      1
      Person(ben).likes("sushi").getUpdateTx,
      Person(liz).likes("cake").getUpdateTx
    ).toString === """[["Ben" "sushi"]]"""

    Multiple transactions can be applied to test more complex what-if scenarios!

    n

    Int Number of rows returned

    txMolecules

    Transaction statements from applied Molecules with test data

    conn

    Implicit Conn value in scope

    returns

    java.util.Collection[java.util.List[AnyRef]]

    Definition Classes
    GetRaw
    Note

    Note how the n parameter has to come before the txMolecules vararg.

    See also

    Manual on with

    Equivalent asynchronous getAsyncRawWith method.

  289. def getRawWith(txMolecules: Seq[Seq[Statement]]*)(implicit conn: Conn): Collection[List[AnyRef]]

    Get java.util.Collection of all untyped rows matching molecule with applied molecule transaction data.

    Get java.util.Collection of all untyped rows matching molecule with applied molecule transaction data.

    Apply one or more molecule transactions to in-memory "branch" of db without affecting db to see how it would then look:

    // Current state
    val ben = Person.name("Ben").likes("pasta").save.eid
    
    // Base data
    Person.name.likes.getRawWith(
      Person(ben).likes("sushi").getUpdateTx
    ).toString ==== """[["Ben" "sushi"]]"""
    
    // Current state is still the same
    Person.name.likes.get === List(("Ben", "pasta"))

    Multiple transactions can be applied to test more complex what-if scenarios!

    txMolecules

    Transaction statements from applied Molecules with test data

    conn

    Implicit Conn value in scope

    returns

    java.util.Collection[java.util.List[AnyRef]]

    Definition Classes
    GetRaw
    See also

    Manual on with

    Equivalent asynchronous getAsyncRawWith method.

  290. def getSaveTx(implicit conn: Conn): Seq[Seq[Statement]]

    Get transaction statements of a call to save on a molecule (without affecting the db).

    Get transaction statements of a call to save on a molecule (without affecting the db).

    conn

    Implicit Conn value in scope

    returns

    Transaction statements

  291. def getSince(date: Date, n: Int)(implicit conn: Conn, tplType: ClassTag[Tpl]): List[Tpl]

    Get List of n rows as tuples matching molecule since date.

    Get List of n rows as tuples matching molecule since date.

    Get data added/retracted since a human point in time (a java.util.Date).

    // Transact 3 times (`inst` retrieves transaction time/Date from tx report)
    val date1 = Person.name("Ann").save.inst
    val date2 = Person.name("Ben").save.inst
    val date3 = Person.name("Cay").save.inst
    
    // Current values
    Person.name.get === List("Ann", "Ben", "Cay")
    
    // Ben and Cay added since date1
    Person.name.getSince(date1) === List("Ben", "Cay")
    
    // Ben and Cay added since date1 - only n (1) rows returned
    Person.name.getSince(date1, 1) === List("Ben")
    date

    java.util.Date

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array extraction

    returns

    List[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetList
    See also

    Manual on asof/since

    Equivalent asynchronous getAsyncSince method.

  292. def getSince(date: Date)(implicit conn: Conn, tplType: ClassTag[Tpl]): List[Tpl]

    Get List of all rows as tuples matching molecule since date.

    Get List of all rows as tuples matching molecule since date.

    Get data added/retracted since a human point in time (a java.util.Date).

    // Transact 3 times (`inst` retrieves transaction time/Date from tx report)
    val date1 = Person.name("Ann").save.inst
    val date2 = Person.name("Ben").save.inst
    val date3 = Person.name("Cay").save.inst
    
    // Current values
    Person.name.get === List("Ann", "Ben", "Cay")
    
    // Ben and Cay added since date1
    Person.name.getSince(date1) === List("Ben", "Cay")
    
    // Cay added since date2
    Person.name.getSince(date2) === List("Cay")
    
    // Nothing added since date3
    Person.name.getSince(date3) === Nil
    date

    java.util.Date

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array extraction

    returns

    List[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetList
    See also

    Manual on asof/since

    Equivalent asynchronous getAsyncSince method.

  293. def getSince(tx: TxReport, n: Int)(implicit conn: Conn, tplType: ClassTag[Tpl]): List[Tpl]

    Get List of n rows as tuples matching molecule since tx.

    Get List of n rows as tuples matching molecule since tx.

    Datomic's internal since can take a transaction entity id as argument to retrieve a database value since that transaction (excluding the transaction itself).

    Instead of supplying the transaction entity id, in Molecule we supply a TxReport that contains the transaction entity id (which is used as argument to Datomic internally). This is more convenient when using Molecule since we getAsync a TxReport from transaction operations like get, update, retract etc.

    // Get tx reports for 3 transactions
    val tx1 = Person.name("Ann").save
    val tx2 = Person.name("Ben").save
    val tx3 = Person.name("Cay").save
    
    // Current values
    Person.name.get === List("Ann", "Ben", "Cay")
    
    // Ben and Cay added since tx1
    Person.name.getSince(tx1) === List("Ben", "Cay")
    
    // Ben and Cay added since tx1 - only n (1) rows returned
    Person.name.getSince(tx1, 1) === List("Ben")
    tx

    TxReport

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array extraction

    returns

    List[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetList
    See also

    Manual on asof/since

    Equivalent asynchronous getAsyncSince method.

  294. def getSince(tx: TxReport)(implicit conn: Conn, tplType: ClassTag[Tpl]): List[Tpl]

    Get List of all rows as tuples matching molecule since tx.

    Get List of all rows as tuples matching molecule since tx.

    Datomic's internal since can take a transaction entity id as argument to retrieve a database value since that transaction (excluding the transaction itself).

    Instead of supplying the transaction entity id, in Molecule we supply a TxReport that contains the transaction entity id (which is used as argument to Datomic internally). This is more convenient when using Molecule since we getAsync a TxReport from transaction operations like get, update, retract etc.

    // Get tx reports for 3 transactions
    val tx1 = Person.name("Ann").save
    val tx2 = Person.name("Ben").save
    val tx3 = Person.name("Cay").save
    
    // Current values
    Person.name.get === List("Ann", "Ben", "Cay")
    
    // Ben and Cay added since tx1
    Person.name.getSince(tx1) === List("Ben", "Cay")
    
    // Cay added since tx2
    Person.name.getSince(tx2) === List("Cay")
    
    // Nothing added since tx3
    Person.name.getSince(tx3) === Nil
    tx

    TxReport

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array extraction

    returns

    List[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetList
    See also

    Manual on asof/since

    Equivalent asynchronous getAsyncSince method.

  295. def getSince(t: Long, n: Int)(implicit conn: Conn, tplType: ClassTag[Tpl]): List[Tpl]

    Get List of n rows as tuples matching molecule since transaction time t.

    Get List of n rows as tuples matching molecule since transaction time t.

    Transaction time t is an auto-incremented transaction number assigned internally by Datomic.

    t can for instance be retrieved by calling t on the tx report returned from transactional operations and then be used to get data since that point in time (excluding that transaction):

    // 3 transaction times `t`
    val t1 = Person.name("Ann").save.t
    val t2 = Person.name("Ben").save.t
    val t3 = Person.name("Cay").save.t
    
    // Current values
    Person.name.get === List("Ann", "Ben", "Cay")
    
    // Ben and Cay added since transaction time t 1028
    Person.name.getSince(t1) === List("Ben", "Cay")
    
    // Ben and Cay added since transaction time t 1028 - only n (1) rows returned
    Person.name.getSince(t1, 1) === List("Ben")
    t

    Transaction time t

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array extraction

    returns

    List[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetList
    See also

    Manual on asof/since

    Equivalent asynchronous getAsyncSince method.

  296. def getSince(t: Long)(implicit conn: Conn, tplType: ClassTag[Tpl]): List[Tpl]

    Get List of all rows as tuples matching molecule since transaction time t.

    Get List of all rows as tuples matching molecule since transaction time t.

    Transaction time t is an auto-incremented transaction number assigned internally by Datomic.

    t can for instance be retrieved by calling t on the tx report returned from transactional operations and then be used to get data since that point in time (excluding that transaction):

    // 3 transaction times `t`
    val t1 = Person.name("Ann").save.t
    val t2 = Person.name("Ben").save.t
    val t3 = Person.name("Cay").save.t
    
    // Current values
    Person.name.get === List("Ann", "Ben", "Cay")
    
    // Ben and Cay added since transaction time t 1028
    Person.name.getSince(t1) === List("Ben", "Cay")
    
    // Cay added since transaction time t 1030
    Person.name.getSince(t2) === List("Cay")
    
    // Nothing added since transaction time t 1032
    Person.name.getSince(t3) === Nil
    t

    Transaction time t

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array extraction

    returns

    List[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetList
    See also

    Manual on asof/since

    Equivalent asynchronous getAsyncSince method.

  297. def getUpdateTx(implicit conn: Conn): Seq[Seq[Statement]]

    Get transaction statements of a call to update on a molecule (without affecting the db).

    Get transaction statements of a call to update on a molecule (without affecting the db).

    conn

    Implicit Conn value in scope

  298. def getWith(txData: List[_], n: Int)(implicit conn: Conn, tplType: ClassTag[Tpl]): List[Tpl]

    Get List of n rows as tuples matching molecule with applied raw transaction data.

    Get List of n rows as tuples matching molecule with applied raw transaction data.

    Apply raw transaction data to in-memory "branch" of db without affecting db to see how it would then look:

    // Live size of Person db
    Person.name.get.size === 150
    
    // Read some transaction data from file
    val data_rdr2 = new FileReader("examples/resources/seattle/seattle-data1a.dtm")
    val newDataTx = Util.readAll(data_rdr2).get(0).asInstanceOf[java.util.List[Object]]
    
    // Imagine future db - 100 persons would be added, apparently
    Person.name.getWith(newDataTx).size === 250
    
    // Imagine future db - Let's just take 10
    Person.name.getWith(newDataTx, 10).size === 10
    txData

    Raw transaction data as java.util.List[Object]

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array extraction

    returns

    List[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetList
    See also

    Manual on with

    Equivalent asynchronous getAsyncWith method.

  299. def getWith(txData: List[_])(implicit conn: Conn, tplType: ClassTag[Tpl]): List[Tpl]

    Get List of all rows as tuples matching molecule with applied raw transaction data.

    Get List of all rows as tuples matching molecule with applied raw transaction data.

    Apply raw transaction data to in-memory "branch" of db without affecting db to see how it would then look:

    // Live size of Person db
    Person.name.get.size === 150
    
    // Read some transaction data from file
    val data_rdr2 = new FileReader("examples/resources/seattle/seattle-data1a.dtm")
    val newDataTx = Util.readAll(data_rdr2).get(0).asInstanceOf[java.util.List[Object]]
    
    // Imagine future db - 100 persons would be added, apparently
    Person.name.getWith(newDataTx).size === 250
    txData

    Raw transaction data as java.util.List[Object]

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array extraction

    returns

    List[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetList
    See also

    Manual on with

    Equivalent asynchronous getAsyncWith method.

  300. def getWith(n: Int, txMolecules: Seq[Seq[Statement]]*)(implicit conn: Conn, tplType: ClassTag[Tpl]): List[Tpl]

    Get List of n rows as tuples matching molecule with applied molecule transaction data.

    Get List of n rows as tuples matching molecule with applied molecule transaction data.

    Apply one or more molecule transactions to in-memory "branch" of db without affecting db to see how it would then look:

    // Current state
    val List(ben, liz) = Person.name.likes.insert(
      ("Ben", "pasta"),
      ("Liz", "pizza")
    ).eids
    
    // Test multiple transactions
    Person.name.likes.getWith(
      Person(ben).likes("sushi").getUpdateTx,
      Person(liz).likes("cake").getUpdateTx
    ) === List(
      ("Ben", "sushi")
      ("Liz", "cake")
    )
    
    // Same as above, but only n (1) rows returned:
    Person.name.likes.getWith(
      1
      Person(ben).likes("sushi").getUpdateTx,
      Person(liz).likes("cake").getUpdateTx
    ) === List(
      ("Ben", "sushi")
    )
    n

    Int Number of rows returned

    txMolecules

    Transaction statements from applied Molecules with test data

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array extraction

    returns

    List[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetList
    Note

    Note how the n parameter has to come before the txMolecules vararg.

    See also

    Manual on with

    Equivalent asynchronous getAsyncWith method.

  301. def getWith(txMolecules: Seq[Seq[Statement]]*)(implicit conn: Conn, tplType: ClassTag[Tpl]): List[Tpl]

    Get List of all rows as tuples matching molecule with applied molecule transaction data.

    Get List of all rows as tuples matching molecule with applied molecule transaction data.

    Apply one or more molecule transactions to in-memory "branch" of db without affecting db to see how it would then look:

    // Current state
    val ben = Person.name("Ben").likes("pasta").save.eid
    
    // Base data
    Person.name.likes.getWith(
      // apply imaginary transaction data
      Person(ben).likes("sushi").getUpdateTx
    ) === List(
      // Effect: Ben would like sushi if tx was applied
      ("Ben", "sushi")
    )
    
    // Current state is still the same
    Person.name.likes.get === List(("Ben", "pasta"))

    Multiple transactions can be applied to test more complex what-if scenarios!

    txMolecules

    Transaction statements from applied Molecules with test data

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Tpl] to capture Tuple type for Array extraction

    returns

    List[Tpl] where Tpl is a tuple of data matching molecule

    Definition Classes
    GetList
    See also

    Manual on with

    Equivalent asynchronous getAsyncWith method.

  302. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  303. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  304. def jsonAggr(sb: StringBuilder, field: String, row: List[_], i: Int): StringBuilder
    Attributes
    protected
    Definition Classes
    JsonBuilder
  305. def jsonAggrDate(sb: StringBuilder, field: String, row: List[_], i: Int): StringBuilder
    Attributes
    protected
    Definition Classes
    JsonBuilder
  306. def jsonAggrLazySeq(sb: StringBuilder, field: String, row: List[_], i: Int): StringBuilder
    Attributes
    protected
    Definition Classes
    JsonBuilder
  307. def jsonAggrLazySeqDate(sb: StringBuilder, field: String, row: List[_], i: Int): StringBuilder
    Attributes
    protected
    Definition Classes
    JsonBuilder
  308. def jsonAggrLazySeqQuoted(sb: StringBuilder, field: String, row: List[_], i: Int): StringBuilder
    Attributes
    protected
    Definition Classes
    JsonBuilder
  309. def jsonAggrLazySeqToString(sb: StringBuilder, field: String, row: List[_], i: Int): StringBuilder
    Attributes
    protected
    Definition Classes
    JsonBuilder
  310. def jsonAggrListLazySeq(sb: StringBuilder, field: String, row: List[_], i: Int): StringBuilder
    Attributes
    protected
    Definition Classes
    JsonBuilder
  311. def jsonAggrListLazySeqDate(sb: StringBuilder, field: String, row: List[_], i: Int): StringBuilder
    Attributes
    protected
    Definition Classes
    JsonBuilder
  312. def jsonAggrListLazySeqQuoted(sb: StringBuilder, field: String, row: List[_], i: Int): StringBuilder
    Attributes
    protected
    Definition Classes
    JsonBuilder
  313. def jsonAggrListLazySeqToString(sb: StringBuilder, field: String, row: List[_], i: Int): StringBuilder
    Attributes
    protected
    Definition Classes
    JsonBuilder
  314. def jsonAggrListVector(sb: StringBuilder, field: String, row: List[_], i: Int): StringBuilder
    Attributes
    protected
    Definition Classes
    JsonBuilder
  315. def jsonAggrListVectorDate(sb: StringBuilder, field: String, row: List[_], i: Int): StringBuilder
    Attributes
    protected
    Definition Classes
    JsonBuilder
  316. def jsonAggrListVectorQuoted(sb: StringBuilder, field: String, row: List[_], i: Int): StringBuilder
    Attributes
    protected
    Definition Classes
    JsonBuilder
  317. def jsonAggrListVectorToString(sb: StringBuilder, field: String, row: List[_], i: Int): StringBuilder
    Attributes
    protected
    Definition Classes
    JsonBuilder
  318. def jsonAggrQuoted(sb: StringBuilder, field: String, row: List[_], i: Int): StringBuilder
    Attributes
    protected
    Definition Classes
    JsonBuilder
  319. def jsonAggrToString(sb: StringBuilder, field: String, row: List[_], i: Int): StringBuilder
    Attributes
    protected
    Definition Classes
    JsonBuilder
  320. def jsonAggrVector(sb: StringBuilder, field: String, row: List[_], i: Int): StringBuilder
    Attributes
    protected
    Definition Classes
    JsonBuilder
  321. def jsonAggrVectorDate(sb: StringBuilder, field: String, row: List[_], i: Int): StringBuilder
    Attributes
    protected
    Definition Classes
    JsonBuilder
  322. def jsonAggrVectorQuoted(sb: StringBuilder, field: String, row: List[_], i: Int): StringBuilder
    Attributes
    protected
    Definition Classes
    JsonBuilder
  323. def jsonAggrVectorToString(sb: StringBuilder, field: String, row: List[_], i: Int): StringBuilder
    Attributes
    protected
    Definition Classes
    JsonBuilder
  324. def jsonMany(sb: StringBuilder, field: String, row: List[_], i: Int): StringBuilder
    Attributes
    protected
    Definition Classes
    JsonBuilder
  325. def jsonManyDate(sb: StringBuilder, field: String, row: List[_], i: Int): StringBuilder
    Attributes
    protected
    Definition Classes
    JsonBuilder
  326. def jsonManyQuoted(sb: StringBuilder, field: String, row: List[_], i: Int): StringBuilder
    Attributes
    protected
    Definition Classes
    JsonBuilder
  327. def jsonManyToString(sb: StringBuilder, field: String, row: List[_], i: Int): StringBuilder
    Attributes
    protected
    Definition Classes
    JsonBuilder
  328. def jsonMap(sb: StringBuilder, field: String, row: List[_], i: Int): StringBuilder
    Attributes
    protected
    Definition Classes
    JsonBuilder
  329. def jsonMapDate(sb: StringBuilder, field: String, row: List[_], i: Int): StringBuilder
    Attributes
    protected
    Definition Classes
    JsonBuilder
  330. def jsonMapQuoted(sb: StringBuilder, field: String, row: List[_], i: Int): StringBuilder
    Attributes
    protected
    Definition Classes
    JsonBuilder
  331. def jsonOne(sb: StringBuilder, field: String, row: List[_], i: Int): StringBuilder
    Attributes
    protected
    Definition Classes
    JsonBuilder
  332. def jsonOneAny(sb: StringBuilder, field: String, row: List[_], i: Int): StringBuilder
    Attributes
    protected
    Definition Classes
    JsonBuilder
  333. def jsonOneDate(sb: StringBuilder, field: String, row: List[_], i: Int): StringBuilder
    Attributes
    protected
    Definition Classes
    JsonBuilder
  334. def jsonOneQuoted(sb: StringBuilder, field: String, row: List[_], i: Int): StringBuilder
    Attributes
    protected
    Definition Classes
    JsonBuilder
  335. def jsonOneToString(sb: StringBuilder, field: String, row: List[_], i: Int): StringBuilder
    Attributes
    protected
    Definition Classes
    JsonBuilder
  336. def jsonOptMany(sb: StringBuilder, field: String, row: List[_], i: Int): StringBuilder
    Attributes
    protected
    Definition Classes
    JsonBuilder
  337. def jsonOptManyDate(sb: StringBuilder, field: String, row: List[_], i: Int): StringBuilder
    Attributes
    protected
    Definition Classes
    JsonBuilder
  338. def jsonOptManyEnum(sb: StringBuilder, field: String, row: List[_], i: Int): StringBuilder
    Attributes
    protected
    Definition Classes
    JsonBuilder
  339. def jsonOptManyQuoted(sb: StringBuilder, field: String, row: List[_], i: Int): StringBuilder
    Attributes
    protected
    Definition Classes
    JsonBuilder
  340. def jsonOptManyToString(sb: StringBuilder, field: String, row: List[_], i: Int): StringBuilder
    Attributes
    protected
    Definition Classes
    JsonBuilder
  341. def jsonOptMap(sb: StringBuilder, field: String, row: List[_], i: Int): StringBuilder
    Attributes
    protected
    Definition Classes
    JsonBuilder
  342. def jsonOptMapDate(sb: StringBuilder, field: String, row: List[_], i: Int): StringBuilder
    Attributes
    protected
    Definition Classes
    JsonBuilder
  343. def jsonOptMapQuoted(sb: StringBuilder, field: String, row: List[_], i: Int): StringBuilder
    Attributes
    protected
    Definition Classes
    JsonBuilder
  344. def jsonOptOne(sb: StringBuilder, field: String, row: List[_], i: Int): StringBuilder
    Attributes
    protected
    Definition Classes
    JsonBuilder
  345. def jsonOptOneDate(sb: StringBuilder, field: String, row: List[_], i: Int): StringBuilder
    Attributes
    protected
    Definition Classes
    JsonBuilder
  346. def jsonOptOneEnum(sb: StringBuilder, field: String, row: List[_], i: Int): StringBuilder
    Attributes
    protected
    Definition Classes
    JsonBuilder
  347. def jsonOptOneQuoted(sb: StringBuilder, field: String, row: List[_], i: Int): StringBuilder
    Attributes
    protected
    Definition Classes
    JsonBuilder
  348. def jsonOptOneToString(sb: StringBuilder, field: String, row: List[_], i: Int): StringBuilder
    Attributes
    protected
    Definition Classes
    JsonBuilder
  349. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  350. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  351. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  352. final def o(opt: Option[Any]): String
    Attributes
    protected
    Definition Classes
    Helpers
  353. def pair(sb: StringBuilder, field: String, value: Any): StringBuilder
    Attributes
    protected
    Definition Classes
    JsonBuilder
  354. def quote(sb: StringBuilder, s: String): StringBuilder
    Attributes
    protected
    Definition Classes
    JsonBuilder
  355. def quotedPair(sb: StringBuilder, field: String, value: String): StringBuilder
    Attributes
    protected
    Definition Classes
    JsonBuilder
  356. def row2json(sb: StringBuilder, row: List[AnyRef]): StringBuilder
    Attributes
    protected
    Definition Classes
    JsonBuilder
  357. def save(implicit conn: Conn): TxReport

    Save data applied to molecule attributes.

    Save data applied to molecule attributes.

    Returns TxReport having info about the result of the save transaction.

    val txReport = Person.name("Ben").age(42).save
    
    // Data has been saved in db
    Person.name.age.get === List(("Ben", 42))

    The save operation is synchronous and blocking. Use saveAsync for non-blocking asynchronous saves.

    conn

    Implicit Conn value in scope

    returns

    TxReport with info about the result of the save transaction.

  358. def saveAsync(implicit conn: Conn, ec: ExecutionContext): Future[TxReport]

    Asynchronously save data applied to molecule attributes.

    Asynchronously save data applied to molecule attributes.

    Returns Future with TxReport having info about the result of the save transaction.

    val futureSave: Future[TxReport] = Person.name("Ben").age(42).saveAsync
    
    for {
      _ <- futureSave
      result <- Person.name.age.getAsync
    } yield {
      // Data was saved
      result.head === ("Ben", 42)
    }

    The save operation is asynchronous and non-blocking. Internally calls Datomic's asynchronous API.

    conn

    Implicit Conn value in scope

    returns

    TxReport with info about the result of the save transaction.

  359. final lazy val sdf: SimpleDateFormat
    Attributes
    protected
    Definition Classes
    Helpers
  360. final def seq[T](values: Seq[T]): String
    Attributes
    protected
    Definition Classes
    Helpers
  361. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  362. final def time(n: Int, prev: Int = 0): Unit
    Attributes
    protected
    Definition Classes
    Helpers
  363. def toString(): String
    Definition Classes
    AnyRef → Any
  364. final def tupleToSeq(arg: Any): Seq[Any]
    Attributes
    protected
    Definition Classes
    Helpers
  365. def untupled(rawData: Iterable[Seq[Any]]): Seq[Seq[Any]]
    Attributes
    protected
  366. def update(implicit conn: Conn): TxReport

    Update entity with data applied to molecule attributes.

    Update entity with data applied to molecule attributes.

    Returns TxReport with info about the result of the update transaction.

    // Current data
    val ben = Person.name("Ben").age(42).save.eid
    
    // Update entity of of Ben with new age value
    Person(ben).age(43).update
    
    // Ben is now 43
    Person.name.age.get === List(("ben", 43))

    The update operation is synchronous and blocking. Use updateAsync for non-blocking asynchronous updates.

    conn

    Implicit Conn value in scope

    returns

    TxReport

  367. def updateAsync(implicit conn: Conn, ec: ExecutionContext): Future[TxReport]

    Asynchronously update entity with data applied to molecule attributes.

    Asynchronously update entity with data applied to molecule attributes. Returns Future with TxReport having info about the result of the update transaction.

    for {
      saveTx <- Person.name("Ben").age(42).saveAsync
      benId = saveTx.eid
      updateTx <- Person(benId).age(43).updateAsync
      result <- Person.name.age.getAsync
    } yield {
      // Ben is now 43
      result.head === ("ben", 43)
    }

    The update operation is asynchronous and non-blocking. Internally calls Datomic's asynchronous API.

    conn

    Implicit Conn value in scope

    returns

    TxReport

  368. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  369. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  370. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  371. object mkDate
    Attributes
    protected
    Definition Classes
    Helpers

Inherited from ShowDebug[Tpl]

Inherited from GetAsyncJson

Inherited from GetAsyncRaw

Inherited from GetAsyncList[Tpl]

Inherited from GetAsyncIterable[Tpl]

Inherited from GetAsyncArray[Tpl]

Inherited from GetJson

Inherited from GetRaw

Inherited from GetList[Tpl]

Inherited from GetIterable[Tpl]

Inherited from GetArray[Tpl]

Inherited from JsonBuilder

Inherited from CastHelpers[Tpl]

Inherited from Helpers

Inherited from MoleculeBase

Inherited from AnyRef

Inherited from Any

get

getAsync

getAsOf

getAsyncAsOf

getArrayAsOf

getAsyncArrayAsOf

getIterableAsOf

getAsyncIterableAsOf

getJsonAsOf

getAsyncJsonAsOf

getRawAsOf

getAsyncRawAsOf

getSince

getAsyncSince

getArraySince

getAsyncArraySince

getIterableSince

getAsyncIterableSince

getJsonSince

getAsyncJsonSince

getRawSince

getAsyncRawSince

getWith

getAsyncWith

getArrayWith

getAsyncArrayWith

getIterableWith

getAsyncIterableWith

getJsonWith

getAsyncJsonWith

getRawWith

getAsyncRawWith

getHistory

(only implemented to return List of tuples)

save

insert

update

getTx

Debug get

Molecule getter debugging methods.

Debug operation

Molecule operation debugging methods (no effect on live db).

Internal (but public) model/query representations

Ungrouped