package getTpl
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
whileloop - 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).
- Source
- package.scala
- See also
equivalent asynchronous getters in the getAsyncTpl package.
Type Members
-
trait
GetTplArray[Obj, Tpl] extends JavaUtil
Data getter methods on molecules returning
Array[Tpl].Data getter methods on molecules returning
Array[Tpl].
The fastest way of getting a large typed data set. Can then be traversed with a fastwhileloop. -
trait
GetTplIterable[Obj, Tpl] extends JavaUtil
Data getter methods on molecules that return Iterable[Tpl].
Data getter methods on molecules that return Iterable[Tpl].
Suitable for data sets that are lazily consumed. -
trait
GetTplList[Obj, Tpl] extends GetTplArray[Obj, Tpl] with JavaUtil with Quoted
Default data getter methods on molecules that return List[Tpl].
Default data getter methods on molecules that return List[Tpl].
For expected smaller result sets it's convenient to return Lists of tuples of data. Considered as the default getter, no postfix has been added (getinstead ofgetList).

Documentation/API for the Molecule library - a meta DSL for the Datomic database.
scalamolecule.org | Github | Forum