Packages

  • package root

    Documentation/API for the Molecule library - a meta DSL for the Datomic database.

    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.

    Definition Classes
    root
  • package core
    Definition Classes
    molecule
  • package api
    Definition Classes
    core
  • package exception
    Definition Classes
    api
  • package getAsyncObj

    Asynchronous getter methods to retrieve data as objects.

    Asynchronous getter methods to retrieve data as objects.

    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 4 groups of asynchronous getters for objects, each returning Futures of data in various formats:

    • GetAsyncObjArray - fastest retrieved typed data set. Can be traversed with a fast while loop
    • GetAsyncObjIterable - for lazily traversing row by row
    • GetAsyncObjList - default getter returning Lists of objects. Convenient typed data, suitable for smaller data sets
    • GetAsyncRaw - fastest retrieved raw un-typed data from Datomic

    Getters in each of the 4 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 getTpl package.

  • package getAsyncTpl

    Asynchronous getter methods to retrieve tuples of data.

    Asynchronous getter methods to retrieve tuples of data.

    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 4 groups of asynchronous getters for tuples, each returning Futures of data in various formats:

    • GetAsyncTplArray - fastest retrieved typed data set. Can be traversed with a fast while loop
    • GetAsyncTplIterable - for lazily traversing row by row
    • GetAsyncTplList - 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 4 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 getTpl package.

  • package getObj

    Synchronous getter methods to retrieve data as objects.

    Synchronous getter methods to retrieve data as objects.

    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 3 groups of synchronous object getters, each returning data in various formats:

    • GetObjArray - fastest retrieved typed data set. Can be traversed with a fast while loop
    • GetObjIterable - for lazily traversing row by row
    • GetObjList - default getter returning Lists of objects. Convenient typed data, suitable for smaller data sets

    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 getAsyncTpl package.

  • package getTpl

    Synchronous getter methods to retrieve data as tuples.

    Synchronous getter methods to retrieve data as tuples.

    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.

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

    • GetTplArray - fastest retrieved typed data set. Can be traversed with a fast while loop
    • GetTplIterable - for lazily traversing row by row
    • GetTplList - 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 4 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 getAsyncTpl package.

  • GetAsyncRaw
  • GetRaw
  • InputMolecule
  • Keywords
  • Molecule_0
  • Molecule_1
  • Molecule_2
  • Molecule_3
  • OptionalMapOps
  • TxBundles
  • TxFunctions

trait Molecule_0[Obj, Tpl] extends Molecule with CastHelpers[Obj, Tpl] with GetTplArray[Obj, Tpl] with GetTplIterable[Obj, Tpl] with GetTplList[Obj, Tpl] with GetRaw with GetObjArray[Obj, Tpl] with GetObjIterable[Obj, Tpl] with GetObjList[Obj, Tpl] with GetAsyncTplArray[Obj, Tpl] with GetAsyncTplIterable[Obj, Tpl] with GetAsyncTplList[Obj, Tpl] with GetAsyncObjArray[Obj, Tpl] with GetAsyncObjIterable[Obj, Tpl] with GetAsyncObjList[Obj, Tpl] with GetAsyncRaw with ShowInspect[Obj, 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`).
inspect get Inspect calling get method on molecule.
inspect operation     Inspect calling save/insert/update method on molecule.

Tpl

Type of molecule (tuple of its attribute types)

Source
Molecule_0.scala
See also

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

Linear Supertypes
ShowInspect[Obj, Tpl], GetAsyncRaw, GetAsyncObjList[Obj, Tpl], GetAsyncObjIterable[Obj, Tpl], GetAsyncObjArray[Obj, Tpl], GetAsyncTplList[Obj, Tpl], GetAsyncTplIterable[Obj, Tpl], GetAsyncTplArray[Obj, Tpl], GetObjList[Obj, Tpl], GetObjIterable[Obj, Tpl], GetObjArray[Obj, Tpl], GetRaw, GetTplList[Obj, Tpl], Quoted, GetTplIterable[Obj, Tpl], GetTplArray[Obj, Tpl], JavaUtil, CastHelpers[Obj, Tpl], CastHelpersAggr, CastHelpersOptNested, Helpers, DateHandling, RegexMatching, Molecule, AnyRef, Any
Ordering
  1. Grouped
  2. Alphabetic
  3. By Inheritance
Inherited
  1. Molecule_0
  2. ShowInspect
  3. GetAsyncRaw
  4. GetAsyncObjList
  5. GetAsyncObjIterable
  6. GetAsyncObjArray
  7. GetAsyncTplList
  8. GetAsyncTplIterable
  9. GetAsyncTplArray
  10. GetObjList
  11. GetObjIterable
  12. GetObjArray
  13. GetRaw
  14. GetTplList
  15. Quoted
  16. GetTplIterable
  17. GetTplArray
  18. JavaUtil
  19. CastHelpers
  20. CastHelpersAggr
  21. CastHelpersOptNested
  22. Helpers
  23. DateHandling
  24. RegexMatching
  25. Molecule
  26. AnyRef
  27. 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 getInsertStmts 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

  3. 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.

  4. 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.

  5. trait inspectInsert extends AnyRef

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

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

    Prints internal molecule transformation representations to output:

    Model --> Generic statements --> Datomic statements

  6. implicit class raw2list extends AnyRef
    Definition Classes
    JavaUtil
  7. implicit class Regex extends AnyRef
    Definition Classes
    RegexMatching

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
    Molecule
  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
    Molecule
  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
    Molecule
  4. abstract val _rawNestedQuery: Option[Query]

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

    Internal un-optimized 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
    Molecule
  5. abstract val _rawQuery: Query

    Internal un-optimized Query representation molecule.

    Internal un-optimized Query representation molecule.

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

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

    Definition Classes
    Molecule

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 _getInsertStmts(conn: Conn, dataRows: Iterable[Seq[Any]]): Seq[Seq[Statement]]
    Attributes
    protected
  5. def _insert(conn: Conn, model: Model, dataRows: Iterable[Seq[Any]]): TxReport
    Attributes
    protected
  6. def _insertAsync(conn: Conn, model: Model, dataRows: Iterable[Seq[Any]])(implicit ec: ExecutionContext): Future[TxReport]
    Attributes
    protected
  7. def _inspectInsert(conn: Conn, dataRows: Iterable[Seq[Any]]): Unit
    Attributes
    protected
    Definition Classes
    ShowInspect
  8. macro def apply(body: (Obj) ⇒ Unit): DynamicMolecule with Obj
  9. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  10. def cast(value: Any): String
    Attributes
    protected
    Definition Classes
    Helpers
  11. def castAggrManyList[T](row: List[_], i: Int): List[Set[T]]
    Attributes
    protected
    Definition Classes
    CastHelpersAggr
  12. def castAggrManyListBigDecimal(row: List[_], i: Int): List[Set[BigDecimal]]
    Attributes
    protected
    Definition Classes
    CastHelpersAggr
  13. def castAggrManyListBigInt(row: List[_], i: Int): List[Set[BigInt]]
    Attributes
    protected
    Definition Classes
    CastHelpersAggr
  14. def castAggrManyListDistinct[T](row: List[_], i: Int): List[Set[T]]
    Attributes
    protected
    Definition Classes
    CastHelpersAggr
  15. def castAggrManyListDistinctBigDecimal(row: List[_], i: Int): List[Set[BigDecimal]]
    Attributes
    protected
    Definition Classes
    CastHelpersAggr
  16. def castAggrManyListDistinctBigInt(row: List[_], i: Int): List[Set[BigInt]]
    Attributes
    protected
    Definition Classes
    CastHelpersAggr
  17. def castAggrManyListDistinctFloat(row: List[_], i: Int): List[Set[Float]]
    Attributes
    protected
    Definition Classes
    CastHelpersAggr
  18. def castAggrManyListDistinctInt(row: List[_], i: Int): List[Set[Int]]
    Attributes
    protected
    Definition Classes
    CastHelpersAggr
  19. def castAggrManyListDistinctURI(row: List[_], i: Int): List[Set[URI]]
    Attributes
    protected
    Definition Classes
    CastHelpersAggr
  20. def castAggrManyListFloat(row: List[_], i: Int): List[Set[Float]]
    Attributes
    protected
    Definition Classes
    CastHelpersAggr
  21. def castAggrManyListInt(row: List[_], i: Int): List[Set[Int]]
    Attributes
    protected
    Definition Classes
    CastHelpersAggr
  22. def castAggrManyListRand[T](row: List[_], i: Int): List[Set[T]]
    Attributes
    protected
    Definition Classes
    CastHelpersAggr
  23. def castAggrManyListRandBigDecimal(row: List[_], i: Int): List[Set[BigDecimal]]
    Attributes
    protected
    Definition Classes
    CastHelpersAggr
  24. def castAggrManyListRandBigInt(row: List[_], i: Int): List[Set[BigInt]]
    Attributes
    protected
    Definition Classes
    CastHelpersAggr
  25. def castAggrManyListRandFloat(row: List[_], i: Int): List[Set[Float]]
    Attributes
    protected
    Definition Classes
    CastHelpersAggr
  26. def castAggrManyListRandInt(row: List[_], i: Int): List[Set[Int]]
    Attributes
    protected
    Definition Classes
    CastHelpersAggr
  27. def castAggrManyListRandURI(row: List[_], i: Int): List[Set[URI]]
    Attributes
    protected
    Definition Classes
    CastHelpersAggr
  28. def castAggrManyListURI(row: List[_], i: Int): List[Set[URI]]
    Attributes
    protected
    Definition Classes
    CastHelpersAggr
  29. def castAggrManySingle[T](row: List[_], i: Int): Set[T]
    Attributes
    protected
    Definition Classes
    CastHelpersAggr
  30. def castAggrManySingleBigDecimal(row: List[_], i: Int): Set[BigDecimal]
    Attributes
    protected
    Definition Classes
    CastHelpersAggr
  31. def castAggrManySingleBigInt(row: List[_], i: Int): Set[BigInt]
    Attributes
    protected
    Definition Classes
    CastHelpersAggr
  32. def castAggrManySingleFloat(row: List[_], i: Int): Set[Float]
    Attributes
    protected
    Definition Classes
    CastHelpersAggr
  33. def castAggrManySingleInt(row: List[_], i: Int): Set[Int]
    Attributes
    protected
    Definition Classes
    CastHelpersAggr
  34. def castAggrManySingleURI(row: List[_], i: Int): Set[URI]
    Attributes
    protected
    Definition Classes
    CastHelpersAggr
  35. def castAggrOneList[T](row: List[_], i: Int): List[T]
    Attributes
    protected
    Definition Classes
    CastHelpersAggr
  36. def castAggrOneListBigDecimal(row: List[_], i: Int): List[BigDecimal]
    Attributes
    protected
    Definition Classes
    CastHelpersAggr
  37. def castAggrOneListBigInt(row: List[_], i: Int): List[BigInt]
    Attributes
    protected
    Definition Classes
    CastHelpersAggr
  38. def castAggrOneListDistinct[T](row: List[_], i: Int): List[T]
    Attributes
    protected
    Definition Classes
    CastHelpersAggr
  39. def castAggrOneListDistinctBigDecimal(row: List[_], i: Int): List[BigDecimal]
    Attributes
    protected
    Definition Classes
    CastHelpersAggr
  40. def castAggrOneListDistinctBigInt(row: List[_], i: Int): List[BigInt]
    Attributes
    protected
    Definition Classes
    CastHelpersAggr
  41. def castAggrOneListDistinctFloat(row: List[_], i: Int): List[Float]
    Attributes
    protected
    Definition Classes
    CastHelpersAggr
  42. def castAggrOneListDistinctInt(row: List[_], i: Int): List[Int]
    Attributes
    protected
    Definition Classes
    CastHelpersAggr
  43. def castAggrOneListDistinctURI(row: List[_], i: Int): List[URI]
    Attributes
    protected
    Definition Classes
    CastHelpersAggr
  44. def castAggrOneListFloat(row: List[_], i: Int): List[Float]
    Attributes
    protected
    Definition Classes
    CastHelpersAggr
  45. def castAggrOneListInt(row: List[_], i: Int): List[Int]
    Attributes
    protected
    Definition Classes
    CastHelpersAggr
  46. def castAggrOneListRand[T](row: List[_], i: Int): List[T]
    Attributes
    protected
    Definition Classes
    CastHelpersAggr
  47. def castAggrOneListRandBigDecimal(row: List[_], i: Int): List[BigDecimal]
    Attributes
    protected
    Definition Classes
    CastHelpersAggr
  48. def castAggrOneListRandBigInt(row: List[_], i: Int): List[BigInt]
    Attributes
    protected
    Definition Classes
    CastHelpersAggr
  49. def castAggrOneListRandFloat(row: List[_], i: Int): List[Float]
    Attributes
    protected
    Definition Classes
    CastHelpersAggr
  50. def castAggrOneListRandInt(row: List[_], i: Int): List[Int]
    Attributes
    protected
    Definition Classes
    CastHelpersAggr
  51. def castAggrOneListRandURI(row: List[_], i: Int): List[URI]
    Attributes
    protected
    Definition Classes
    CastHelpersAggr
  52. def castAggrOneListURI(row: List[_], i: Int): List[URI]
    Attributes
    protected
    Definition Classes
    CastHelpersAggr
  53. def castAggrSingleSample[T](row: List[_], i: Int): T
    Attributes
    protected
    Definition Classes
    CastHelpersAggr
  54. def castAggrSingleSampleBigDecimal(row: List[_], i: Int): BigDecimal
    Attributes
    protected
    Definition Classes
    CastHelpersAggr
  55. def castAggrSingleSampleBigInt(row: List[_], i: Int): BigInt
    Attributes
    protected
    Definition Classes
    CastHelpersAggr
  56. def castAggrSingleSampleFloat(row: List[_], i: Int): Float
    Attributes
    protected
    Definition Classes
    CastHelpersAggr
  57. def castAggrSingleSampleInt(row: List[_], i: Int): Int
    Attributes
    protected
    Definition Classes
    CastHelpersAggr
  58. def castAggrSingleSampleURI(row: List[_], i: Int): URI
    Attributes
    protected
    Definition Classes
    CastHelpersAggr
  59. def castMany[T](row: List[_], i: Int): Set[T]
    Attributes
    protected
    Definition Classes
    CastHelpers
  60. def castManyBigDecimal(row: List[_], i: Int): Set[BigDecimal]
    Attributes
    protected
    Definition Classes
    CastHelpers
  61. def castManyBigInt(row: List[_], i: Int): Set[BigInt]
    Attributes
    protected
    Definition Classes
    CastHelpers
  62. def castManyEnum(row: List[_], i: Int): Set[String]
    Attributes
    protected
    Definition Classes
    CastHelpers
  63. def castManyFloat(row: List[_], i: Int): Set[Float]
    Attributes
    protected
    Definition Classes
    CastHelpers
  64. def castManyInt(row: List[_], i: Int): Set[Int]
    Attributes
    protected
    Definition Classes
    CastHelpers
  65. def castManyURI(row: List[_], i: Int): Set[URI]
    Attributes
    protected
    Definition Classes
    CastHelpers
  66. def castMapBigDecimal(row: List[_], i: Int): Map[String, BigDecimal]
    Attributes
    protected
    Definition Classes
    CastHelpers
  67. def castMapBigInt(row: List[_], i: Int): Map[String, BigInt]
    Attributes
    protected
    Definition Classes
    CastHelpers
  68. def castMapBoolean(row: List[_], i: Int): Map[String, Boolean]
    Attributes
    protected
    Definition Classes
    CastHelpers
  69. def castMapDate(row: List[_], i: Int): Map[String, Date]
    Attributes
    protected
    Definition Classes
    CastHelpers
  70. def castMapDouble(row: List[_], i: Int): Map[String, Double]
    Attributes
    protected
    Definition Classes
    CastHelpers
  71. def castMapFloat(row: List[_], i: Int): Map[String, Float]
    Attributes
    protected
    Definition Classes
    CastHelpers
  72. def castMapInt(row: List[_], i: Int): Map[String, Int]
    Attributes
    protected
    Definition Classes
    CastHelpers
  73. def castMapLong(row: List[_], i: Int): Map[String, Long]
    Attributes
    protected
    Definition Classes
    CastHelpers
  74. def castMapString(row: List[_], i: Int): Map[String, String]
    Attributes
    protected
    Definition Classes
    CastHelpers
  75. def castMapURI(row: List[_], i: Int): Map[String, URI]
    Attributes
    protected
    Definition Classes
    CastHelpers
  76. def castMapUUID(row: List[_], i: Int): Map[String, UUID]
    Attributes
    protected
    Definition Classes
    CastHelpers
  77. def castOne[T](row: List[_], i: Int): T
    Attributes
    protected
    Definition Classes
    CastHelpers
  78. def castOneBigDecimal(row: List[_], i: Int): BigDecimal
    Attributes
    protected
    Definition Classes
    CastHelpers
  79. def castOneBigInt(row: List[_], i: Int): BigInt
    Attributes
    protected
    Definition Classes
    CastHelpers
  80. def castOneFloat(row: List[_], i: Int): Float
    Attributes
    protected
    Definition Classes
    CastHelpers
  81. def castOneInt(row: List[_], i: Int): Int
    Attributes
    protected
    Definition Classes
    CastHelpers
  82. def castOneInt2(row: List[_], i: Int): Int
    Attributes
    protected
    Definition Classes
    CastHelpers
  83. def castOneURI(row: List[_], i: Int): URI
    Attributes
    protected
    Definition Classes
    CastHelpers
  84. def castOptMany[T](row: List[_], i: Int): Option[Set[T]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  85. def castOptManyApply[T](row: List[_], i: Int): Option[Set[T]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  86. def castOptManyApplyBigDecimal(row: List[_], i: Int): Option[Set[BigDecimal]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  87. def castOptManyApplyBigInt(row: List[_], i: Int): Option[Set[BigInt]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  88. def castOptManyApplyDouble(row: List[_], i: Int): Option[Set[Double]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  89. def castOptManyApplyFloat(row: List[_], i: Int): Option[Set[Float]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  90. def castOptManyApplyInt(row: List[_], i: Int): Option[Set[Int]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  91. def castOptManyApplyLong(row: List[_], i: Int): Option[Set[Long]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  92. def castOptManyApplyURI(row: List[_], i: Int): Option[Set[URI]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  93. def castOptManyBigDecimal(row: List[_], i: Int): Option[Set[BigDecimal]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  94. def castOptManyBigInt(row: List[_], i: Int): Option[Set[BigInt]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  95. def castOptManyDouble(row: List[_], i: Int): Option[Set[Double]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  96. def castOptManyEnum(row: List[_], i: Int): Option[Set[String]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  97. def castOptManyFloat(row: List[_], i: Int): Option[Set[Float]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  98. def castOptManyInt(row: List[_], i: Int): Option[Set[Int]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  99. def castOptManyLong(row: List[_], i: Int): Option[Set[Long]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  100. def castOptManyRefAttr(row: List[_], i: Int): Option[Set[Long]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  101. def castOptManyURI(row: List[_], i: Int): Option[Set[URI]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  102. def castOptMapApplyBigDecimal(row: List[_], i: Int): Option[Map[String, BigDecimal]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  103. def castOptMapApplyBigInt(row: List[_], i: Int): Option[Map[String, BigInt]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  104. def castOptMapApplyBoolean(row: List[_], i: Int): Option[Map[String, Boolean]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  105. def castOptMapApplyDate(row: List[_], i: Int): Option[Map[String, Date]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  106. def castOptMapApplyDouble(row: List[_], i: Int): Option[Map[String, Double]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  107. def castOptMapApplyFloat(row: List[_], i: Int): Option[Map[String, Float]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  108. def castOptMapApplyInt(row: List[_], i: Int): Option[Map[String, Int]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  109. def castOptMapApplyLong(row: List[_], i: Int): Option[Map[String, Long]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  110. def castOptMapApplyString(row: List[_], i: Int): Option[Map[String, String]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  111. def castOptMapApplyURI(row: List[_], i: Int): Option[Map[String, URI]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  112. def castOptMapApplyUUID(row: List[_], i: Int): Option[Map[String, UUID]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  113. def castOptMapBigDecimal(row: List[_], i: Int): Option[Map[String, BigDecimal]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  114. def castOptMapBigInt(row: List[_], i: Int): Option[Map[String, BigInt]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  115. def castOptMapBoolean(row: List[_], i: Int): Option[Map[String, Boolean]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  116. def castOptMapDate(row: List[_], i: Int): Option[Map[String, Date]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  117. def castOptMapDouble(row: List[_], i: Int): Option[Map[String, Double]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  118. def castOptMapFloat(row: List[_], i: Int): Option[Map[String, Float]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  119. def castOptMapInt(row: List[_], i: Int): Option[Map[String, Int]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  120. def castOptMapLong(row: List[_], i: Int): Option[Map[String, Long]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  121. def castOptMapString(row: List[_], i: Int): Option[Map[String, String]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  122. def castOptMapURI(row: List[_], i: Int): Option[Map[String, URI]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  123. def castOptMapUUID(row: List[_], i: Int): Option[Map[String, UUID]]
    Attributes
    protected
    Definition Classes
    CastHelpers
  124. def castOptNestedMany[T](it: Iterator[_]): Set[T]
    Attributes
    protected
    Definition Classes
    CastHelpersOptNested
  125. def castOptNestedManyBigDecimal(it: Iterator[_]): Set[BigDecimal]
    Attributes
    protected
    Definition Classes
    CastHelpersOptNested
  126. def castOptNestedManyBigInt(it: Iterator[_]): Set[BigInt]
    Attributes
    protected
    Definition Classes
    CastHelpersOptNested
  127. def castOptNestedManyEnum(it: Iterator[_]): Set[String]
    Attributes
    protected
    Definition Classes
    CastHelpersOptNested
  128. def castOptNestedManyFloat(it: Iterator[_]): Set[Float]
    Attributes
    protected
    Definition Classes
    CastHelpersOptNested
  129. def castOptNestedManyInt(it: Iterator[_]): Set[Int]
    Attributes
    protected
    Definition Classes
    CastHelpersOptNested
  130. def castOptNestedManyRefAttr(it: Iterator[_]): Set[Long]
    Attributes
    protected
    Definition Classes
    CastHelpersOptNested
  131. def castOptNestedMapBigDecimal(it: Iterator[_]): Map[String, BigDecimal]
    Attributes
    protected
    Definition Classes
    CastHelpersOptNested
  132. def castOptNestedMapBigInt(it: Iterator[_]): Map[String, BigInt]
    Attributes
    protected
    Definition Classes
    CastHelpersOptNested
  133. def castOptNestedMapBoolean(it: Iterator[_]): Map[String, Boolean]
    Attributes
    protected
    Definition Classes
    CastHelpersOptNested
  134. def castOptNestedMapDate(it: Iterator[_]): Map[String, Date]
    Attributes
    protected
    Definition Classes
    CastHelpersOptNested
  135. def castOptNestedMapDouble(it: Iterator[_]): Map[String, Double]
    Attributes
    protected
    Definition Classes
    CastHelpersOptNested
  136. def castOptNestedMapFloat(it: Iterator[_]): Map[String, Float]
    Attributes
    protected
    Definition Classes
    CastHelpersOptNested
  137. def castOptNestedMapInt(it: Iterator[_]): Map[String, Int]
    Attributes
    protected
    Definition Classes
    CastHelpersOptNested
  138. def castOptNestedMapLong(it: Iterator[_]): Map[String, Long]
    Attributes
    protected
    Definition Classes
    CastHelpersOptNested
  139. def castOptNestedMapString(it: Iterator[_]): Map[String, String]
    Attributes
    protected
    Definition Classes
    CastHelpersOptNested
  140. def castOptNestedMapURI(it: Iterator[_]): Map[String, URI]
    Attributes
    protected
    Definition Classes
    CastHelpersOptNested
  141. def castOptNestedMapUUID(it: Iterator[_]): Map[String, UUID]
    Attributes
    protected
    Definition Classes
    CastHelpersOptNested
  142. def castOptNestedOne[T](it: Iterator[_]): T
    Attributes
    protected
    Definition Classes
    CastHelpersOptNested
  143. def castOptNestedOneBigDecimal(it: Iterator[_]): BigDecimal
    Attributes
    protected
    Definition Classes
    CastHelpersOptNested
  144. def castOptNestedOneBigInt(it: Iterator[_]): BigInt
    Attributes
    protected
    Definition Classes
    CastHelpersOptNested
  145. def castOptNestedOneEnum(it: Iterator[_]): String
    Attributes
    protected
    Definition Classes
    CastHelpersOptNested
  146. def castOptNestedOneFloat(it: Iterator[_]): Float
    Attributes
    protected
    Definition Classes
    CastHelpersOptNested
  147. def castOptNestedOneInt(it: Iterator[_]): Int
    Attributes
    protected
    Definition Classes
    CastHelpersOptNested
  148. def castOptNestedOneInt2(it: Iterator[_]): Int
    Attributes
    protected
    Definition Classes
    CastHelpersOptNested
  149. def castOptNestedOneRefAttr(it: Iterator[_]): Long
    Attributes
    protected
    Definition Classes
    CastHelpersOptNested
  150. def castOptNestedOptMany[T](it: Iterator[_]): Option[Set[T]]
    Attributes
    protected
    Definition Classes
    CastHelpersOptNested
  151. def castOptNestedOptManyBigDecimal(it: Iterator[_]): Option[Set[BigDecimal]]
    Attributes
    protected
    Definition Classes
    CastHelpersOptNested
  152. def castOptNestedOptManyBigInt(it: Iterator[_]): Option[Set[BigInt]]
    Attributes
    protected
    Definition Classes
    CastHelpersOptNested
  153. def castOptNestedOptManyDouble(it: Iterator[_]): Option[Set[Double]]
    Attributes
    protected
    Definition Classes
    CastHelpersOptNested
  154. def castOptNestedOptManyEnum(it: Iterator[_]): Option[Set[String]]
    Attributes
    protected
    Definition Classes
    CastHelpersOptNested
  155. def castOptNestedOptManyFloat(it: Iterator[_]): Option[Set[Float]]
    Attributes
    protected
    Definition Classes
    CastHelpersOptNested
  156. def castOptNestedOptManyInt(it: Iterator[_]): Option[Set[Int]]
    Attributes
    protected
    Definition Classes
    CastHelpersOptNested
  157. def castOptNestedOptManyLong(it: Iterator[_]): Option[Set[Long]]
    Attributes
    protected
    Definition Classes
    CastHelpersOptNested
  158. def castOptNestedOptManyRefAttr(it: Iterator[_]): Option[Set[Long]]
    Attributes
    protected
    Definition Classes
    CastHelpersOptNested
  159. def castOptNestedOptMapBigDecimal(it: Iterator[_]): Option[Map[String, BigDecimal]]
    Attributes
    protected
    Definition Classes
    CastHelpersOptNested
  160. def castOptNestedOptMapBigInt(it: Iterator[_]): Option[Map[String, BigInt]]
    Attributes
    protected
    Definition Classes
    CastHelpersOptNested
  161. def castOptNestedOptMapBoolean(it: Iterator[_]): Option[Map[String, Boolean]]
    Attributes
    protected
    Definition Classes
    CastHelpersOptNested
  162. def castOptNestedOptMapDate(it: Iterator[_]): Option[Map[String, Date]]
    Attributes
    protected
    Definition Classes
    CastHelpersOptNested
  163. def castOptNestedOptMapDouble(it: Iterator[_]): Option[Map[String, Double]]
    Attributes
    protected
    Definition Classes
    CastHelpersOptNested
  164. def castOptNestedOptMapFloat(it: Iterator[_]): Option[Map[String, Float]]
    Attributes
    protected
    Definition Classes
    CastHelpersOptNested
  165. def castOptNestedOptMapInt(it: Iterator[_]): Option[Map[String, Int]]
    Attributes
    protected
    Definition Classes
    CastHelpersOptNested
  166. def castOptNestedOptMapLong(it: Iterator[_]): Option[Map[String, Long]]
    Attributes
    protected
    Definition Classes
    CastHelpersOptNested
  167. def castOptNestedOptMapString(it: Iterator[_]): Option[Map[String, String]]
    Attributes
    protected
    Definition Classes
    CastHelpersOptNested
  168. def castOptNestedOptMapURI(it: Iterator[_]): Option[Map[String, URI]]
    Attributes
    protected
    Definition Classes
    CastHelpersOptNested
  169. def castOptNestedOptMapUUID(it: Iterator[_]): Option[Map[String, UUID]]
    Attributes
    protected
    Definition Classes
    CastHelpersOptNested
  170. def castOptNestedOptOne[T](it: Iterator[_]): Option[T]
    Attributes
    protected
    Definition Classes
    CastHelpersOptNested
  171. def castOptNestedOptOneBigDecimal(it: Iterator[_]): Option[BigDecimal]
    Attributes
    protected
    Definition Classes
    CastHelpersOptNested
  172. def castOptNestedOptOneBigInt(it: Iterator[_]): Option[BigInt]
    Attributes
    protected
    Definition Classes
    CastHelpersOptNested
  173. def castOptNestedOptOneDouble(it: Iterator[_]): Option[Double]
    Attributes
    protected
    Definition Classes
    CastHelpersOptNested
  174. def castOptNestedOptOneEnum(it: Iterator[_]): Option[String]
    Attributes
    protected
    Definition Classes
    CastHelpersOptNested
  175. def castOptNestedOptOneFloat(it: Iterator[_]): Option[Float]
    Attributes
    protected
    Definition Classes
    CastHelpersOptNested
  176. def castOptNestedOptOneInt(it: Iterator[_]): Option[Int]
    Attributes
    protected
    Definition Classes
    CastHelpersOptNested
  177. def castOptNestedOptOneLong(it: Iterator[_]): Option[Long]
    Attributes
    protected
    Definition Classes
    CastHelpersOptNested
  178. def castOptNestedOptOneRefAttr(it: Iterator[_]): Option[Long]
    Attributes
    protected
    Definition Classes
    CastHelpersOptNested
  179. def castOptOne[T](row: List[_], i: Int): Option[T]
    Attributes
    protected
    Definition Classes
    CastHelpers
  180. def castOptOneApply[T](row: List[_], i: Int): Option[T]
    Attributes
    protected
    Definition Classes
    CastHelpers
  181. def castOptOneApplyBigDecimal(row: List[_], i: Int): Option[BigDecimal]
    Attributes
    protected
    Definition Classes
    CastHelpers
  182. def castOptOneApplyBigInt(row: List[_], i: Int): Option[BigInt]
    Attributes
    protected
    Definition Classes
    CastHelpers
  183. def castOptOneApplyDouble(row: List[_], i: Int): Option[Double]
    Attributes
    protected
    Definition Classes
    CastHelpers
  184. def castOptOneApplyFloat(row: List[_], i: Int): Option[Float]
    Attributes
    protected
    Definition Classes
    CastHelpers
  185. def castOptOneApplyInt(row: List[_], i: Int): Option[Int]
    Attributes
    protected
    Definition Classes
    CastHelpers
  186. def castOptOneApplyLong(row: List[_], i: Int): Option[Long]
    Attributes
    protected
    Definition Classes
    CastHelpers
  187. def castOptOneApplyURI(row: List[_], i: Int): Option[URI]
    Attributes
    protected
    Definition Classes
    CastHelpers
  188. def castOptOneBigDecimal(row: List[_], i: Int): Option[BigDecimal]
    Attributes
    protected
    Definition Classes
    CastHelpers
  189. def castOptOneBigInt(row: List[_], i: Int): Option[BigInt]
    Attributes
    protected
    Definition Classes
    CastHelpers
  190. def castOptOneDouble(row: List[_], i: Int): Option[Double]
    Attributes
    protected
    Definition Classes
    CastHelpers
  191. def castOptOneEnum(row: List[_], i: Int): Option[String]
    Attributes
    protected
    Definition Classes
    CastHelpers
  192. def castOptOneFloat(row: List[_], i: Int): Option[Float]
    Attributes
    protected
    Definition Classes
    CastHelpers
  193. def castOptOneInt(row: List[_], i: Int): Option[Int]
    Attributes
    protected
    Definition Classes
    CastHelpers
  194. def castOptOneLong(row: List[_], i: Int): Option[Long]
    Attributes
    protected
    Definition Classes
    CastHelpers
  195. def castOptOneRefAttr(row: List[_], i: Int): Option[Long]
    Attributes
    protected
    Definition Classes
    CastHelpers
  196. def castOptOneURI(row: List[_], i: Int): Option[URI]
    Attributes
    protected
    Definition Classes
    CastHelpers
  197. def clean(attr: String): String
    Definition Classes
    Helpers
  198. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  199. def date2datomicStr(date: Date, zoneOffset: ZoneOffset = localZoneOffset): String
    Definition Classes
    DateHandling
  200. def date2str(date: Date, zoneOffset: ZoneOffset = localZoneOffset): String
    Definition Classes
    DateHandling
  201. def daylight(ms: Long): Int
    Definition Classes
    DateHandling
  202. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  203. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  204. def escStr(s: String): String
    Definition Classes
    Helpers
  205. def expandDateStr(dateStr: String): String
    Definition Classes
    DateHandling
  206. final def f(a: Any): Any
    Attributes
    protected
    Definition Classes
    Helpers
  207. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  208. def get(n: Int)(implicit conn: Conn): 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

    returns

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

    Definition Classes
    GetTplList
    See also

    Equivalent asynchronous getAsync method.

  209. def get(implicit conn: Conn): 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

    returns

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

    Definition Classes
    GetTplList
    See also

    Equivalent asynchronous getAsync method.

  210. def getArray(n: Int)(implicit conn: Conn, objType: ClassTag[Obj], 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. If -1, all rows are fetched.

    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
    GetTplArray
    See also

    Equivalent asynchronous getAsyncArray method.

  211. def getArray(implicit conn: Conn, objType: ClassTag[Obj], 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
    GetTplArray
    See also

    Equivalent asynchronous getAsyncArray method.

  212. def getArrayAsOf(date: Date, n: Int)(implicit conn: Conn, objType: ClassTag[Obj], 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
    GetTplArray
    See also

    Equivalent asynchronous getAsyncArrayAsOf method.

  213. def getArrayAsOf(date: Date)(implicit conn: Conn, objType: ClassTag[Obj], 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
    GetTplArray
    See also

    Equivalent asynchronous getAsyncArrayAsOf method.

  214. def getArrayAsOf(tx: TxReport, n: Int)(implicit conn: Conn, objType: ClassTag[Obj], 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
    GetTplArray
    See also

    Equivalent asynchronous getAsyncArrayAsOf method.

  215. def getArrayAsOf(tx: TxReport)(implicit conn: Conn, objType: ClassTag[Obj], 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
    GetTplArray
    See also

    Equivalent asynchronous getAsyncArrayAsOf method.

  216. def getArrayAsOf(t: Long, n: Int)(implicit conn: Conn, objType: ClassTag[Obj], 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
    GetTplArray
    See also

    Equivalent asynchronous getAsyncArrayAsOf method.

  217. def getArrayAsOf(t: Long)(implicit conn: Conn, objType: ClassTag[Obj], 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
    GetTplArray
    See also

    Equivalent asynchronous getAsyncArrayAsOf method.

  218. def getArraySince(date: Date, n: Int)(implicit conn: Conn, objType: ClassTag[Obj], 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
    GetTplArray
    See also

    Equivalent asynchronous getAsyncArraySince method.

  219. def getArraySince(date: Date)(implicit conn: Conn, objType: ClassTag[Obj], 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
    GetTplArray
    See also

    Equivalent asynchronous getAsyncArraySince method.

  220. def getArraySince(tx: TxReport, n: Int)(implicit conn: Conn, objType: ClassTag[Obj], 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
    GetTplArray
    See also

    Equivalent asynchronous getAsyncArraySince method.

  221. def getArraySince(tx: TxReport)(implicit conn: Conn, objType: ClassTag[Obj], 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
    GetTplArray
    See also

    Equivalent asynchronous getAsyncArraySince method.

  222. def getArraySince(t: Long, n: Int)(implicit conn: Conn, objType: ClassTag[Obj], 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 t1
    Person.name.getArraySince(t1) === Array("Ben", "Cay")
    
    // Ben and Cay added since transaction time t1 - 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
    GetTplArray
    See also

    Equivalent asynchronous getAsyncArraySince method.

  223. def getArraySince(t: Long)(implicit conn: Conn, objType: ClassTag[Obj], 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 t1
    Person.name.getArraySince(t1) === Array("Ben", "Cay")
    
    // Cay added since transaction time t2
    Person.name.getArraySince(t2) === Array("Cay")
    
    // Nothing added since transaction time t3
    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
    GetTplArray
    See also

    Equivalent asynchronous getAsyncArraySince method.

  224. def getArrayWith(txData: List[_], n: Int)(implicit conn: Conn, objType: ClassTag[Obj], 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
    GetTplArray
    See also

    Equivalent asynchronous getAsyncArrayWith method.

  225. def getArrayWith(txData: List[_])(implicit conn: Conn, objType: ClassTag[Obj], 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
    GetTplArray
    See also

    Equivalent asynchronous getAsyncArrayWith method.

  226. def getArrayWith(n: Int, txMolecules: Seq[Seq[Statement]]*)(implicit conn: Conn, objType: ClassTag[Obj], 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(
      // Additional transaction data
      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
    GetTplArray
    Note

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

    See also

    Equivalent asynchronous getAsyncArrayWith method.

  227. def getArrayWith(txMolecules: Seq[Seq[Statement]]*)(implicit conn: Conn, objType: ClassTag[Obj], 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
    
    // Test adding transaction data
    Person.name.likes.getArrayWith(
      // Additional 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
    GetTplArray
    See also

    Equivalent asynchronous getAsyncArrayWith method.

  228. def getAsOf(date: Date, n: Int)(implicit conn: Conn): 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

    returns

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

    Definition Classes
    GetTplList
    See also

    Equivalent asynchronous getAsyncAsOf method.

  229. def getAsOf(date: Date)(implicit conn: Conn): 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

    returns

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

    Definition Classes
    GetTplList
    See also

    Equivalent asynchronous getAsyncAsOf method.

  230. def getAsOf(tx: TxReport, n: Int)(implicit conn: Conn): 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
    
    
    // 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

    returns

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

    Definition Classes
    GetTplList
    See also

    Equivalent asynchronous getAsyncAsOf method.

  231. def getAsOf(tx: TxReport)(implicit conn: Conn): 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

    returns

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

    Definition Classes
    GetTplList
    See also

    Equivalent asynchronous getAsyncAsOf method.

  232. def getAsOf(t: Long, n: Int)(implicit conn: Conn): 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

    returns

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

    Definition Classes
    GetTplList
    See also

    Equivalent asynchronous getAsyncAsOf method.

  233. def getAsOf(t: Long)(implicit conn: Conn): 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

    returns

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

    Definition Classes
    GetTplList
    See also

    Equivalent asynchronous getAsyncAsOf method.

  234. def getAsync(n: Int)(implicit conn: Conn): 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

    returns

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

    Definition Classes
    GetAsyncTplList
  235. def getAsync(implicit conn: Conn): 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

    returns

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

    Definition Classes
    GetAsyncTplList
  236. def getAsyncArray(n: Int)(implicit conn: Conn, objType: ClassTag[Obj], 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
    GetAsyncTplArray
  237. def getAsyncArray(implicit conn: Conn, objType: ClassTag[Obj], 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
    GetAsyncTplArray
  238. def getAsyncArrayAsOf(date: Date, n: Int)(implicit conn: Conn, objType: ClassTag[Obj], 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

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

    Definition Classes
    GetAsyncTplArray
  239. def getAsyncArrayAsOf(date: Date)(implicit conn: Conn, objType: ClassTag[Obj], 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

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

    Definition Classes
    GetAsyncTplArray
  240. def getAsyncArrayAsOf(tx: TxReport, n: Int)(implicit conn: Conn, objType: ClassTag[Obj], 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

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

    Definition Classes
    GetAsyncTplArray
  241. def getAsyncArrayAsOf(tx: TxReport)(implicit conn: Conn, objType: ClassTag[Obj], 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

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

    Definition Classes
    GetAsyncTplArray
  242. def getAsyncArrayAsOf(t: Long, n: Int)(implicit conn: Conn, objType: ClassTag[Obj], 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

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

    Definition Classes
    GetAsyncTplArray
  243. def getAsyncArrayAsOf(t: Long)(implicit conn: Conn, objType: ClassTag[Obj], 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

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

    Definition Classes
    GetAsyncTplArray
  244. def getAsyncArraySince(date: Date, n: Int)(implicit conn: Conn, objType: ClassTag[Obj], 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

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

    Definition Classes
    GetAsyncTplArray
  245. def getAsyncArraySince(date: Date)(implicit conn: Conn, objType: ClassTag[Obj], 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

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

    Definition Classes
    GetAsyncTplArray
  246. def getAsyncArraySince(tx: TxReport, n: Int)(implicit conn: Conn, objType: ClassTag[Obj], 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

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

    Definition Classes
    GetAsyncTplArray
  247. def getAsyncArraySince(tx: TxReport)(implicit conn: Conn, objType: ClassTag[Obj], 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

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

    Definition Classes
    GetAsyncTplArray
  248. def getAsyncArraySince(t: Long, n: Int)(implicit conn: Conn, objType: ClassTag[Obj], 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

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

    Definition Classes
    GetAsyncTplArray
  249. def getAsyncArraySince(t: Long)(implicit conn: Conn, objType: ClassTag[Obj], 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

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

    Definition Classes
    GetAsyncTplArray
  250. def getAsyncArrayWith(txData: List[_], n: Int)(implicit conn: Conn, objType: ClassTag[Obj], 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

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

    Definition Classes
    GetAsyncTplArray
  251. def getAsyncArrayWith(txData: List[_])(implicit conn: Conn, objType: ClassTag[Obj], 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

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

    Definition Classes
    GetAsyncTplArray
  252. def getAsyncArrayWith(n: Int, txMolecules: Seq[Seq[Statement]]*)(implicit conn: Conn, objType: ClassTag[Obj], 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

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

    Definition Classes
    GetAsyncTplArray
    Note

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

  253. def getAsyncArrayWith(txMolecules: Seq[Seq[Statement]]*)(implicit conn: Conn, objType: ClassTag[Obj], 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

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

    Definition Classes
    GetAsyncTplArray
  254. def getAsyncAsOf(date: Date, n: Int)(implicit conn: Conn): 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

    returns

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

    Definition Classes
    GetAsyncTplList
  255. def getAsyncAsOf(date: Date)(implicit conn: Conn): 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

    returns

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

    Definition Classes
    GetAsyncTplList
  256. def getAsyncAsOf(tx: TxReport, n: Int)(implicit conn: Conn): 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

    returns

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

    Definition Classes
    GetAsyncTplList
  257. def getAsyncAsOf(tx: TxReport)(implicit conn: Conn): 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

    returns

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

    Definition Classes
    GetAsyncTplList
  258. def getAsyncAsOf(t: Long, n: Int)(implicit conn: Conn): 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

    returns

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

    Definition Classes
    GetAsyncTplList
  259. def getAsyncAsOf(t: Long)(implicit conn: Conn): 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

    returns

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

    Definition Classes
    GetAsyncTplList
  260. def getAsyncHistory(implicit conn: Conn): 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
    GetAsyncTplList
  261. def getAsyncIterable(implicit conn: Conn): 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

    returns

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

    Definition Classes
    GetAsyncTplIterable
  262. def getAsyncIterableAsOf(date: Date)(implicit conn: Conn): 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

    returns

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

    Definition Classes
    GetAsyncTplIterable
  263. def getAsyncIterableAsOf(tx: TxReport)(implicit conn: Conn): 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

    returns

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

    Definition Classes
    GetAsyncTplIterable
  264. def getAsyncIterableAsOf(t: Long)(implicit conn: Conn): 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

    returns

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

    Definition Classes
    GetAsyncTplIterable
  265. def getAsyncIterableSince(date: Date)(implicit conn: Conn): 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

    returns

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

    Definition Classes
    GetAsyncTplIterable
  266. def getAsyncIterableSince(tx: TxReport)(implicit conn: Conn): 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

    returns

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

    Definition Classes
    GetAsyncTplIterable
  267. def getAsyncIterableSince(t: Long)(implicit conn: Conn): 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

    returns

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

    Definition Classes
    GetAsyncTplIterable
  268. def getAsyncIterableWith(txData: List[_])(implicit conn: Conn): 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

    returns

    Iterable of molecule data

    Definition Classes
    GetAsyncTplIterable
  269. def getAsyncIterableWith(txMolecules: Seq[Seq[Statement]]*)(implicit conn: Conn): 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

    returns

    Iterable of molecule data

    Definition Classes
    GetAsyncTplIterable
  270. def getAsyncObjArray(n: Int)(implicit conn: Conn, objType: ClassTag[Obj], tplType: ClassTag[Tpl]): Future[Array[Obj]]

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

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

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

    n

    Number of rows

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Obj] to capture the object type for Array

    returns

    Future[Array[Obj]] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetAsyncObjArray
  271. def getAsyncObjArray(implicit conn: Conn, objType: ClassTag[Obj], tplType: ClassTag[Tpl]): Future[Array[Obj]]

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

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

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

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Obj] to capture the object type for Array

    returns

    Future[Array[Obj]] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetAsyncObjArray
  272. def getAsyncObjArrayAsOf(date: Date, n: Int)(implicit conn: Conn, objType: ClassTag[Obj], tplType: ClassTag[Tpl]): Future[Array[Obj]]

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

    Get Future with Array of n rows as objects 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 getObjArrayAsOf 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 objects.

    date

    java.util.Date

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Obj] to capture the object type for Array

    returns

    Future[Array[Obj]] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetAsyncObjArray
  273. def getAsyncObjArrayAsOf(date: Date)(implicit conn: Conn, objType: ClassTag[Obj], tplType: ClassTag[Tpl]): Future[Array[Obj]]

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

    Get Future with Array of all rows as objects 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 getObjArrayAsOf 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[Obj] to capture the object type for Array

    returns

    Future[Array[Obj]] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetAsyncObjArray
  274. def getAsyncObjArrayAsOf(tx: TxReport, n: Int)(implicit conn: Conn, objType: ClassTag[Obj], tplType: ClassTag[Tpl]): Future[Array[Obj]]

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

    Get Future with Array of n rows as objects 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 getObjArrayAsOf 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 objects.

    tx

    TxReport (returned from all molecule transaction operations)

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Obj] to capture the object type for Array

    returns

    Future[Array[Obj]] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetAsyncObjArray
  275. def getAsyncObjArrayAsOf(tx: TxReport)(implicit conn: Conn, objType: ClassTag[Obj], tplType: ClassTag[Tpl]): Future[Array[Obj]]

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

    Get Future with Array of all rows as objects 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 getObjArrayAsOf 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[Obj] to capture the object type for Array

    returns

    Future[Array[Obj]] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetAsyncObjArray
  276. def getAsyncObjArrayAsOf(t: Long, n: Int)(implicit conn: Conn, objType: ClassTag[Obj], tplType: ClassTag[Tpl]): Future[Array[Obj]]

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

    Get Future with Array of n rows as objects 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 getObjArrayAsOf 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 objects.

    t

    Long Transaction time t

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Obj] to capture the object type for Array

    returns

    Future[Array[Obj]] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetAsyncObjArray
  277. def getAsyncObjArrayAsOf(t: Long)(implicit conn: Conn, objType: ClassTag[Obj], tplType: ClassTag[Tpl]): Future[Array[Obj]]

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

    Get Future with Array of all rows as objects 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 getObjArrayAsOf 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[Obj] to capture the object type for Array

    returns

    Future[Array[Obj]] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetAsyncObjArray
  278. def getAsyncObjArraySince(date: Date, n: Int)(implicit conn: Conn, objType: ClassTag[Obj], tplType: ClassTag[Tpl]): Future[Array[Obj]]

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

    Get Future with Array of n rows as objects 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 getObjArraySince 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 objects.

    date

    java.util.Date

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Obj] to capture the object type for Array

    returns

    Future[Array[Obj]] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetAsyncObjArray
  279. def getAsyncObjArraySince(date: Date)(implicit conn: Conn, objType: ClassTag[Obj], tplType: ClassTag[Tpl]): Future[Array[Obj]]

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

    Get Future with Array of all rows as objects 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 getObjArraySince 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[Obj] to capture the object type for Array

    returns

    Future[Array[Obj]] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetAsyncObjArray
  280. def getAsyncObjArraySince(tx: TxReport, n: Int)(implicit conn: Conn, objType: ClassTag[Obj], tplType: ClassTag[Tpl]): Future[Array[Obj]]

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

    Get Future with Array of n rows as objects 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 getObjArraySince 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 objects.

    tx

    TxReport

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Obj] to capture the object type for Array

    returns

    Future[Array[Obj]] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetAsyncObjArray
  281. def getAsyncObjArraySince(tx: TxReport)(implicit conn: Conn, objType: ClassTag[Obj], tplType: ClassTag[Tpl]): Future[Array[Obj]]

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

    Get Future with Array of all rows as objects 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 getObjArraySince 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[Obj] to capture the object type for Array

    returns

    Future[Array[Obj]] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetAsyncObjArray
  282. def getAsyncObjArraySince(t: Long, n: Int)(implicit conn: Conn, objType: ClassTag[Obj], tplType: ClassTag[Tpl]): Future[Array[Obj]]

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

    Get Future with Array of n rows as objects 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 getObjArraySince 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 objects.

    t

    Transaction time t

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Obj] to capture the object type for Array

    returns

    Future[Array[Obj]] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetAsyncObjArray
  283. def getAsyncObjArraySince(t: Long)(implicit conn: Conn, objType: ClassTag[Obj], tplType: ClassTag[Tpl]): Future[Array[Obj]]

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

    Get Future with Array of all rows as objects 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 getObjArraySince 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[Obj] to capture the object type for Array

    returns

    Future[Array[Obj]] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetAsyncObjArray
  284. def getAsyncObjArrayWith(txData: List[_], n: Int)(implicit conn: Conn, objType: ClassTag[Obj], tplType: ClassTag[Tpl]): Future[Array[Obj]]

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

    Get Future with Array of n rows as objects 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 getObjArrayWith 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 objects.

    txData

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

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Obj] to capture the object type for Array

    returns

    Future[Array[Obj]] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetAsyncObjArray
  285. def getAsyncObjArrayWith(txData: List[_])(implicit conn: Conn, objType: ClassTag[Obj], tplType: ClassTag[Tpl]): Future[Array[Obj]]

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

    Get Future with Array of all rows as objects 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 getObjArrayWith 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[Obj] to capture the object type for Array

    returns

    Future[Array[Obj]] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetAsyncObjArray
  286. def getAsyncObjArrayWith(n: Int, txMolecules: Seq[Seq[Statement]]*)(implicit conn: Conn, objType: ClassTag[Obj], tplType: ClassTag[Tpl]): Future[Array[Obj]]

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

    Get Future with Array of n rows as objects 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 getObjArrayWith 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 objects.

    n

    Int Number of rows returned

    txMolecules

    Transaction statements from applied Molecules with test data

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Obj] to capture the object type for Array

    returns

    Future[Array[Obj]] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetAsyncObjArray
    Note

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

  287. def getAsyncObjArrayWith(txMolecules: Seq[Seq[Statement]]*)(implicit conn: Conn, objType: ClassTag[Obj], tplType: ClassTag[Tpl]): Future[Array[Obj]]

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

    Get Future with Array of all rows as objects 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 getObjArrayWith 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[Obj] to capture the object type for Array

    returns

    Future[Array[Obj]] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetAsyncObjArray
  288. def getAsyncObjIterable(implicit conn: Conn): Future[Iterable[Obj]]

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

    Get Future with Iterable of all rows as objects 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

    returns

    Future[Iterable[Obj]] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetAsyncObjIterable
  289. def getAsyncObjIterableAsOf(date: Date)(implicit conn: Conn): Future[Iterable[Obj]]

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

    Get Future with Iterable of all rows as objects 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 getObjIterableAsOf method.

    date

    java.util.Date

    conn

    Implicit Conn value in scope

    returns

    Future[Iterable[Obj]] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetAsyncObjIterable
  290. def getAsyncObjIterableAsOf(tx: TxReport)(implicit conn: Conn): Future[Iterable[Obj]]

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

    Get Future with Iterable of all rows as objects 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 getObjIterableAsOf method.

    tx

    TxReport (returned from all molecule transaction operations)

    conn

    Implicit Conn value in scope

    returns

    Future[Iterable[Obj]] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetAsyncObjIterable
  291. def getAsyncObjIterableAsOf(t: Long)(implicit conn: Conn): Future[Iterable[Obj]]

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

    Get Future with Iterable of all rows as objects 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 getObjIterableAsOf 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 getObjIterableAsOf method.

    t

    Transaction time t

    conn

    Implicit Conn value in scope

    returns

    Future[Iterable[Obj]] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetAsyncObjIterable
  292. def getAsyncObjIterableSince(date: Date)(implicit conn: Conn): Future[Iterable[Obj]]

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

    Get Future with Iterable of all rows as objects 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

    returns

    Future[Iterable[Obj]] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetAsyncObjIterable
  293. def getAsyncObjIterableSince(tx: TxReport)(implicit conn: Conn): Future[Iterable[Obj]]

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

    Get Future with Iterable of all rows as objects 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

    returns

    Future[Iterable[Obj]] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetAsyncObjIterable
  294. def getAsyncObjIterableSince(t: Long)(implicit conn: Conn): Future[Iterable[Obj]]

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

    Get Future with Iterable of all rows as objects 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

    returns

    Future[Iterable[Obj]] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetAsyncObjIterable
  295. def getAsyncObjIterableWith(txData: List[_])(implicit conn: Conn): Future[Iterable[Obj]]

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

    Get Future with Iterable of all rows as objects 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

    returns

    Iterable of molecule data

    Definition Classes
    GetAsyncObjIterable
  296. def getAsyncObjIterableWith(txMolecules: Seq[Seq[Statement]]*)(implicit conn: Conn): Future[Iterable[Obj]]

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

    Get Future with Iterable of all rows as objects 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

    returns

    Iterable of molecule data

    Definition Classes
    GetAsyncObjIterable
  297. def getAsyncObjList(n: Int)(implicit conn: Conn): Future[List[Obj]]

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

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

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

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    returns

    Future[List[Obj]] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetAsyncObjList
  298. def getAsyncObjList(implicit conn: Conn): Future[List[Obj]]

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

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

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

    conn

    Implicit Conn value in scope

    returns

    Future[List[Obj]] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetAsyncObjList
  299. def getAsyncObjListAsOf(date: Date, n: Int)(implicit conn: Conn): Future[List[Obj]]

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

    Get Future with List of n rows as objects 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

    returns

    Future[List[Obj]] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetAsyncObjList
  300. def getAsyncObjListAsOf(date: Date)(implicit conn: Conn): Future[List[Obj]]

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

    Get Future with List of all rows as objects 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

    returns

    Future[List[Obj]] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetAsyncObjList
  301. def getAsyncObjListAsOf(tx: TxReport, n: Int)(implicit conn: Conn): Future[List[Obj]]

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

    Get Future with List of n rows as objects 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

    returns

    Future[List[Obj]] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetAsyncObjList
  302. def getAsyncObjListAsOf(tx: TxReport)(implicit conn: Conn): Future[List[Obj]]

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

    Get Future with List of all rows as objects 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

    returns

    Future[List[Obj]] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetAsyncObjList
  303. def getAsyncObjListAsOf(t: Long, n: Int)(implicit conn: Conn): Future[List[Obj]]

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

    Get Future with List of n rows as objects 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

    returns

    Future[List[Obj]] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetAsyncObjList
  304. def getAsyncObjListAsOf(t: Long)(implicit conn: Conn): Future[List[Obj]]

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

    Get Future with List of all rows as objects 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

    returns

    Future[List[Obj]] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetAsyncObjList
  305. def getAsyncObjListHistory(implicit conn: Conn): Future[List[Obj]]

    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

    Future[List[Obj]] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetAsyncObjList
  306. def getAsyncObjListSince(date: Date, n: Int)(implicit conn: Conn): Future[List[Obj]]

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

    Get Future with List of n rows as objects 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

    returns

    Future[List[Obj]] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetAsyncObjList
  307. def getAsyncObjListSince(date: Date)(implicit conn: Conn): Future[List[Obj]]

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

    Get Future with List of all rows as objects 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

    returns

    Future[List[Obj]] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetAsyncObjList
  308. def getAsyncObjListSince(tx: TxReport, n: Int)(implicit conn: Conn): Future[List[Obj]]

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

    Get Future with List of n rows as objects 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

    returns

    Future[List[Obj]] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetAsyncObjList
  309. def getAsyncObjListSince(tx: TxReport)(implicit conn: Conn): Future[List[Obj]]

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

    Get Future with List of all rows as objects 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

    returns

    Future[List[Obj]] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetAsyncObjList
  310. def getAsyncObjListSince(t: Long, n: Int)(implicit conn: Conn): Future[List[Obj]]

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

    Get Future with List of n rows as objects 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

    returns

    Future[List[Obj]] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetAsyncObjList
  311. def getAsyncObjListSince(t: Long)(implicit conn: Conn): Future[List[Obj]]

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

    Get Future with List of all rows as objects 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

    returns

    Future[List[Obj]] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetAsyncObjList
  312. def getAsyncObjListWith(txData: List[_], n: Int)(implicit conn: Conn): Future[List[Obj]]

    Get Future with List of n rows as objects matching molecule with applied raw transaction data.

    Get Future with List of n rows as objects 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

    returns

    Future[List[Obj]] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetAsyncObjList
  313. def getAsyncObjListWith(txData: List[_])(implicit conn: Conn): Future[List[Obj]]

    Get Future with List of all rows as objects matching molecule with applied raw transaction data.

    Get Future with List of all rows as objects 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

    returns

    Future[List[Obj]] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetAsyncObjList
  314. def getAsyncObjListWith(n: Int, txMolecules: Seq[Seq[Statement]]*)(implicit conn: Conn): Future[List[Obj]]

    Get Future with List of n rows as objects matching molecule with applied molecule transaction data.

    Get Future with List of n rows as objects 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

    returns

    Future[List[Obj]] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetAsyncObjList
    Note

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

  315. def getAsyncObjListWith(txMolecules: Seq[Seq[Statement]]*)(implicit conn: Conn): Future[List[Obj]]

    Get Future with List of all rows as objects matching molecule with applied molecule transaction data.

    Get Future with List of all rows as objects 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

    returns

    Future[List[Obj]] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetAsyncObjList
  316. 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
  317. 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
  318. 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
  319. 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
  320. 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
  321. 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
  322. 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
  323. 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
  324. 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
  325. 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
  326. 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
  327. 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
  328. 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
  329. 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
  330. 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
  331. 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
  332. 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.

  333. 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
  334. def getAsyncSince(date: Date, n: Int)(implicit conn: Conn): 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

    returns

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

    Definition Classes
    GetAsyncTplList
  335. def getAsyncSince(date: Date)(implicit conn: Conn): 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

    returns

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

    Definition Classes
    GetAsyncTplList
  336. def getAsyncSince(tx: TxReport, n: Int)(implicit conn: Conn): 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

    returns

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

    Definition Classes
    GetAsyncTplList
  337. def getAsyncSince(tx: TxReport)(implicit conn: Conn): 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

    returns

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

    Definition Classes
    GetAsyncTplList
  338. def getAsyncSince(t: Long, n: Int)(implicit conn: Conn): 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

    returns

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

    Definition Classes
    GetAsyncTplList
  339. def getAsyncSince(t: Long)(implicit conn: Conn): 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

    returns

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

    Definition Classes
    GetAsyncTplList
  340. def getAsyncWith(txData: List[_], n: Int)(implicit conn: Conn): 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

    returns

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

    Definition Classes
    GetAsyncTplList
  341. def getAsyncWith(txData: List[_])(implicit conn: Conn): 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

    returns

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

    Definition Classes
    GetAsyncTplList
  342. def getAsyncWith(n: Int, txMolecules: Seq[Seq[Statement]]*)(implicit conn: Conn): 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

    returns

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

    Definition Classes
    GetAsyncTplList
    Note

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

  343. def getAsyncWith(txMolecules: Seq[Seq[Statement]]*)(implicit conn: Conn): 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

    returns

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

    Definition Classes
    GetAsyncTplList
  344. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  345. def getHistory(implicit conn: Conn): 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

    returns

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

    Definition Classes
    GetTplList
    See also

    Equivalent asynchronous getAsyncHistory method.

  346. def getIterable(implicit conn: Conn): 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.next === ("Ben", 42)
    conn

    Implicit Conn value in scope

    returns

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

    Definition Classes
    GetTplIterable
    See also

    Equivalent asynchronous getAsyncIterable method.

  347. def getIterableAsOf(date: Date)(implicit conn: Conn): 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

    returns

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

    Definition Classes
    GetTplIterable
    See also

    Equivalent asynchronous getAsyncIterableAsOf method.

  348. def getIterableAsOf(tx: TxReport)(implicit conn: Conn): 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

    returns

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

    Definition Classes
    GetTplIterable
    See also

    Equivalent asynchronous getAsyncIterableAsOf method.

  349. def getIterableAsOf(t: Long)(implicit conn: Conn): 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

    returns

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

    Definition Classes
    GetTplIterable
    See also

    Equivalent asynchronous getAsyncIterableAsOf method.

  350. def getIterableSince(date: Date)(implicit conn: Conn): 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

    returns

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

    Definition Classes
    GetTplIterable
    See also

    Equivalent asynchronous getAsyncIterableSince method.

  351. def getIterableSince(tx: TxReport)(implicit conn: Conn): 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

    returns

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

    Definition Classes
    GetTplIterable
    See also

    Equivalent asynchronous getAsyncIterableSince method.

  352. def getIterableSince(t: Long)(implicit conn: Conn): 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

    returns

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

    Definition Classes
    GetTplIterable
    See also

    Equivalent asynchronous getAsyncIterableSince method.

  353. def getIterableWith(txData: List[_])(implicit conn: Conn): 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

    returns

    Iterable of molecule data

    Definition Classes
    GetTplIterable
    See also

    Equivalent asynchronous getAsyncIterableWith method.

  354. def getIterableWith(txMolecules: Seq[Seq[Statement]]*)(implicit conn: Conn): 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

    returns

    Iterable of molecule data

    Definition Classes
    GetTplIterable
    See also

    Equivalent asynchronous getAsyncIterableWith method.

  355. def getObj(implicit conn: Conn): Obj

    Convenience method to get head of list of objects matching molecule.

    Convenience method to get head of list of objects matching molecule.

    val person = Person.name.age.getObj
    person.name === "Ben"
    person.age  === 42
    conn

    Implicit Conn value in scope

    returns

    List[Obj] where Obj is an object with properties matching the attributes of the molecule

    Definition Classes
    GetObjList
  356. def getObjArray(n: Int)(implicit conn: Conn, objType: ClassTag[Obj], tplType: ClassTag[Tpl]): Array[Obj]

    Get Array of n rows as objects matching molecule.

    Get Array of n rows as objects matching molecule.

    Person.name.age.getObjArray(1).map(p => s"${p.name} is ${p.age} years old")) === List(
      "Ben is 42 years old"
    )

    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 objects. Setting n to -1 fetches all rows (same as calling getObjArray without any number of rows parameter).

    n

    Number of rows. If -1, all rows are fetched.

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Obj] to capture the object type for Array

    returns

    Array[Obj] where Obj is an object of types matching the attributes of the molecule

    Definition Classes
    GetObjArray
    See also

    Equivalent asynchronous getAsyncArray method.

  357. def getObjArray(implicit conn: Conn, objType: ClassTag[Obj], tplType: ClassTag[Tpl]): Array[Obj]

    Get Array of all rows as objects matching molecule.

    Get Array of all rows as objects matching molecule.

    val persons = Person.name.age.getObjArray
    
    // Fast while loop
    var i = 0
    val length = persons.length
    while(i < length) {
      val p = persons(i)
      println(s"${p.name} is ${p.age} years old") // Do stuff with row object...
      i += 1
    }

    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[Obj] to capture the object type for Array

    returns

    Array[Obj] where Obj is an object of types matching the attributes of the molecule

    Definition Classes
    GetObjArray
    See also

    Equivalent asynchronous getAsyncObjArray method.

  358. def getObjArrayAsOf(date: Date, n: Int)(implicit conn: Conn, objType: ClassTag[Obj], tplType: ClassTag[Tpl]): Array[Obj]

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

    Get Array of n rows as objects 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
    val persons = Person.name.age.getObjArrayAsOf(afterUpdate)
    persons(0).name === "Ben"
    persons(0).age  === 43 // <-- updated
    persons(1).name === "Liz"
    persons(1).age  === 37
    
    // Get Array of n rows as of afterUpdate
    val persons = Person.name.age.getObjArrayAsOf(afterUpdate, 1)
    persons(0).name === "Ben"
    persons(0).age  === 43 // <-- updated

    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 objects.

    date

    java.util.Date

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Obj] to capture the object type for Array

    returns

    Array[Obj] where Obj is an object of data matching molecule

    Definition Classes
    GetObjArray
    See also

    Equivalent asynchronous getAsyncArrayAsOf method.

  359. def getObjArrayAsOf(date: Date)(implicit conn: Conn, objType: ClassTag[Obj], tplType: ClassTag[Tpl]): Array[Obj]

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

    Get Array of all rows as objects 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.getObjArrayAsOf(beforeInsert) === Array()
    
    // Get Array of all rows as of afterInsert
    val persons = Person.name.age.getObjArrayAsOf(afterInsert)
    persons(0).name === "Ben"
    persons(0).age  === 42
    persons(1).name === "Liz"
    persons(1).age  === 37
    
    // Get Array of all rows as of afterUpdate
    val persons = Person.name.age.getObjArrayAsOf(afterUpdate)
    persons(0).name === "Ben"
    persons(0).age  === 43 // <-- updated
    persons(1).name === "Liz"
    persons(1).age  === 37
    
    // Get Array of all rows as of afterRetract
    val persons = Person.name.age.getObjArrayAsOf(afterRetract)
    persons(0).name === "Liz"
    persons(0).age  === 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.

    date

    java.util.Date

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Obj] to capture the object type for Array

    returns

    Array[Obj] where Obj is an object of data matching molecule

    Definition Classes
    GetObjArray
    See also

    Equivalent asynchronous getAsyncArrayAsOf method.

  360. def getObjArrayAsOf(tx: TxReport, n: Int)(implicit conn: Conn, objType: ClassTag[Obj], tplType: ClassTag[Tpl]): Array[Obj]

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

    Get Array of n rows as objects 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)
    val persons = Person.name.age.getObjArrayAsOf(tx2)
    persons(0).name === "Ben"
    persons(0).age  === 43 // <-- updated
    persons(1).name === "Liz"
    persons(1).age  === 37
    
    // Get Array of n rows as of tx2 (after update)
    val persons = Person.name.age.getObjArrayAsOf(tx2, 1)
    persons(0).name === "Ben"
    persons(0).age  === 43 // <-- updated

    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 objects.

    tx

    TxReport (returned from all molecule transaction operations)

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Obj] to capture the object type for Array

    returns

    Array[Obj] where Obj is an object of data matching molecule

    Definition Classes
    GetObjArray
    See also

    Equivalent asynchronous getAsyncArrayAsOf method.

  361. def getObjArrayAsOf(tx: TxReport)(implicit conn: Conn, objType: ClassTag[Obj], tplType: ClassTag[Tpl]): Array[Obj]

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

    Get Array of all rows as objects 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)
    val persons = Person.name.age.getObjArrayAsOf(tx1)
    persons(0).name === "Ben"
    persons(0).age  === 42
    persons(1).name === "Liz"
    persons(1).age  === 37
    
    // Get Array of all rows as of tx2 (after update)
    val persons = Person.name.age.getObjArrayAsOf(tx2)
    persons(0).name === "Ben"
    persons(0).age  === 43 // <-- updated
    persons(1).name === "Liz"
    persons(1).age  === 37
    
    // Get Array of all rows as of tx3 (after retract)
    val persons = Person.name.age.getObjArrayAsOf(tx3)
    persons(0).name === "Liz"
    persons(0).age  === 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.

    tx

    TxReport (returned from all molecule transaction operations)

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Obj] to capture the object type for Array

    returns

    Array[Obj] where Obj is an object of data matching molecule

    Definition Classes
    GetObjArray
    See also

    Equivalent asynchronous getAsyncArrayAsOf method.

  362. def getObjArrayAsOf(t: Long, n: Int)(implicit conn: Conn, objType: ClassTag[Obj], tplType: ClassTag[Tpl]): Array[Obj]

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

    Get Array of n rows as objects 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)
    val persons = Person.name.age.getObjArrayAsOf(1031)
    persons(0).name === "Ben"
    persons(0).age  === 43 // <-- updated
    persons(1).name === "Liz"
    persons(1).age  === 37
    
    // Get Array of n rows as of transaction t 1031 (after update)
    val persons = Person.name.age.getObjArrayAsOf(1031)
    persons(0).name === "Ben"
    persons(0).age  === 43 // <-- updated

    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 objects.

    t

    Long Transaction time t

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Obj] to capture the object type for Array

    returns

    Array[Obj] where Obj is an object of data matching molecule

    Definition Classes
    GetObjArray
    See also

    Equivalent asynchronous getAsyncArrayAsOf method.

  363. def getObjArrayAsOf(t: Long)(implicit conn: Conn, objType: ClassTag[Obj], tplType: ClassTag[Tpl]): Array[Obj]

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

    Get Array of all rows as objects 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)
    val persons = Person.name.age.getObjArrayAsOf(1028)
    persons(0).name === "Ben"
    persons(0).age  === 42
    persons(1).name === "Liz"
    persons(1).age  === 37
    
    // Get Array of data as of transaction t 1031 (after update)
    val persons = Person.name.age.getObjArrayAsOf(1031)
    persons(0).name === "Ben"
    persons(0).age  === 43 // <-- updated
    persons(1).name === "Liz"
    persons(1).age  === 37
    
    // Get Array of all rows as of transaction t 1032 (after retract)
    val persons = Person.name.age.getObjArrayAsOf(1032)
    persons(0).name === "Liz"
    persons(0).age  === 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 typed data set.

    t

    Transaction time t

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Obj] to capture the object type for Array

    returns

    Array[Obj] where Obj is an object of data matching molecule

    Definition Classes
    GetObjArray
    See also

    Equivalent asynchronous getAsyncArrayAsOf method.

  364. def getObjArraySince(date: Date, n: Int)(implicit conn: Conn, objType: ClassTag[Obj], tplType: ClassTag[Tpl]): Array[Obj]

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

    Get Array of n rows as objects 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
    val persons = Person.name.getObjArray
    persons(0).name === "Ann"
    persons(1).name === "Ben"
    persons(2).name === "Cay"
    
    // Ben and Cay added since date1
    val persons = Person.name.getObjArraySince(date1)
    persons(0).name === "Ben"
    persons(1).name === "Cay"
    
    // Ben and Cay added since date1 - only n (1) rows returned
    val persons = Person.name.getObjArraySince(date1, 1)
    persons(0).name === "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 objects.

    date

    java.util.Date

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Obj] to capture the object type for Array

    returns

    Array[Obj] where Obj is an object of data matching molecule

    Definition Classes
    GetObjArray
    See also

    Equivalent asynchronous getAsyncArraySince method.

  365. def getObjArraySince(date: Date)(implicit conn: Conn, objType: ClassTag[Obj], tplType: ClassTag[Tpl]): Array[Obj]

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

    Get Array of all rows as objects 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
    val persons = Person.name.getObjArray
    persons(0).name === "Ann"
    persons(1).name === "Ben"
    persons(2).name === "Cay"
    
    // Ben and Cay added since date1
    val persons = Person.name.getObjArraySince(date1)
    persons(0).name === "Ben"
    persons(1).name === "Cay"
    
    // Cay added since transaction time date2
    val persons = Person.name.getObjArraySince(date2)
    persons(0).name === "Cay"
    
    // Nothing added since transaction time date3
    Person.name.getObjArraySince(date3) === Array()

    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[Obj] to capture the object type for Array

    returns

    Array[Obj] where Obj is an object of data matching molecule

    Definition Classes
    GetObjArray
    See also

    Equivalent asynchronous getAsyncArraySince method.

  366. def getObjArraySince(tx: TxReport, n: Int)(implicit conn: Conn, objType: ClassTag[Obj], tplType: ClassTag[Tpl]): Array[Obj]

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

    Get Array of n rows as objects 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
    val persons = Person.name.getObjArray
    persons(0).name === "Ann"
    persons(1).name === "Ben"
    persons(2).name === "Cay"
    
    // Ben and Cay added since tx1
    val persons = Person.name.getObjArraySince(tx1)
    persons(0).name === "Ben"
    persons(1).name === "Cay"
    
    // Ben and Cay added since tx1 - only n (1) rows returned
    val persons = Person.name.getObjArraySince(tx1, 1)
    persons(0).name === "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 objects.

    tx

    TxReport

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Obj] to capture the object type for Array

    returns

    Array[Obj] where Obj is an object of data matching molecule

    Definition Classes
    GetObjArray
    See also

    Equivalent asynchronous getAsyncArraySince method.

  367. def getObjArraySince(tx: TxReport)(implicit conn: Conn, objType: ClassTag[Obj], tplType: ClassTag[Tpl]): Array[Obj]

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

    Get Array of all rows as objects 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
    val persons = Person.name.getObjArray
    persons(0).name === "Ann"
    persons(1).name === "Ben"
    persons(2).name === "Cay"
    
    // Ben and Cay added since transaction time tx1
    val persons = Person.name.getObjArraySince(tx1)
    persons(0).name === "Ben"
    persons(1).name === "Cay"
    
    // Cay added since transaction time tx2
    val persons = Person.name.getObjArraySince(tx2)
    persons(0).name === "Cay"
    
    // Nothing added since transaction time tx3
    Person.name.getObjArraySince(tx3) === Array()

    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[Obj] to capture the object type for Array

    returns

    Array[Obj] where Obj is an object of data matching molecule

    Definition Classes
    GetObjArray
    See also

    Equivalent asynchronous getAsyncArraySince method.

  368. def getObjArraySince(t: Long, n: Int)(implicit conn: Conn, objType: ClassTag[Obj], tplType: ClassTag[Tpl]): Array[Obj]

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

    Get Array of n rows as objects 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
    val persons = Person.name.getObjArray
    persons(0).name === "Ann"
    persons(1).name === "Ben"
    persons(2).name === "Cay"
    
    // Ben and Cay added since transaction time t1
    val persons = Person.name.getObjArraySince(t1)
    persons(0).name === "Ben"
    persons(1).name === "Cay"
    
    // Ben and Cay added since transaction time t1 - only n (1) rows returned
    val persons = Person.name.getObjArraySince(t1, 1)
    persons(0).name === "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 objects.

    t

    Transaction time t

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Obj] to capture the object type for Array

    returns

    Array[Obj] where Obj is an object of data matching molecule

    Definition Classes
    GetObjArray
    See also

    Equivalent asynchronous getAsyncArraySince method.

  369. def getObjArraySince(t: Long)(implicit conn: Conn, objType: ClassTag[Obj], tplType: ClassTag[Tpl]): Array[Obj]

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

    Get Array of all rows as objects 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
    val persons = Person.name.getObjArray
    persons(0).name === "Ann"
    persons(1).name === "Ben"
    persons(2).name === "Cay"
    
    // Ben and Cay added since transaction time t1
    val persons = Person.name.getObjArraySince(t1)
    persons(0).name === "Ben"
    persons(1).name === "Cay"
    
    // Cay added since transaction time t2
    val persons = Person.name.getObjArraySince(t2)
    persons(0).name === "Cay"
    
    // Nothing added since transaction time t3
    Person.name.getObjArraySince(t3) === Array()

    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[Obj] to capture the object type for Array

    returns

    Array[Obj] where Obj is an object of data matching molecule

    Definition Classes
    GetObjArray
    See also

    Equivalent asynchronous getAsyncArraySince method.

  370. def getObjArrayWith(txData: List[_], n: Int)(implicit conn: Conn, objType: ClassTag[Obj], tplType: ClassTag[Tpl]): Array[Obj]

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

    Get Array of n rows as objects 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.getObjArrayWith(newDataTx).size === 250
    
    // Imagine future db - Let's just take 10
    Person.name.getObjArrayWith(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 objects.

    txData

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

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Obj] to capture the object type for Array

    returns

    Array[Obj] where Obj is an object of data matching molecule

    Definition Classes
    GetObjArray
    See also

    Equivalent asynchronous getAsyncArrayWith method.

  371. def getObjArrayWith(txData: List[_])(implicit conn: Conn, objType: ClassTag[Obj], tplType: ClassTag[Tpl]): Array[Obj]

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

    Get Array of all rows as objects 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.getObjArrayWith(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[Obj] to capture the object type for Array

    returns

    Array[Obj] where Obj is an object of data matching molecule

    Definition Classes
    GetObjArray
    See also

    Equivalent asynchronous getAsyncArrayWith method.

  372. def getObjArrayWith(n: Int, txMolecules: Seq[Seq[Statement]]*)(implicit conn: Conn, objType: ClassTag[Obj], tplType: ClassTag[Tpl]): Array[Obj]

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

    Get Array of n rows as objects 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
    
    // Current state
    val persons = Person.name.likes.getObjArray
    persons(0).name  === "Ben"
    persons(0).likes === "pasta"
    persons(1).name  === "Liz"
    persons(1).likes === "pizza"
    
    // Test adding transaction data
    val personsTest = Person.name.likes.getObjArrayWith(
      Person(ben).likes("sushi").getUpdateTx,
      Person(liz).likes("cake").getUpdateTx
    )
    // Effect: sushi and cake now liked
    personsTest(0).name  === "Ben"
    personsTest(0).likes === "sushi"
    personsTest(1).name  === "Liz"
    personsTest(1).likes === "cake"
    
    // Same as above, but only n (1) rows returned:
    val personsTest1 = Person.name.likes.getObjArrayWith(
      1
      Person(ben).likes("sushi").getUpdateTx,
      Person(liz).likes("cake").getUpdateTx
    )
    // Effect: sushi and cake now liked (but only Ben returned)
    personsTest1(0).name  === "Ben"
    personsTest1(0).likes === "sushi"
    
    // Current state is still the same
    val personsAfter = Person.name.likes.getObjArray
    personsAfter(0).name  === "Ben"
    personsAfter(0).likes === "pasta"
    personsAfter(1).name  === "Liz"
    personsAfter(1).likes === "pizza"

    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 objects.

    n

    Int Number of rows returned

    txMolecules

    Transaction statements from applied Molecules with test data

    conn

    Implicit Conn value in scope

    tplType

    Implicit ClassTag[Obj] to capture the object type for Array

    returns

    Array[Obj] where Obj is an object of data matching molecule

    Definition Classes
    GetObjArray
    Note

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

    See also

    Equivalent asynchronous getAsyncArrayWith method.

  373. def getObjArrayWith(txMolecules: Seq[Seq[Statement]]*)(implicit conn: Conn, objType: ClassTag[Obj], tplType: ClassTag[Tpl]): Array[Obj]

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

    Get Array of all rows as objects 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
    
    val persons = Person.name.likes.getObjArray
    persons(0).name  === "Ben"
    persons(0).likes === "pasta"
    
    // Test adding transaction data
    val personsTest = Person.name.likes.getObjArrayWith(
      // Additional transaction data
      Person(ben).likes("sushi").getUpdateTx
    )
    
    // Effect: Ben would like sushi if tx was applied
    personTest(0).name  === "Ben"
    personTest(0).likes === "sushi"
    
    // Current state is still the same
    val personsAfter = Person.name.likes.getObjArray
    personsAfter(0).name  === "Ben"
    personsAfter(0).likes === "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[Obj] to capture the object type for Array

    returns

    Array[Obj] where Obj is an object of data matching molecule

    Definition Classes
    GetObjArray
    See also

    Equivalent asynchronous getAsyncArrayWith method.

  374. def getObjIterable(implicit conn: Conn): Iterable[Obj]

    Get Iterable of all objects matching the molecule.

    Get Iterable of all objects matching the molecule.

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

    val person = Person.name.age.getObjIterable.next
    person.name === "Ben"
    person.age === 42
    conn

    Implicit Conn value in scope

    returns

    Iterable[Obj] where Obj is composed of trait types matching the attributes of the molecule.

    Definition Classes
    GetObjIterable
    See also

    Equivalent asynchronous getAsyncIterable method.

  375. def getObjIterableAsOf(date: Date)(implicit conn: Conn): Iterable[Obj]

    Get Iterable of all rows as objects matching molecule as of date.

    Get Iterable of all rows as objects 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.getObjIterableAsOf(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.getObjIterableAsOf(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.getObjIterableAsOf(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.getObjIterableAsOf(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

    returns

    Iterable[Obj] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetObjIterable
    See also

    Equivalent asynchronous getAsyncObjIterableAsOf method.

  376. def getObjIterableAsOf(tx: TxReport)(implicit conn: Conn): Iterable[Obj]

    Get Iterable of all rows as objects matching molecule as of tx.

    Get Iterable of all rows as objects 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.getObjIterableAsOf(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.getObjIterableAsOf(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.getObjIterableAsOf(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

    returns

    Iterable[Obj] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetObjIterable
    See also

    Equivalent asynchronous getAsyncObjIterableAsOf method.

  377. def getObjIterableAsOf(t: Long)(implicit conn: Conn): Iterable[Obj]

    Get Iterable of all rows as objects matching molecule as of transaction time t.

    Get Iterable of all rows as objects matching molecule as of transaction time t.

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

    Call getObjIterableAsOf 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.getObjIterableAsOf(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.getObjIterableAsOf(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.getObjIterableAsOf(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

    returns

    Iterable[Obj] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetObjIterable
    See also

    Equivalent asynchronous getAsyncObjIterableAsOf method.

  378. def getObjIterableSince(date: Date)(implicit conn: Conn): Iterable[Obj]

    Get Iterable of all rows as objects matching molecule since date.

    Get Iterable of all rows as objects 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.getObjIterable.iterator.toList === List("Ann", "Ben", "Cay")
    
    // Ben and Cay added since date1
    Person.name.getObjIterableSince(date1).iterator.toList === List("Ben", "Cay")
    
    // Cay added since date2
    Person.name.getObjIterableSince(date2).iterator.toList === List("Cay")
    
    // Nothing added since date3
    Person.name.getObjIterableSince(date3).iterator.toList === Nil
    date

    java.util.Date

    conn

    Implicit Conn value in scope

    returns

    Iterable[Obj] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetObjIterable
    See also

    Equivalent asynchronous getAsyncObjIterableSince method.

  379. def getObjIterableSince(tx: TxReport)(implicit conn: Conn): Iterable[Obj]

    Get Iterable of all rows as objects matching molecule since tx.

    Get Iterable of all rows as objects 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.getObjIterable.iterator.toList === List("Ann", "Ben", "Cay")
    
    // Ben and Cay added since tx1
    Person.name.getObjIterableSince(tx1).iterator.toList === List("Ben", "Cay")
    
    // Cay added since tx2
    Person.name.getObjIterableSince(tx2).iterator.toList === List("Cay")
    
    // Nothing added since tx3
    Person.name.getObjIterableSince(tx3).iterator.toList === Nil
    tx

    TxReport

    conn

    Implicit Conn value in scope

    returns

    Iterable[Obj] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetObjIterable
    See also

    Equivalent asynchronous getAsyncObjIterableSince method.

  380. def getObjIterableSince(t: Long)(implicit conn: Conn): Iterable[Obj]

    Get Iterable of all rows as objects matching molecule since transaction time t.

    Get Iterable of all rows as objects matching molecule since transaction time t.

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

    Call getObjIterableSince 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.getObjIterable.iterator.toList === List("Ann", "Ben", "Cay")
    
    // Ben and Cay added since transaction time t1
    Person.name.getObjIterableSince(t1).iterator.toList === List("Ben", "Cay")
    
    // Cay added since transaction time t2
    Person.name.getObjIterableSince(t2).iterator.toList === List("Cay")
    
    // Nothing added since transaction time t3
    Person.name.getObjIterableSince(t3).iterator.toList === Nil
    t

    Transaction time t

    conn

    Implicit Conn value in scope

    returns

    Iterable[Obj] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetObjIterable
    See also

    Equivalent asynchronous getAsyncObjIterableSince method.

  381. def getObjIterableWith(txData: List[_])(implicit conn: Conn): Iterable[Obj]

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

    Get Iterable of all rows as objects 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.getObjIterableWith(newDataTx).size === 250
    txData

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

    conn

    Implicit Conn value in scope

    returns

    Iterable of molecule data

    Definition Classes
    GetObjIterable
    See also

    Equivalent asynchronous getAsyncObjIterableWith method.

  382. def getObjIterableWith(txMolecules: Seq[Seq[Statement]]*)(implicit conn: Conn): Iterable[Obj]

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

    Get Iterable of all rows as objects 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.getObjIterableWith(
      // 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

    returns

    Iterable of molecule data

    Definition Classes
    GetObjIterable
    See also

    Equivalent asynchronous getAsyncObjIterableWith method.

  383. def getObjList(n: Int)(implicit conn: Conn): List[Obj]

    Get List of n rows as objects matching molecule.

    Get List of n rows as objects matching molecule.

    Only n rows are type-casted.

    val List(p1) = Person.name.age.getObjList(1)
    p1.name === "Ben"
    p1.age  === 42
    n

    Int Number of rows returned. If n == -1, all rows are returned

    conn

    Implicit Conn value in scope

    returns

    List[Obj] where Obj is an object with properties matching the attributes of the molecule

    Definition Classes
    GetObjList
    See also

    Equivalent asynchronous getAsyncObjList method.

  384. def getObjList(implicit conn: Conn): List[Obj]

    Get List of all rows as objects matching molecule.

    Get List of all rows as objects matching molecule.

    val List(p1, p2) = Person.name.age.getObjList
    p1.name === "Ben"
    p1.age  === 42
    p2.name === "Liz"
    p2.age  === 37
    conn

    Implicit Conn value in scope

    returns

    List[Obj] where Obj is an object with properties matching the attributes of the molecule

    Definition Classes
    GetObjList
    See also

    Equivalent asynchronous getAsyncObjList method.

  385. def getObjListAsOf(date: Date, n: Int)(implicit conn: Conn): List[Obj]

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

    Get List of n rows as objects 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
    val List(a1, a2) = Person.name.age.getObjListAsOf(afterUpdate)
    a1.name === "Ben"
    a1.age  === 43 // <-- updated
    a2.name === "Liz"
    a2.age  === 37
    
    // Get List of n rows as of afterUpdate
    val List(b1) = Person.name.age.getObjListAsOf(afterUpdate, 1)
    b1.name === "Ben"
    b1.age  === 43 // <-- updated
    date

    java.util.Date

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    returns

    List[Obj] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetObjList
    See also

    Equivalent asynchronous getAsyncObjListAsOf method.

  386. def getObjListAsOf(date: Date)(implicit conn: Conn): List[Obj]

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

    Get List of all rows as objects 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.getObjListAsOf(beforeInsert) === List()
    
    // Get List of all rows as of afterInsert
    val List(a1, a2) = Person.name.age.getObjListAsOf(afterInsert)
    a1.name === "Ben"
    a1.age  === 42
    a2.name === "Liz"
    a2.age  === 37
    
    // Get List of all rows as of afterUpdate
    val List(b1, b2) = Person.name.age.getObjListAsOf(afterUpdate)
    b1.name === "Ben"
    b1.age  === 43 // <-- updated
    b2.name === "Liz"
    b2.age  === 37
    
    // Get List of all rows as of afterRetract
    val List(c1) = Person.name.age.getObjListAsOf(afterRetract)
    c1.name === "Liz"
    c1.age  === 37
    date

    java.util.Date

    conn

    Implicit Conn value in scope

    returns

    List[Obj] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetObjList
    See also

    Equivalent asynchronous getAsyncObjListAsOf method.

  387. def getObjListAsOf(tx: TxReport, n: Int)(implicit conn: Conn): List[Obj]

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

    Get List of n rows as objects 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 List of all rows as of tx2 (after update)
    val List(a1, a2) = Person.name.age.getObjListAsOf(tx2)
    a1.name === "Ben"
    a1.age  === 43 // <-- updated
    a2.name === "Liz"
    a2.age  === 37
    
    // Get List of n rows as of tx2 (after update)
    val List(b1) = Person.name.age.getObjListAsOf(tx2, 1)
    b1.name === "Ben"
    b1.age  === 43 // <-- updated
    tx

    TxReport (returned from all molecule transaction operations)

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    returns

    List[Obj] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetObjList
    See also

    Equivalent asynchronous getAsyncObjListAsOf method.

  388. def getObjListAsOf(tx: TxReport)(implicit conn: Conn): List[Obj]

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

    Get List of all rows as objects 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)
    val List(a1, a2) = Person.name.age.getObjListAsOf(tx1)
    a1.name === "Ben"
    a1.age  === 42
    a2.name === "Liz"
    a2.age  === 37
    
    // Get List of all rows as of tx2 (after update)
    val List(b1, b2) = Person.name.age.getObjListAsOf(tx2)
    b1.name === "Ben"
    b1.age  === 43 // <-- updated
    b2.name === "Liz"
    b2.age  === 37
    
    // Get List of all rows as of tx3 (after retract)
    val List(c1) = Person.name.age.getObjListAsOf(tx3)
    c1.name === "Liz"
    c1.age  === 37
    tx

    TxReport (returned from all molecule transaction operations)

    conn

    Implicit Conn value in scope

    returns

    List[Obj] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetObjList
    See also

    Equivalent asynchronous getAsyncObjListAsOf method.

  389. def getObjListAsOf(t: Long, n: Int)(implicit conn: Conn): List[Obj]

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

    Get List of n rows as objects 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 rows as of transaction t 1031 (after update)
    val List(a1, a2) = Person.name.age.getObjListAsOf(1031)
    a1.name === "Ben"
    a1.age  === 43 // <-- updated
    a2.name === "Liz"
    a2.age  === 37
    
    // Get List of n rows as of transaction t 1031 (after update)
    val List(b1) = Person.name.age.getObjListAsOf(1031)
    b1.name === "Ben"
    b1.age  === 43 // <-- updated
    t

    Long Transaction time t

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    returns

    List[Obj] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetObjList
    See also

    Equivalent asynchronous getAsyncObjListAsOf method.

  390. def getObjListAsOf(t: Long)(implicit conn: Conn): List[Obj]

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

    Get List of all rows as objects 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 data as of transaction t 1028 (after insert)
    val List(a1, a2) = Person.name.age.getObjListAsOf(1028)
    a1.name === "Ben"
    a1.age  === 42
    a2.name === "Liz"
    a2.age  === 37
    
    // Get List of data as of transaction t 1031 (after update)
    val List(b1, b2) = Person.name.age.getObjListAsOf(1031)
    b1.name === "Ben"
    b1.age  === 43 // <-- updated
    b2.name === "Liz"
    b2.age  === 37
    
    // Get List of all rows as of transaction t 1032 (after retract)
    val List(c1) = Person.name.age.getObjListAsOf(1032)
    c1.name === "Liz"
    c1.age  === 37
    t

    Transaction time t

    conn

    Implicit Conn value in scope

    returns

    List[Obj] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetObjList
    See also

    Equivalent asynchronous getAsyncObjListAsOf method.

  391. def getObjListHistory(implicit conn: Conn): List[Obj]

    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.getObjListHistory
      .sortBy(o => (o.t, o.op))
      .map(o => s"${o.age} ${o.t} ${o.op}") === 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

    returns

    List[Obj] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetObjList
    See also

    Equivalent asynchronous getAsyncObjListHistory method.

  392. def getObjListSince(date: Date, n: Int)(implicit conn: Conn): List[Obj]

    Get List of n rows as objects matching molecule since date.

    Get List of n rows as objects 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
    val List(a1, a2, a3) = Person.name.getObjList
    a1.name === "Ann"
    a2.name === "Ben"
    a3.name === "Cay"
    
    // Ben and Cay added since date1
    val List(b1, b2) = Person.name.getObjListSince(date1)
    b1.name === "Ben"
    b2.name === "Cay"
    
    // Ben and Cay added since date1 - only n (1) rows returned
    val List(c1) = Person.name.getObjListSince(date1, 1)
    c1.name === "Ben"
    date

    java.util.Date

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    returns

    List[Obj] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetObjList
    See also

    Equivalent asynchronous getAsyncObjListSince method.

  393. def getObjListSince(date: Date)(implicit conn: Conn): List[Obj]

    Get List of all rows as objects matching molecule since date.

    Get List of all rows as objects 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
    val List(a1, a2, a3) = Person.name.getObjList
    a1.name === "Ann"
    a2.name === "Ben"
    a3.name === "Cay"
    
    // Ben and Cay added since date1
    val List(b1, b2) = Person.name.getObjListSince(date1)
    b1.name === "Ben"
    b2.name === "Cay"
    
    // Cay added since transaction time date2
    val List(c1) = Person.name.getObjListSince(date2)
    c1.name === "Cay"
    
    // Nothing added since transaction time date3
    Person.name.getObjListSince(date3) === List()
    date

    java.util.Date

    conn

    Implicit Conn value in scope

    returns

    List[Obj] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetObjList
    See also

    Equivalent asynchronous getAsyncObjListSince method.

  394. def getObjListSince(tx: TxReport, n: Int)(implicit conn: Conn): List[Obj]

    Get List of n rows as objects matching molecule since tx.

    Get List of n rows as objects 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 getAsyncObjList 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
    val List(a1, a2, a3) = Person.name.getObjList
    a1.name === "Ann"
    a2.name === "Ben"
    a3.name === "Cay"
    
    // Ben and Cay added since tx1
    val List(b1, b2) = Person.name.getObjListSince(tx1)
    b1.name === "Ben"
    b2.name === "Cay"
    
    // Ben and Cay added since tx1 - only n (1) rows returned
    val List(c1) = Person.name.getObjListSince(tx1, 1)
    c1.name === "Ben"
    tx

    TxReport

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    returns

    List[Obj] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetObjList
    See also

    Equivalent asynchronous getAsyncObjListSince method.

  395. def getObjListSince(tx: TxReport)(implicit conn: Conn): List[Obj]

    Get List of all rows as objects matching molecule since tx.

    Get List of all rows as objects 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 getAsyncObjList 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
    val List(a1, a2, a3) = Person.name.getObjList
    a1.name === "Ann"
    a2.name === "Ben"
    a3.name === "Cay"
    
    // Ben and Cay added since transaction time tx1
    val List(b1, b2) = Person.name.getObjListSince(tx1)
    b1.name === "Ben"
    b2.name === "Cay"
    
    // Cay added since transaction time tx2
    val List(c1) = Person.name.getObjListSince(tx2)
    c1.name === "Cay"
    
    // Nothing added since transaction time tx3
    Person.name.getObjListSince(tx3) === List()
    tx

    TxReport

    conn

    Implicit Conn value in scope

    returns

    List[Obj] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetObjList
    See also

    Equivalent asynchronous getAsyncObjListSince method.

  396. def getObjListSince(t: Long, n: Int)(implicit conn: Conn): List[Obj]

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

    Get List of n rows as objects 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
    val List(a1, a2, a3) = Person.name.getObjList
    a1.name === "Ann"
    a2.name === "Ben"
    a3.name === "Cay"
    
    // Ben and Cay added since transaction time t1
    val List(b1, b2) = Person.name.getObjListSince(t1)
    b1.name === "Ben"
    b2.name === "Cay"
    
    // Ben and Cay added since transaction time t1 - only n (1) rows returned
    val List(c1) = Person.name.getObjListSince(t1, 1)
    c1.name === "Ben"
    t

    Transaction time t

    n

    Int Number of rows returned

    conn

    Implicit Conn value in scope

    returns

    List[Obj] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetObjList
    See also

    Equivalent asynchronous getAsyncObjListSince method.

  397. def getObjListSince(t: Long)(implicit conn: Conn): List[Obj]

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

    Get List of all rows as objects 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
    val List(a1, a2, a3) = Person.name.getObjList
    a1.name === "Ann"
    a2.name === "Ben"
    a3.name === "Cay"
    
    // Ben and Cay added since transaction time t1
    val List(b1, b2) = Person.name.getObjListSince(t1)
    b1.name === "Ben"
    b2.name === "Cay"
    
    // Cay added since transaction time t2
    val List(c1) = Person.name.getObjListSince(t2)
    c1.name === "Cay"
    
    // Nothing added since transaction time t3
    Person.name.getObjListSince(t3) === List()
    t

    Transaction time t

    conn

    Implicit Conn value in scope

    returns

    List[Obj] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetObjList
    See also

    Equivalent asynchronous getAsyncObjListSince method.

  398. def getObjListWith(txData: List[_], n: Int)(implicit conn: Conn): List[Obj]

    Get List of n rows as objects matching molecule with applied raw transaction data.

    Get List of n rows as objects 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).getObjList(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

    returns

    List[Obj] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetObjList
    See also

    Equivalent asynchronous getAsyncObjListWith method.

  399. def getObjListWith(txData: List[_])(implicit conn: Conn): List[Obj]

    Get List of all rows as objects matching molecule with applied raw transaction data.

    Get List of all rows as objects 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).getObjList(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

    returns

    List[Obj] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetObjList
    See also

    Equivalent asynchronous getAsyncObjListWith method.

  400. def getObjListWith(n: Int, txMolecules: Seq[Seq[Statement]]*)(implicit conn: Conn): List[Obj]

    Get List of n rows as objects matching molecule with applied molecule transaction data.

    Get List of n rows as objects 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
    val List(p1, p2) = Person.name.likes.getObjList
    p1.name  === "Ben"
    p1.likes === "pasta"
    p2.name  === "Liz"
    p2.likes === "pizza"
    
    
    // Test multiple transactions
    val List(testP1, testP2) = Person.name.likes.getObjListWith(
      Person(ben).likes("sushi").getUpdateTx,
      Person(liz).likes("cake").getUpdateTx
    )
    // Effect: sushi and cake now liked
    testP1.name  === "Ben"
    testP1.likes === "sushi"
    testP2.name  === "Liz"
    testP2.likes === "cake"
    
    // Same as above, but only n (1) rows returned:
    val List(oneTestP) = Person.name.likes.getObjListWith(
      1
      Person(ben).likes("sushi").getUpdateTx,
      Person(liz).likes("cake").getUpdateTx
    )
    // Effect: sushi and cake now liked (but only Ben returned)
    oneTestP.name  === "Ben"
    oneTestP.likes === "sushi"
    
    // Current state is still the same
    val List(p3, p4) = Person.name.likes.getObjList
    p3.name  === "Ben"
    p3.likes === "pasta"
    p4.name  === "Liz"
    p4.likes === "pizza"
    n

    Int Number of rows returned

    txMolecules

    Transaction statements from applied Molecules with test data

    conn

    Implicit Conn value in scope

    returns

    List[Obj] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetObjList
    Note

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

    See also

    Equivalent asynchronous getAsyncObjListWith method.

  401. def getObjListWith(txMolecules: Seq[Seq[Statement]]*)(implicit conn: Conn): List[Obj]

    Get List of all rows as objects matching molecule with applied molecule transaction data.

    Get List of all rows as objects 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
    
    val List(p0) = Person.name.likes.getObjList
    p0.name  === "Ben"
    p0.likes === "pasta"
    
    // Test adding transaction data
    val List(pTest) = Person.name.likes.getObjListWith(
      // Additional transaction data
      Person(ben).likes("sushi").getUpdateTx
    )
    // Effect: Ben would like sushi if tx was applied
    pTest.name  === "Ben"
    pTest.likes === "sushi"
    
    // Current state is still the same
    val List(pAfter) = Person.name.likes.getObjList
    pAfter.name  === "Ben"
    pAfter.likes === "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

    List[Obj] where Obj is an object type having property types matching the attributes of the molecule

    Definition Classes
    GetObjList
    See also

    Equivalent asynchronous getAsyncObjListWith method.

  402. def getQuoted(implicit conn: Conn): String

    Get quoted output

    Get quoted output

    Makes it easy to copy test results into tests for instance.

    Definition Classes
    GetTplList
  403. 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.

  404. 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]]"""

    Peer returns java.util.HashSet Client returns clojure.lang.PersistentVector We unify the type by copying to an ArrayList

    conn

    Implicit Conn value in scope

    returns

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

    Definition Classes
    GetRaw
    See also

    Equivalent asynchronous getAsyncRaw method.

  405. 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

    Equivalent asynchronous getAsyncRawAsOf method.

  406. 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

    Equivalent asynchronous getAsyncRawAsOf method.

  407. 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

    Equivalent asynchronous getAsyncRawAsOf method.

  408. 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

    Equivalent asynchronous getAsyncRawAsOf method.

  409. 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

    Equivalent asynchronous getAsyncRawAsOf method.

  410. 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

    Equivalent asynchronous getAsyncRawAsOf method.

  411. 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

    Equivalent asynchronous getAsyncRawSince method.

  412. 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

    Equivalent asynchronous getAsyncRawSince method.

  413. 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

    Equivalent asynchronous getAsyncRawSince method.

  414. 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

    Equivalent asynchronous getAsyncRawSince method.

  415. 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

    Equivalent asynchronous getAsyncRawSince method.

  416. 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

    Equivalent asynchronous getAsyncRawSince method.

  417. 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

    Equivalent asynchronous getAsyncRawWith method.

  418. 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

    Equivalent asynchronous getAsyncRawWith method.

  419. 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

    Equivalent asynchronous getAsyncRawWith method.

  420. 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

    Equivalent asynchronous getAsyncRawWith method.

  421. def getSaveStmts(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

  422. def getSince(date: Date, n: Int)(implicit conn: Conn): 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

    returns

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

    Definition Classes
    GetTplList
    See also

    Equivalent asynchronous getAsyncSince method.

  423. def getSince(date: Date)(implicit conn: Conn): 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

    returns

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

    Definition Classes
    GetTplList
    See also

    Equivalent asynchronous getAsyncSince method.

  424. def getSince(tx: TxReport, n: Int)(implicit conn: Conn): 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

    returns

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

    Definition Classes
    GetTplList
    See also

    Equivalent asynchronous getAsyncSince method.

  425. def getSince(tx: TxReport)(implicit conn: Conn): 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

    returns

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

    Definition Classes
    GetTplList
    See also

    Equivalent asynchronous getAsyncSince method.

  426. def getSince(t: Long, n: Int)(implicit conn: Conn): 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 t1
    Person.name.getSince(t1) === List("Ben", "Cay")
    
    // Ben and Cay added since transaction time t1 - 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

    returns

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

    Definition Classes
    GetTplList
    See also

    Equivalent asynchronous getAsyncSince method.

  427. def getSince(t: Long)(implicit conn: Conn): 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 t1
    Person.name.getSince(t1) === List("Ben", "Cay")
    
    // Cay added since transaction time t2
    Person.name.getSince(t2) === List("Cay")
    
    // Nothing added since transaction time t3
    Person.name.getSince(t3) === Nil
    t

    Transaction time t

    conn

    Implicit Conn value in scope

    returns

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

    Definition Classes
    GetTplList
    See also

    Equivalent asynchronous getAsyncSince method.

  428. def getUpdateStmts(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

  429. def getWith(txData: List[_], n: Int)(implicit conn: Conn): 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

    returns

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

    Definition Classes
    GetTplList
    See also

    Equivalent asynchronous getAsyncWith method.

  430. def getWith(txData: List[_])(implicit conn: Conn): 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

    returns

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

    Definition Classes
    GetTplList
    See also

    Equivalent asynchronous getAsyncWith method.

  431. def getWith(n: Int, txMolecules: Seq[Seq[Statement]]*)(implicit conn: Conn): 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

    returns

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

    Definition Classes
    GetTplList
    Note

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

    See also

    Equivalent asynchronous getAsyncWith method.

  432. def getWith(txMolecules: Seq[Seq[Statement]]*)(implicit conn: Conn): 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

    returns

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

    Definition Classes
    GetTplList
    See also

    Equivalent asynchronous getAsyncWith method.

  433. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  434. def inspectGet(implicit conn: Conn): Unit

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

    Inspect 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). OBS: printing raw Date's (Clojure Instant) will miss the time-zone

    conn

    Implicit Conn value in scope

    Definition Classes
    ShowInspect
  435. def inspectGetAsOf(date: Date)(implicit conn: Conn): Unit

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

    Inspect 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 scsope

    Definition Classes
    ShowInspect
  436. def inspectGetAsOf(tx: TxReport)(implicit conn: Conn): Unit

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

    Inspect 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
    ShowInspect
  437. def inspectGetAsOf(t: Long)(implicit conn: Conn): Unit

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

    Inspect 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
    ShowInspect
  438. def inspectGetHistory(implicit conn: Conn): Unit

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

    Inspect 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
    ShowInspect
  439. def inspectGetSince(date: Date)(implicit conn: Conn): Unit

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

    Inspect 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
    ShowInspect
  440. def inspectGetSince(tx: TxReport)(implicit conn: Conn): Unit

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

    Inspect 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
    ShowInspect
  441. def inspectGetSince(t: Long)(implicit conn: Conn): Unit

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

    Inspect 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
    ShowInspect
  442. def inspectGetWith(txData: List[List[_]])(implicit conn: Conn): Unit

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

    Inspect 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
    ShowInspect
  443. def inspectGetWith(txMolecules: Seq[Seq[Statement]]*)(implicit conn: Conn): Unit

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

    Inspect 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
    ShowInspect
  444. def inspectSave(implicit conn: Conn): Unit

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

    Inspect 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
    ShowInspect
  445. def inspectUpdate(implicit conn: Conn): Unit

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

    Inspect 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
    ShowInspect
  446. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  447. lazy val localOffset: String
    Definition Classes
    DateHandling
  448. lazy val localZoneOffset: ZoneOffset
    Definition Classes
    DateHandling
  449. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  450. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  451. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  452. final def o(opt: Option[Any]): String
    Attributes
    protected
    Definition Classes
    Helpers
  453. final def os(opt: Option[Set[_]]): String
    Attributes
    protected
    Definition Classes
    Helpers
  454. def quote(value: Any): String
    Attributes
    protected
    Definition Classes
    Quoted
  455. def quote2(value: Any): String
    Attributes
    protected
    Definition Classes
    Quoted
  456. def row2obj(row: List[AnyRef]): Obj
    Attributes
    protected
    Definition Classes
    CastHelpers
  457. def row2tpl(row: List[AnyRef]): Tpl
    Attributes
    protected
    Definition Classes
    CastHelpers
  458. 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.

  459. 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.

  460. final def seq[T](values: Seq[T]): String
    Attributes
    protected
    Definition Classes
    Helpers
  461. def str2date(s: String, zoneOffset: ZoneOffset = localZoneOffset): Date
    Definition Classes
    DateHandling
  462. def str2zdt(s: String, zoneOffset: ZoneOffset = localZoneOffset): ZonedDateTime
    Definition Classes
    DateHandling
  463. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  464. final def time(n: Int, prev: Int = 0): Unit
    Attributes
    protected
    Definition Classes
    Helpers
  465. def toJavaList(scalaList: Seq[List[_]]): List[List[_]]
    Definition Classes
    JavaUtil
  466. def toString(): String
    Definition Classes
    AnyRef → Any
  467. def truncateDateStr(dateStr: String): String
    Definition Classes
    DateHandling
  468. final def tupleToSeq(arg: Any): Seq[Any]
    Attributes
    protected
    Definition Classes
    Helpers
  469. def unescStr(s: String): String
    Definition Classes
    Helpers
  470. def untupled(rawData: Iterable[Seq[Any]]): Seq[Seq[Any]]
    Attributes
    protected
  471. 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

  472. 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

  473. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  474. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  475. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  476. lazy val zone: ZoneId
    Definition Classes
    DateHandling
  477. object mkDate
    Attributes
    protected
    Definition Classes
    Helpers
  478. object Util
    Definition Classes
    JavaUtil

Inherited from ShowInspect[Obj, Tpl]

Inherited from GetAsyncRaw

Inherited from GetAsyncObjList[Obj, Tpl]

Inherited from GetAsyncObjIterable[Obj, Tpl]

Inherited from GetAsyncObjArray[Obj, Tpl]

Inherited from GetAsyncTplList[Obj, Tpl]

Inherited from GetAsyncTplIterable[Obj, Tpl]

Inherited from GetAsyncTplArray[Obj, Tpl]

Inherited from GetObjList[Obj, Tpl]

Inherited from GetObjIterable[Obj, Tpl]

Inherited from GetObjArray[Obj, Tpl]

Inherited from GetRaw

Inherited from GetTplList[Obj, Tpl]

Inherited from Quoted

Inherited from GetTplIterable[Obj, Tpl]

Inherited from GetTplArray[Obj, Tpl]

Inherited from JavaUtil

Inherited from CastHelpers[Obj, Tpl]

Inherited from CastHelpersAggr

Inherited from CastHelpersOptNested

Inherited from Helpers

Inherited from DateHandling

Inherited from RegexMatching

Inherited from Molecule

Inherited from AnyRef

Inherited from Any

getObjArrayAsOf

getObjArraySince

getObjArrayWith

getObjIterableAsOf

getObjIterableSince

getObjIterableWith

get

getAsync

getAsOf

getAsyncAsOf

getArrayAsOf

getAsyncArrayAsOf

getIterableAsOf

getAsyncIterableAsOf

getRawAsOf

getAsyncRawAsOf

getSince

getAsyncSince

getArraySince

getAsyncArraySince

getIterableSince

getAsyncIterableSince

getRawSince

getAsyncRawSince

getWith

getAsyncWith

getArrayWith

getAsyncArrayWith

getIterableWith

getAsyncIterableWith

getRawWith

getAsyncRawWith

getHistory

(only implemented to return List of tuples)

save

insert

update

getTx

Inspect get

Molecule getter inspecting methods.

Inspect operation

Molecule operation inspecting methods (no effect on live db).

Internal (but public) model/query representations

Ungrouped