trait GetAsyncIterable[Tpl] extends AnyRef
Asynchronous data getter methods on molecules returning Future[Iterable[Tpl]]
.
Suitable for data sets that are lazily consumed.
val iterableFuture: Future[Iterable[(String, Int)]] = Person.name.age.getAsyncIterable for { iterable <- iterableFuture } yield { iterable.iterator.next === ("Ben" 42) }
Each asynchronous getter in this package simply wraps the result of its equivalent synchronous getter (in the
get
package) in a Future. getAsyncIterableAsOf
thus wraps the result of getIterableAsOf
in a Future and so on.
- Self Type
- Molecule[Tpl] with GetIterable[Tpl]
- Source
- GetAsyncIterable.scala
- Grouped
- Alphabetic
- By Inheritance
- GetAsyncIterable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
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( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
getAsyncIterable(implicit conn: Conn): Future[Iterable[Tpl]]
Get
Future
withIterable
of all rows as tuples matching the molecule.Get
Future
withIterable
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
Iterable[Tpl] where Tpl is a tuple of types matching the attributes of the molecule
-
def
getAsyncIterableAsOf(date: Date)(implicit conn: Conn): Future[Iterable[Tpl]]
Get
Future
withIterable
of all rows as tuples matching molecule as of date.Get
Future
withIterable
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
Iterable[Tpl] where Tpl is tuple of data matching molecule
- See also
Manual on
asof
/since
-
def
getAsyncIterableAsOf(tx: TxReport)(implicit conn: Conn): Future[Iterable[Tpl]]
Get
Future
withIterable
of all rows as tuples matching molecule as of tx.Get
Future
withIterable
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 getIterableAsOf method.- 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
- See also
Manual on
asof
/since
-
def
getAsyncIterableAsOf(t: Long)(implicit conn: Conn): Future[Iterable[Tpl]]
Get
Future
withIterable
of all rows as tuples matching molecule as of transaction timet
.Get
Future
withIterable
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).
CallgetIterableAsOf
for large result sets to maximize runtime performance. Data is lazily type-casted on each call tonext
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
Iterable[Tpl] where Tpl is tuple of data matching molecule
- See also
Manual on
asof
/since
-
def
getAsyncIterableSince(date: Date)(implicit conn: Conn): Future[Iterable[Tpl]]
Get
Future
withIterable
of all rows as tuples matching molecule since date.Get
Future
withIterable
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
Iterable[Tpl] where Tpl is tuple of data matching molecule
- See also
Manual on
asof
/since
-
def
getAsyncIterableSince(tx: TxReport)(implicit conn: Conn): Future[Iterable[Tpl]]
Get
Future
withIterable
of all rows as tuples matching molecule since tx.Get
Future
withIterable
of all rows as tuples matching molecule since tx.
Datomic's internalsince
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 likeget
,update
,retract
etc.
For more info and code examples see equivalent synchronous getIterableSince method.- tx
- conn
Implicit Conn value in scope
- returns
Iterable[Tpl] where Tpl is tuple of data matching molecule
- See also
Manual on
asof
/since
-
def
getAsyncIterableSince(t: Long)(implicit conn: Conn): Future[Iterable[Tpl]]
Get
Future
withIterable
of all rows as tuples matching molecule since transaction timet
.Get
Future
withIterable
of all rows as tuples matching molecule since transaction timet
.
Transaction timet
is an auto-incremented transaction number assigned internally by Datomic.
CallgetIterableSince
for large result sets to maximize runtime performance. Data is lazily type-casted on each call tonext
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
Iterable[Tpl] where Tpl is tuple of data matching molecule
- See also
Manual on
asof
/since
-
def
getAsyncIterableWith(txData: List[_])(implicit conn: Conn): Future[Iterable[Tpl]]
Get
Future
withIterable
of all rows as tuples matching molecule with applied raw transaction data.Get
Future
withIterable
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
- See also
Manual on
with
-
def
getAsyncIterableWith(txMolecules: Seq[Seq[Statement]]*)(implicit conn: Conn): Future[Iterable[Tpl]]
Get
Future
withIterable
of all rows as tuples matching molecule with applied molecule transaction data.Get
Future
withIterable
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
- See also
Manual on
with
-
final
def
getClass(): Class[_]
- 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( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
Documentation/API for the Molecule library - a meta DSL for the Datomic database.
Manual | scalamolecule.org | Github | Forum