Packages

  • package root

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

    Manual | scalamolecule.org | Github | Forum

    Definition Classes
    root
  • package molecule

    Molecule library - a Scala meta-DSL for the Datomic database.

    Molecule library - a Scala meta-DSL for the Datomic database.

    See api package for various api imports to start using Molecule.

    Sub-packages

    api Molecule API.
    ast Internal Molecule ASTs.
    boilerplate Internal interfaces for auto-generated DSL boilerplate code.
    composition    Builder methods to compose molecules.
    exceptions Exceptions thrown by Molecule.
    expression Attribute expressions and operations.
    facade Molecule facades to Datomic.
    factory Implicit macro methods `m` to instantiate molecules from custom DSL molecule constructs.
    input Input molecules awaiting input.
    macros Internal macros generating molecule code from custom DSL molecule constructs.
    generic Interfaces to generic information about datoms and Datomic database.
    ops Internal operational helpers for transforming DSL to molecule.
    schema Schema definition DSL.
    transform Internal transformers from DSL to Model/Query/Transaction.
    util Internal Java database functions for Datomic.

    Definition Classes
    root
  • package api
    Definition Classes
    molecule
  • package getAsync

    Asynchronous getter methods to retrieve data from Datomic.

    Asynchronous getter methods to retrieve data from Datomic.

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

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

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

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

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

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

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

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

    Definition Classes
    api
    See also

    equivalent synchronous getters in the get package.

  • GetAsyncArray
  • GetAsyncIterable
  • GetAsyncJson
  • GetAsyncList
  • GetAsyncRaw

trait GetAsyncRaw extends AnyRef

Asynchronous data getter methods on molecules returning raw untyped Datomic data.

Returns a Future with raw untyped java.util.Collection[java.util.List[Object]] directly from Datomic and is therefore the fastest (but untyped) way of retrieving data. Can be useful where typed data is not needed.

val rawDataFuture: Future[java.util.Colleciton[java.util.List[Object]] = Person.name.age.getAsyncRaw
for {
  rawData <- rawDataFuture
} yield {
  rawData.toString === """[["Ben" 42]["Liz" 37]]"""
}

Each asynchronous getter in this package simply wraps the result of its equivalent synchronous getter (in the get package) in a Future. getAsyncRawAsOf thus wraps the result of getRawAsOf in a Future and so on.

Self Type
GetAsyncRaw with MoleculeBase with GetRaw
Source
GetAsyncRaw.scala
Linear Supertypes
AnyRef, Any
Type Hierarchy
Ordering
  1. Grouped
  2. Alphabetic
  3. By Inheritance
Inherited
  1. GetAsyncRaw
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  9. 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]]

  10. 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]]

  11. 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]]

    See also

    Manual on asof/since

  12. 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]]

    See also

    Manual on asof/since

  13. 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]]

    See also

    Manual on asof/since

  14. 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]]

    See also

    Manual on asof/since

  15. 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]]

    See also

    Manual on asof/since

  16. 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]]

    See also

    Manual on asof/since

  17. 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]]

    See also

    Manual on asof/since

  18. 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]]

    See also

    Manual on asof/since

  19. 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]]

    See also

    Manual on asof/since

  20. 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]]

    See also

    Manual on asof/since

  21. 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]]

    See also

    Manual on asof/since

  22. 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]]

    See also

    Manual on asof/since

  23. 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]]

    See also

    Manual on with

  24. 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]]

    See also

    Manual on with

  25. 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]]

    Note

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

    See also

    Manual on with

  26. 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]]

    See also

    Manual on with

  27. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  28. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  29. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  30. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  31. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  32. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  33. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  34. def toString(): String
    Definition Classes
    AnyRef → Any
  35. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  36. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  37. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from AnyRef

Inherited from Any

getAsync

getAsyncRawAsOf

getAsyncRawSince

getAsyncRawWith

Ungrouped