trait GetAsyncArray[Tpl] extends AnyRef
Asynchronous data getter methods on molecules returning Future[Array[Tpl]]
.
The fastest way of getting a large typed data set since data is applied to a super fast pre-allocated Array.
The Array can then be traversed with a fast while
loop.
// Map over the Future Ns.int.getAsyncArray.map { result => result === Array(1, 2, 3) // Fast while loop var i = 0 val length = result.length while(i < length) { println(result(i)) // Do stuff with row... i += 1 } }
Each asynchronous getter in this package simply wraps the result of its equivalent synchronous getter (in the
get
package) in a Future. getAsyncArrayAsOf
thus wraps the result of getArrayAsOf
in a Future and so on.
- Self Type
- Molecule[Tpl] with GetArray[Tpl]
- Source
- GetAsyncArray.scala
- Grouped
- Alphabetic
- By Inheritance
- GetAsyncArray
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def getAsyncArray(n: Int)(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[Array[Tpl]]
Get
Future
withArray
of n rows as tuples matching molecule.Get
Future
withArray
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
- def getAsyncArray(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[Array[Tpl]]
Get
Future
withArray
of all rows as tuples matching molecule.Get
Future
withArray
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
- def getAsyncArrayAsOf(date: Date, n: Int)(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[Array[Tpl]]
Get
Future
withArray
of n rows as tuples matching molecule as of date.Get
Future
withArray
of n rows as tuples matching molecule as of date.
Get data at a human point in time (a java.util.Date).
For more info and code examples see equivalent synchronous getArrayAsOf method.
Getting a pre-allocated Array populated with typed data is the fastest way to query Datomic with Molecule. Looping the Array in a while loop with a mutable index pointer will also be the fastest way to traverse the data set.
The Array is only populated with n rows of type-casted tuples.- date
java.util.Date
- n
Int Number of rows returned
- conn
Implicit Conn value in scope
- tplType
Implicit
ClassTag[Tpl]
to capture Tuple type for Array- returns
Array[Tpl] where Tpl is a tuple of data matching molecule
- See also
Manual on
asof
/since
- def getAsyncArrayAsOf(date: Date)(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[Array[Tpl]]
Get
Future
withArray
of all rows as tuples matching molecule as of date.Get
Future
withArray
of all rows as tuples matching molecule as of date.
Get data at a human point in time (a java.util.Date).
For more info and code examples see equivalent synchronous getArrayAsOf method.
Getting a pre-allocated Array populated with typed data is the fastest way to query Datomic with Molecule. Looping the Array in a while loop with a mutable index pointer will also be the fastest way to traverse the data set.- date
java.util.Date
- conn
Implicit Conn value in scope
- tplType
Implicit
ClassTag[Tpl]
to capture Tuple type for Array- returns
Array[Tpl] where Tpl is a tuple of data matching molecule
- See also
Manual on
asof
/since
- def getAsyncArrayAsOf(tx: TxReport, n: Int)(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[Array[Tpl]]
Get
Future
withArray
of n rows as tuples matching molecule as of tx.Get
Future
withArray
of n rows as tuples matching molecule as of tx.
Datomic's internalasOf
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 likeget
,update
,retract
etc.
For more info and code examples see equivalent synchronous getArrayAsOf method.
Getting a pre-allocated Array populated with typed data is the fastest way to query Datomic with Molecule. Looping the Array in a while loop with a mutable index pointer will also be the fastest way to traverse the data set.
The Array is only populated with n rows of type-casted tuples.- tx
TxReport (returned from all molecule transaction operations)
- n
Int Number of rows returned
- conn
Implicit Conn value in scope
- tplType
Implicit
ClassTag[Tpl]
to capture Tuple type for Array- returns
Array[Tpl] where Tpl is a tuple of data matching molecule
- See also
Manual on
asof
/since
- def getAsyncArrayAsOf(tx: TxReport)(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[Array[Tpl]]
Get
Future
withArray
of all rows as tuples matching molecule as of tx.Get
Future
withArray
of all rows as tuples matching molecule as of tx.
Datomic's internalasOf
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 likeget
,update
,retract
etc.
For more info and code examples see equivalent synchronous getArrayAsOf method.
Getting a pre-allocated Array populated with typed data is the fastest way to query Datomic with Molecule. Looping the Array in a while loop with a mutable index pointer will also be the fastest way to traverse the data set.- tx
TxReport (returned from all molecule transaction operations)
- conn
Implicit Conn value in scope
- tplType
Implicit
ClassTag[Tpl]
to capture Tuple type for Array- returns
Array[Tpl] where Tpl is a tuple of data matching molecule
- See also
Manual on
asof
/since
- def getAsyncArrayAsOf(t: Long, n: Int)(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[Array[Tpl]]
Get
Future
withArray
of n rows as tuples matching molecule as of transaction timet
.Get
Future
withArray
of n rows as tuples matching molecule as of transaction timet
.
Transaction timet
is an auto-incremented transaction number assigned internally by Datomic.
t
can for instance be retrieved in a getHistory call for an attribute and then be used to get data as of that point in time (including that transaction).
For more info and code examples see equivalent synchronous getArrayAsOf method.
Getting a pre-allocated Array populated with typed data is the fastest way to query Datomic with Molecule. Looping the Array in a while loop with a mutable index pointer will also be the fastest way to traverse the data set.
The Array is only populated with n rows of type-casted tuples.- t
Long Transaction time t
- n
Int Number of rows returned
- conn
Implicit Conn value in scope
- tplType
Implicit
ClassTag[Tpl]
to capture Tuple type for Array- returns
Array[Tpl] where Tpl is a tuple of data matching molecule
- See also
Manual on
asof
/since
- def getAsyncArrayAsOf(t: Long)(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[Array[Tpl]]
Get
Future
withArray
of all rows as tuples matching molecule as of transaction timet
.Get
Future
withArray
of all rows as tuples matching molecule as of transaction timet
.
Transaction timet
is an auto-incremented transaction number assigned internally by Datomic.
t
can for instance be retrieved in a getHistory call for an attribute and then be used to get data as of that point in time (including that transaction).
For more info and code examples see equivalent synchronous getArrayAsOf method.
Getting a pre-allocated Array populated with typed data is the fastest way to query Datomic with Molecule. Looping the Array in a while loop with a mutable index pointer will also be the fastest way to traverse the data set.- t
Transaction time t
- conn
Implicit Conn value in scope
- tplType
Implicit
ClassTag[Tpl]
to capture Tuple type for Array- returns
Array[Tpl] where Tpl is a tuple of data matching molecule
- See also
Manual on
asof
/since
- def getAsyncArraySince(date: Date, n: Int)(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[Array[Tpl]]
Get
Future
withArray
of n rows as tuples matching molecule since date.Get
Future
withArray
of n rows as tuples matching molecule since date.
Get data added/retracted since a human point in time (a java.util.Date).
For more info and code examples see equivalent synchronous getArraySince method.
Getting a pre-allocated Array populated with typed data is the fastest way to query Datomic with Molecule. Looping the Array in a while loop with a mutable index pointer will also be the fastest way to traverse the data set.
The Array is only populated with n rows of type-casted tuples.- date
java.util.Date
- n
Int Number of rows returned
- conn
Implicit Conn value in scope
- tplType
Implicit
ClassTag[Tpl]
to capture Tuple type for Array- returns
Array[Tpl] where Tpl is a tuple of data matching molecule
- See also
Manual on
asof
/since
- def getAsyncArraySince(date: Date)(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[Array[Tpl]]
Get
Future
withArray
of all rows as tuples matching molecule since date.Get
Future
withArray
of all rows as tuples matching molecule since date.
Get data added/retracted since a human point in time (a java.util.Date).
For more info and code examples see equivalent synchronous getArraySince method.
Getting a pre-allocated Array populated with typed data is the fastest way to query Datomic with Molecule. Looping the Array in a while loop with a mutable index pointer will also be the fastest way to traverse the data set.- date
java.util.Date
- conn
Implicit Conn value in scope
- tplType
Implicit
ClassTag[Tpl]
to capture Tuple type for Array- returns
Array[Tpl] where Tpl is a tuple of data matching molecule
- See also
Manual on
asof
/since
- def getAsyncArraySince(tx: TxReport, n: Int)(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[Array[Tpl]]
Get
Future
withArray
of n rows as tuples matching molecule since tx.Get
Future
withArray
of n rows as tuples matching molecule since tx.
Datomic's internalsince
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 likeget
,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
- 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
- See also
Manual on
asof
/since
- def getAsyncArraySince(tx: TxReport)(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[Array[Tpl]]
Get
Future
withArray
of all rows as tuples matching molecule since tx.Get
Future
withArray
of all rows as tuples matching molecule since tx.
Datomic's internalsince
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 likeget
,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
- 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
- See also
Manual on
asof
/since
- def getAsyncArraySince(t: Long, n: Int)(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[Array[Tpl]]
Get
Future
withArray
of n rows as tuples matching molecule since transaction timet
.Get
Future
withArray
of n rows as tuples matching molecule since transaction timet
.
Transaction timet
is an auto-incremented transaction number assigned internally by Datomic.
t
can for instance be retrieved by callingt
on the tx report returned from transactional operations and then be used to get data since that point in time (excluding that transaction).
For more info and code examples see equivalent synchronous getArraySince method.
Getting a pre-allocated Array populated with typed data is the fastest way to query Datomic with Molecule. Looping the Array in a while loop with a mutable index pointer will also be the fastest way to traverse the data set.
The Array is only populated with n rows of type-casted tuples.- t
Transaction time t
- n
Int Number of rows returned
- conn
Implicit Conn value in scope
- tplType
Implicit
ClassTag[Tpl]
to capture Tuple type for Array- returns
Array[Tpl] where Tpl is a tuple of data matching molecule
- See also
Manual on
asof
/since
- def getAsyncArraySince(t: Long)(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[Array[Tpl]]
Get
Future
withArray
of all rows as tuples matching molecule since transaction timet
.Get
Future
withArray
of all rows as tuples matching molecule since transaction timet
.
Transaction timet
is an auto-incremented transaction number assigned internally by Datomic.
t
can for instance be retrieved by callingt
on the tx report returned from transactional operations and then be used to get data since that point in time (excluding that transaction).
For more info and code examples see equivalent synchronous getArraySince method.
Getting a pre-allocated Array populated with typed data is the fastest way to query Datomic with Molecule. Looping the Array in a while loop with a mutable index pointer will also be the fastest way to traverse the data set.- t
Transaction time t
- conn
Implicit Conn value in scope
- tplType
Implicit
ClassTag[Tpl]
to capture Tuple type for Array- returns
Array[Tpl] where Tpl is a tuple of data matching molecule
- See also
Manual on
asof
/since
- def getAsyncArrayWith(txData: List[_], n: Int)(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[Array[Tpl]]
Get
Future
withArray
of n rows as tuples matching molecule with applied raw transaction data.Get
Future
withArray
of n rows as tuples matching molecule with applied raw transaction data.
Apply raw transaction data to in-memory "branch" of db without affecting db.
For more info and code examples see equivalent synchronous getArrayWith method.
Getting a pre-allocated Array populated with typed data is the fastest way to query Datomic with Molecule. Looping the Array in a while loop with a mutable index pointer will also be the fastest way to traverse the data set.
The Array is only populated with n rows of type-casted tuples.- txData
Raw transaction data as java.util.List[Object]
- n
Int Number of rows returned
- conn
Implicit Conn value in scope
- tplType
Implicit
ClassTag[Tpl]
to capture Tuple type for Array- returns
Array[Tpl] where Tpl is a tuple of data matching molecule
- See also
Manual on
with
- def getAsyncArrayWith(txData: List[_])(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[Array[Tpl]]
Get
Future
withArray
of all rows as tuples matching molecule with applied raw transaction data.Get
Future
withArray
of all rows as tuples matching molecule with applied raw transaction data.
Apply raw transaction data to in-memory "branch" of db without affecting db.
For more info and code examples see equivalent synchronous getArrayWith method.
Getting a pre-allocated Array populated with typed data is the fastest way to query Datomic with Molecule. Looping the Array in a while loop with a mutable index pointer will also be the fastest way to traverse the data set.- txData
Raw transaction data as java.util.List[Object]
- conn
Implicit Conn value in scope
- tplType
Implicit
ClassTag[Tpl]
to capture Tuple type for Array- returns
Array[Tpl] where Tpl is a tuple of data matching molecule
- See also
Manual on
with
- def getAsyncArrayWith(n: Int, txMolecules: Seq[Seq[Statement]]*)(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[Array[Tpl]]
Get
Future
withArray
of n rows as tuples matching molecule with applied molecule transaction data.Get
Future
withArray
of n rows as tuples matching molecule with applied molecule transaction data.
Apply one or more molecule transactions to in-memory "branch" of db without affecting db.
For more info and code examples see equivalent synchronous getArrayWith method.
Getting a pre-allocated Array populated with typed data is the fastest way to query Datomic with Molecule. Looping the Array in a while loop with a mutable index pointer will also be the fastest way to traverse the data set.
The Array is only populated with n rows of type-casted tuples.- n
Int Number of rows returned
- txMolecules
Transaction statements from applied Molecules with test data
- conn
Implicit Conn value in scope
- tplType
Implicit
ClassTag[Tpl]
to capture Tuple type for Array- returns
Array[Tpl] where Tpl is a tuple of data matching molecule
- Note
Note how the
n
parameter has to come before thetxMolecules
vararg.- See also
Manual on
with
- def getAsyncArrayWith(txMolecules: Seq[Seq[Statement]]*)(implicit conn: Conn, tplType: ClassTag[Tpl]): Future[Array[Tpl]]
Get
Future
withArray
of all rows as tuples matching molecule with applied molecule transaction data.Get
Future
withArray
of all rows as tuples matching molecule with applied molecule transaction data.
Apply one or more molecule transactions to in-memory "branch" of db without affecting db.
For more info and code examples see equivalent synchronous getArrayWith method.
Multiple transactions can be applied to test more complex what-if scenarios!
Getting a pre-allocated Array populated with typed data is the fastest way to query Datomic with Molecule. Looping the Array in a while loop with a mutable index pointer will also be the fastest way to traverse the data set.- txMolecules
Transaction statements from applied Molecules with test data
- conn
Implicit Conn value in scope
- tplType
Implicit
ClassTag[Tpl]
to capture Tuple type for Array- returns
Array[Tpl] where Tpl is a tuple of data matching molecule
- See also
Manual on
with
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
Documentation/API for the Molecule library - a meta DSL for the Datomic database.
Manual | scalamolecule.org | Github | Forum