abstract class Molecule_0_13[Obj, A, B, C, D, E, F, G, H, I, J, K, L, M] extends Molecule_0[Obj, (A, B, C, D, E, F, G, H, I, J, K, L, M)]
- Grouped
- Alphabetic
- By Inheritance
- Molecule_0_13
- Molecule_0
- ShowInspect
- JavaConversions
- GetJson
- JavaUtil
- GetObjs
- GetTpls
- ColOps
- JsonOptNested
- JsonAggr
- JsonTypes
- JsonBase
- CastOptNested
- CastAggr
- CastTypes
- Marshalling
- Helpers
- DateHandling
- RegexMatching
- Molecule
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
Type Members
-
trait
getInsertStmts extends AnyRef
Get transaction statements of a call to
inserton a molecule (without affecting the db).Get transaction statements of a call to
inserton a molecule (without affecting the db).- returns
Transaction statements
- Definition Classes
- Molecule_0
-
trait
insert extends AnyRef
Insert one or more rows of data matching a molecule.
Insert one or more rows of data matching a molecule.
ReturnsFuturewith 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:val singleInsertFuture: Future[TxReport] = Person.name.age.insert("Ann", 28) // Insert multiple rows of data. Accepts Iterable[Tpl] val multipleInsertFuture: Future[TxReport] = Person.name.age insert List( ("Ben", 42), ("Liz", 37) ) for { // 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) ) _ <- Person.name.age.get.map(_ ==> List( ("Ann", 28), ("Ben", 42), ("Liz", 37) )) } yield ()
The insert operation is asynchronous and non-blocking. Internally calls Datomic's asynchronous API.
- Definition Classes
- Molecule_0
-
trait
inspectInsert extends AnyRef
Inspect call to
inserton a molecule (without affecting the db).Inspect call to
inserton a molecule (without affecting the db).
Prints internal molecule transformation representations to output:
Model --> Generic statements --> Datomic statements- Definition Classes
- Molecule_0
-
class
log extends AnyRef
- Definition Classes
- Helpers
-
class
AsJava[A] extends AnyRef
Generic class containing the
asJavaconverter methodGeneric class containing the
asJavaconverter method- Definition Classes
- JavaConversions
-
class
AsJavaCollection[A] extends AnyRef
Generic class containing the
asJavaCollectionconverter methodGeneric class containing the
asJavaCollectionconverter method- Definition Classes
- JavaConversions
-
class
AsJavaDictionary[K, V] extends AnyRef
Generic class containing the
asJavaDictionaryconverter methodGeneric class containing the
asJavaDictionaryconverter method- Definition Classes
- JavaConversions
-
class
AsJavaEnumeration[A] extends AnyRef
Generic class containing the
asJavaEnumerationconverter methodGeneric class containing the
asJavaEnumerationconverter method- Definition Classes
- JavaConversions
-
class
AsScala[A] extends AnyRef
Generic class containing the
asScalaconverter methodGeneric class containing the
asScalaconverter method- Definition Classes
- JavaConversions
-
implicit
class
raw2list extends AnyRef
- Definition Classes
- JavaUtil
-
implicit
class
Regex extends AnyRef
- Definition Classes
- RegexMatching
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
-
def
_datalog: String
Datalog query.
Datalog query.
Molecule transforms custom boilerplate DSL constructs to Datomic queries in 3 steps:
Custom DSL molecule --> Model --> Query --> Datalog query- Definition Classes
- Marshalling → Molecule
-
def
_getInsertStmts(conn: Future[Conn], dataRows: Iterable[Seq[Any]])(implicit ec: ExecutionContext): Future[Seq[Statement]]
- Attributes
- protected
- Definition Classes
- Molecule_0
-
def
_inputThrowable: Option[Throwable]
- Definition Classes
- Marshalling → Molecule
-
def
_insert(conn: Future[Conn], dataRows: Iterable[Seq[Any]])(implicit ec: ExecutionContext): Future[TxReport]
- Attributes
- protected
- Definition Classes
- Molecule_0
-
def
_inspectInsert(conn: Future[Conn], dataRows: Iterable[Seq[Any]]): Future[Unit]
- Attributes
- protected
- Definition Classes
- ShowInspect
-
def
_model: Model
Internal Model representation of a molecule.
Internal Model representation of a molecule.
Molecule transforms custom boilerplate DSL constructs to Datomic queries in 3 steps:
Custom DSL molecule --> Model --> Query --> Datalog query- Definition Classes
- Marshalling → Molecule
-
def
_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 --> Datalog query- Definition Classes
- Marshalling → Molecule
-
def
appendEscapedString(sb: StringBuffer, s: String): Unit
- Attributes
- protected
- Definition Classes
- JsonBase
-
macro
def
apply(body: (Obj) ⇒ Unit): Future[List[DynamicMolecule with Obj]]
- Definition Classes
- Molecule_0
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
implicit
def
asJavaCollectionConverter[A](i: Iterable[A]): AsJavaCollection[A]
Adds an
asJavaCollectionmethod that implicitly converts a ScalaIterableto an immutable JavaCollection.Adds an
asJavaCollectionmethod that implicitly converts a ScalaIterableto an immutable JavaCollection.- Definition Classes
- JavaConversions
-
implicit
def
asJavaDictionaryConverter[K, V](m: Map[K, V]): AsJavaDictionary[K, V]
Adds an
asJavaDictionarymethod that implicitly converts a Scala mutableMapto a JavaDictionary.Adds an
asJavaDictionarymethod that implicitly converts a Scala mutableMapto a JavaDictionary.- Definition Classes
- JavaConversions
-
implicit
def
asJavaEnumerationConverter[A](i: Iterator[A]): AsJavaEnumeration[A]
Adds an
asJavaEnumerationmethod that implicitly converts a ScalaIteratorto a JavaEnumeration.Adds an
asJavaEnumerationmethod that implicitly converts a ScalaIteratorto a JavaEnumeration.- Definition Classes
- JavaConversions
-
def
asJavaIterable[A](i: Iterable[A]): Iterable[A]
- Definition Classes
- JavaConversions
-
implicit
def
asJavaIterableConverter[A](i: Iterable[A]): AsJava[Iterable[A]]
Adds an
asJavamethod that implicitly converts a ScalaIterableto a JavaIterable.Adds an
asJavamethod that implicitly converts a ScalaIterableto a JavaIterable.- Definition Classes
- JavaConversions
-
def
asJavaIterator[A](i: Iterator[A]): Iterator[A]
- Definition Classes
- JavaConversions
-
implicit
def
asJavaIteratorConverter[A](i: Iterator[A]): AsJava[Iterator[A]]
Adds an
asJavamethod that implicitly converts a ScalaIteratorto a JavaIterator.Adds an
asJavamethod that implicitly converts a ScalaIteratorto a JavaIterator.- Definition Classes
- JavaConversions
-
def
asScalaBuffer[A](l: List[A]): Buffer[A]
- Definition Classes
- JavaConversions
-
implicit
def
asScalaBufferConverter[A](l: List[A]): AsScala[Buffer[A]]
Adds an
asScalamethod that implicitly converts a JavaListto a Scala mutableBuffer.Adds an
asScalamethod that implicitly converts a JavaListto a Scala mutableBuffer.- Definition Classes
- JavaConversions
-
def
asScalaIterator[A](i: Iterator[A]): Iterator[A]
- Definition Classes
- JavaConversions
-
implicit
def
asScalaIteratorConverter[A](i: Iterator[A]): AsScala[Iterator[A]]
Adds an
asScalamethod that implicitly converts a JavaIteratorto a ScalaIterator.Adds an
asScalamethod that implicitly converts a JavaIteratorto a ScalaIterator.- Definition Classes
- JavaConversions
-
def
asScalaSet[A](s: Set[A]): Set[A]
- Definition Classes
- JavaConversions
-
implicit
def
asScalaSetConverter[A](s: Set[A]): AsScala[Set[A]]
Adds an
asScalamethod that implicitly converts a JavaSetto a Scala mutableSet.Adds an
asScalamethod that implicitly converts a JavaSetto a Scala mutableSet.- Definition Classes
- JavaConversions
-
def
bigDec(arg: Any): BigDecimal
- Attributes
- protected
- Definition Classes
- Helpers
-
def
bufferAsJavaList[A](b: Buffer[A]): List[A]
- Definition Classes
- JavaConversions
-
implicit
def
bufferAsJavaListConverter[A](b: Buffer[A]): AsJava[List[A]]
Adds an
asJavamethod that implicitly converts a Scala mutableBufferto a JavaList.Adds an
asJavamethod that implicitly converts a Scala mutableBufferto a JavaList.- Definition Classes
- JavaConversions
-
def
castAggrManyList[T](row: List[_], colIndex: Int): List[Set[T]]
- Attributes
- protected
- Definition Classes
- CastAggr
-
def
castAggrManyListBigDecimal(row: List[_], colIndex: Int): List[Set[BigDecimal]]
- Attributes
- protected
- Definition Classes
- CastAggr
-
def
castAggrManyListBigInt(row: List[_], colIndex: Int): List[Set[BigInt]]
- Attributes
- protected
- Definition Classes
- CastAggr
-
def
castAggrManyListDistinct[T](row: List[_], colIndex: Int): List[Set[T]]
- Attributes
- protected
- Definition Classes
- CastAggr
-
def
castAggrManyListDistinctBigDecimal(row: List[_], colIndex: Int): List[Set[BigDecimal]]
- Attributes
- protected
- Definition Classes
- CastAggr
-
def
castAggrManyListDistinctBigInt(row: List[_], colIndex: Int): List[Set[BigInt]]
- Attributes
- protected
- Definition Classes
- CastAggr
-
def
castAggrManyListDistinctInt(row: List[_], colIndex: Int): List[Set[Int]]
- Attributes
- protected
- Definition Classes
- CastAggr
-
def
castAggrManyListDistinctURI(row: List[_], colIndex: Int): List[Set[URI]]
- Attributes
- protected
- Definition Classes
- CastAggr
-
def
castAggrManyListInt(row: List[_], colIndex: Int): List[Set[Int]]
- Attributes
- protected
- Definition Classes
- CastAggr
-
def
castAggrManyListRand[T](row: List[_], colIndex: Int): List[Set[T]]
- Attributes
- protected
- Definition Classes
- CastAggr
-
def
castAggrManyListRandBigDecimal(row: List[_], colIndex: Int): List[Set[BigDecimal]]
- Attributes
- protected
- Definition Classes
- CastAggr
-
def
castAggrManyListRandBigInt(row: List[_], colIndex: Int): List[Set[BigInt]]
- Attributes
- protected
- Definition Classes
- CastAggr
-
def
castAggrManyListRandInt(row: List[_], colIndex: Int): List[Set[Int]]
- Attributes
- protected
- Definition Classes
- CastAggr
-
def
castAggrManyListRandURI(row: List[_], colIndex: Int): List[Set[URI]]
- Attributes
- protected
- Definition Classes
- CastAggr
-
def
castAggrManyListURI(row: List[_], colIndex: Int): List[Set[URI]]
- Attributes
- protected
- Definition Classes
- CastAggr
-
def
castAggrManySingle[T](row: List[_], colIndex: Int): Set[T]
- Attributes
- protected
- Definition Classes
- CastAggr
-
def
castAggrManySingleBigDecimal(row: List[_], colIndex: Int): Set[BigDecimal]
- Attributes
- protected
- Definition Classes
- CastAggr
-
def
castAggrManySingleBigInt(row: List[_], colIndex: Int): Set[BigInt]
- Attributes
- protected
- Definition Classes
- CastAggr
-
def
castAggrManySingleInt(row: List[_], colIndex: Int): Set[Int]
- Attributes
- protected
- Definition Classes
- CastAggr
-
def
castAggrManySingleURI(row: List[_], colIndex: Int): Set[URI]
- Attributes
- protected
- Definition Classes
- CastAggr
-
def
castAggrOneList[T](row: List[_], colIndex: Int): List[T]
- Attributes
- protected
- Definition Classes
- CastAggr
-
def
castAggrOneListBigDecimal(row: List[_], colIndex: Int): List[BigDecimal]
- Attributes
- protected
- Definition Classes
- CastAggr
-
def
castAggrOneListBigInt(row: List[_], colIndex: Int): List[BigInt]
- Attributes
- protected
- Definition Classes
- CastAggr
-
def
castAggrOneListDistinct[T](row: List[_], colIndex: Int): List[T]
- Attributes
- protected
- Definition Classes
- CastAggr
-
def
castAggrOneListDistinctBigDecimal(row: List[_], colIndex: Int): List[BigDecimal]
- Attributes
- protected
- Definition Classes
- CastAggr
-
def
castAggrOneListDistinctBigInt(row: List[_], colIndex: Int): List[BigInt]
- Attributes
- protected
- Definition Classes
- CastAggr
-
def
castAggrOneListDistinctInt(row: List[_], colIndex: Int): List[Int]
- Attributes
- protected
- Definition Classes
- CastAggr
-
def
castAggrOneListDistinctURI(row: List[_], colIndex: Int): List[URI]
- Attributes
- protected
- Definition Classes
- CastAggr
-
def
castAggrOneListInt(row: List[_], colIndex: Int): List[Int]
- Attributes
- protected
- Definition Classes
- CastAggr
-
def
castAggrOneListRand[T](row: List[_], colIndex: Int): List[T]
- Attributes
- protected
- Definition Classes
- CastAggr
-
def
castAggrOneListRandBigDecimal(row: List[_], colIndex: Int): List[BigDecimal]
- Attributes
- protected
- Definition Classes
- CastAggr
-
def
castAggrOneListRandBigInt(row: List[_], colIndex: Int): List[BigInt]
- Attributes
- protected
- Definition Classes
- CastAggr
-
def
castAggrOneListRandInt(row: List[_], colIndex: Int): List[Int]
- Attributes
- protected
- Definition Classes
- CastAggr
-
def
castAggrOneListRandURI(row: List[_], colIndex: Int): List[URI]
- Attributes
- protected
- Definition Classes
- CastAggr
-
def
castAggrOneListURI(row: List[_], colIndex: Int): List[URI]
- Attributes
- protected
- Definition Classes
- CastAggr
-
def
castAggrSingleSample[T](row: List[_], colIndex: Int): T
- Attributes
- protected
- Definition Classes
- CastAggr
-
def
castAggrSingleSampleBigDecimal(row: List[_], colIndex: Int): BigDecimal
- Attributes
- protected
- Definition Classes
- CastAggr
-
def
castAggrSingleSampleBigInt(row: List[_], colIndex: Int): BigInt
- Attributes
- protected
- Definition Classes
- CastAggr
-
def
castAggrSingleSampleInt(row: List[_], colIndex: Int): Int
- Attributes
- protected
- Definition Classes
- CastAggr
-
def
castAggrSingleSampleURI(row: List[_], colIndex: Int): URI
- Attributes
- protected
- Definition Classes
- CastAggr
-
def
castMany[T](row: List[_], colIndex: Int): Set[T]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castManyBigDecimal(row: List[_], colIndex: Int): Set[BigDecimal]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castManyBigInt(row: List[_], colIndex: Int): Set[BigInt]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castManyEnum(row: List[_], colIndex: Int): Set[String]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castManyInt(row: List[_], colIndex: Int): Set[Int]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castManyURI(row: List[_], colIndex: Int): Set[URI]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castMapBigDecimal(row: List[_], colIndex: Int): Map[String, BigDecimal]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castMapBigInt(row: List[_], colIndex: Int): Map[String, BigInt]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castMapBoolean(row: List[_], colIndex: Int): Map[String, Boolean]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castMapDate(row: List[_], colIndex: Int): Map[String, Date]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castMapDouble(row: List[_], colIndex: Int): Map[String, Double]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castMapInt(row: List[_], colIndex: Int): Map[String, Int]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castMapLong(row: List[_], colIndex: Int): Map[String, Long]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castMapString(row: List[_], colIndex: Int): Map[String, String]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castMapURI(row: List[_], colIndex: Int): Map[String, URI]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castMapUUID(row: List[_], colIndex: Int): Map[String, UUID]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castOne[T](row: List[_], colIndex: Int): T
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castOneAny(row: List[_], colIndex: Int): Any
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castOneBigDecimal(row: List[_], colIndex: Int): BigDecimal
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castOneBigInt(row: List[_], colIndex: Int): BigInt
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castOneInt(row: List[_], colIndex: Int): Int
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castOneURI(row: List[_], colIndex: Int): URI
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castOptApplyMany[T](row: List[_], colIndex: Int): Option[Set[T]]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castOptApplyManyBigDecimal(row: List[_], colIndex: Int): Option[Set[BigDecimal]]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castOptApplyManyBigInt(row: List[_], colIndex: Int): Option[Set[BigInt]]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castOptApplyManyDouble(row: List[_], colIndex: Int): Option[Set[Double]]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castOptApplyManyInt(row: List[_], colIndex: Int): Option[Set[Int]]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castOptApplyManyLong(row: List[_], colIndex: Int): Option[Set[Long]]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castOptApplyManyURI(row: List[_], colIndex: Int): Option[Set[URI]]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castOptApplyMapBigDecimal(row: List[_], colIndex: Int): Option[Map[String, BigDecimal]]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castOptApplyMapBigInt(row: List[_], colIndex: Int): Option[Map[String, BigInt]]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castOptApplyMapBoolean(row: List[_], colIndex: Int): Option[Map[String, Boolean]]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castOptApplyMapDate(row: List[_], colIndex: Int): Option[Map[String, Date]]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castOptApplyMapDouble(row: List[_], colIndex: Int): Option[Map[String, Double]]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castOptApplyMapInt(row: List[_], colIndex: Int): Option[Map[String, Int]]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castOptApplyMapLong(row: List[_], colIndex: Int): Option[Map[String, Long]]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castOptApplyMapString(row: List[_], colIndex: Int): Option[Map[String, String]]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castOptApplyMapURI(row: List[_], colIndex: Int): Option[Map[String, URI]]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castOptApplyMapUUID(row: List[_], colIndex: Int): Option[Map[String, UUID]]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castOptApplyOne[T](row: List[_], colIndex: Int): Option[T]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castOptApplyOneBigDecimal(row: List[_], colIndex: Int): Option[BigDecimal]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castOptApplyOneBigInt(row: List[_], colIndex: Int): Option[BigInt]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castOptApplyOneDouble(row: List[_], colIndex: Int): Option[Double]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castOptApplyOneInt(row: List[_], colIndex: Int): Option[Int]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castOptApplyOneLong(row: List[_], colIndex: Int): Option[Long]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castOptApplyOneURI(row: List[_], colIndex: Int): Option[URI]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castOptMany[T](row: List[_], colIndex: Int): Option[Set[T]]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castOptManyBigDecimal(row: List[_], colIndex: Int): Option[Set[BigDecimal]]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castOptManyBigInt(row: List[_], colIndex: Int): Option[Set[BigInt]]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castOptManyDouble(row: List[_], colIndex: Int): Option[Set[Double]]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castOptManyEnum(row: List[_], colIndex: Int): Option[Set[String]]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castOptManyInt(row: List[_], colIndex: Int): Option[Set[Int]]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castOptManyLong(row: List[_], colIndex: Int): Option[Set[Long]]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castOptManyRefAttr(row: List[_], colIndex: Int): Option[Set[Long]]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castOptManyURI(row: List[_], colIndex: Int): Option[Set[URI]]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castOptMapBigDecimal(row: List[_], colIndex: Int): Option[Map[String, BigDecimal]]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castOptMapBigInt(row: List[_], colIndex: Int): Option[Map[String, BigInt]]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castOptMapBoolean(row: List[_], colIndex: Int): Option[Map[String, Boolean]]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castOptMapDate(row: List[_], colIndex: Int): Option[Map[String, Date]]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castOptMapDouble(row: List[_], colIndex: Int): Option[Map[String, Double]]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castOptMapInt(row: List[_], colIndex: Int): Option[Map[String, Int]]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castOptMapLong(row: List[_], colIndex: Int): Option[Map[String, Long]]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castOptMapString(row: List[_], colIndex: Int): Option[Map[String, String]]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castOptMapURI(row: List[_], colIndex: Int): Option[Map[String, URI]]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castOptMapUUID(row: List[_], colIndex: Int): Option[Map[String, UUID]]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castOptNestedMany[T](it: Iterator[_]): Set[T]
- Attributes
- protected
- Definition Classes
- CastOptNested
-
def
castOptNestedManyBigDecimal(it: Iterator[_]): Set[BigDecimal]
- Attributes
- protected
- Definition Classes
- CastOptNested
-
def
castOptNestedManyBigInt(it: Iterator[_]): Set[BigInt]
- Attributes
- protected
- Definition Classes
- CastOptNested
-
def
castOptNestedManyEnum(it: Iterator[_]): Set[String]
- Attributes
- protected
- Definition Classes
- CastOptNested
-
def
castOptNestedManyInt(it: Iterator[_]): Set[Int]
- Attributes
- protected
- Definition Classes
- CastOptNested
-
def
castOptNestedManyRefAttr(it: Iterator[_]): Set[Long]
- Attributes
- protected
- Definition Classes
- CastOptNested
-
def
castOptNestedMapBigDecimal(it: Iterator[_]): Map[String, BigDecimal]
- Attributes
- protected
- Definition Classes
- CastOptNested
-
def
castOptNestedMapBigInt(it: Iterator[_]): Map[String, BigInt]
- Attributes
- protected
- Definition Classes
- CastOptNested
-
def
castOptNestedMapBoolean(it: Iterator[_]): Map[String, Boolean]
- Attributes
- protected
- Definition Classes
- CastOptNested
-
def
castOptNestedMapDate(it: Iterator[_]): Map[String, Date]
- Attributes
- protected
- Definition Classes
- CastOptNested
-
def
castOptNestedMapDouble(it: Iterator[_]): Map[String, Double]
- Attributes
- protected
- Definition Classes
- CastOptNested
-
def
castOptNestedMapInt(it: Iterator[_]): Map[String, Int]
- Attributes
- protected
- Definition Classes
- CastOptNested
-
def
castOptNestedMapLong(it: Iterator[_]): Map[String, Long]
- Attributes
- protected
- Definition Classes
- CastOptNested
-
def
castOptNestedMapString(it: Iterator[_]): Map[String, String]
- Attributes
- protected
- Definition Classes
- CastOptNested
-
def
castOptNestedMapURI(it: Iterator[_]): Map[String, URI]
- Attributes
- protected
- Definition Classes
- CastOptNested
-
def
castOptNestedMapUUID(it: Iterator[_]): Map[String, UUID]
- Attributes
- protected
- Definition Classes
- CastOptNested
-
def
castOptNestedOne[T](it: Iterator[_]): T
- Attributes
- protected
- Definition Classes
- CastOptNested
-
def
castOptNestedOneBigDecimal(it: Iterator[_]): BigDecimal
- Attributes
- protected
- Definition Classes
- CastOptNested
-
def
castOptNestedOneBigInt(it: Iterator[_]): BigInt
- Attributes
- protected
- Definition Classes
- CastOptNested
-
def
castOptNestedOneEnum(it: Iterator[_]): String
- Attributes
- protected
- Definition Classes
- CastOptNested
-
def
castOptNestedOneInt(it: Iterator[_]): Int
- Attributes
- protected
- Definition Classes
- CastOptNested
-
def
castOptNestedOneRefAttr(it: Iterator[_]): Long
- Attributes
- protected
- Definition Classes
- CastOptNested
-
def
castOptNestedOptMany[T](it: Iterator[_]): Option[Set[T]]
- Attributes
- protected
- Definition Classes
- CastOptNested
-
def
castOptNestedOptManyBigDecimal(it: Iterator[_]): Option[Set[BigDecimal]]
- Attributes
- protected
- Definition Classes
- CastOptNested
-
def
castOptNestedOptManyBigInt(it: Iterator[_]): Option[Set[BigInt]]
- Attributes
- protected
- Definition Classes
- CastOptNested
-
def
castOptNestedOptManyDouble(it: Iterator[_]): Option[Set[Double]]
- Attributes
- protected
- Definition Classes
- CastOptNested
-
def
castOptNestedOptManyEnum(it: Iterator[_]): Option[Set[String]]
- Attributes
- protected
- Definition Classes
- CastOptNested
-
def
castOptNestedOptManyInt(it: Iterator[_]): Option[Set[Int]]
- Attributes
- protected
- Definition Classes
- CastOptNested
-
def
castOptNestedOptManyLong(it: Iterator[_]): Option[Set[Long]]
- Attributes
- protected
- Definition Classes
- CastOptNested
-
def
castOptNestedOptManyRefAttr(it: Iterator[_]): Option[Set[Long]]
- Attributes
- protected
- Definition Classes
- CastOptNested
-
def
castOptNestedOptManyURI(it: Iterator[_]): Option[Set[URI]]
- Attributes
- protected
- Definition Classes
- CastOptNested
-
def
castOptNestedOptMapBigDecimal(it: Iterator[_]): Option[Map[String, BigDecimal]]
- Attributes
- protected
- Definition Classes
- CastOptNested
-
def
castOptNestedOptMapBigInt(it: Iterator[_]): Option[Map[String, BigInt]]
- Attributes
- protected
- Definition Classes
- CastOptNested
-
def
castOptNestedOptMapBoolean(it: Iterator[_]): Option[Map[String, Boolean]]
- Attributes
- protected
- Definition Classes
- CastOptNested
-
def
castOptNestedOptMapDate(it: Iterator[_]): Option[Map[String, Date]]
- Attributes
- protected
- Definition Classes
- CastOptNested
-
def
castOptNestedOptMapDouble(it: Iterator[_]): Option[Map[String, Double]]
- Attributes
- protected
- Definition Classes
- CastOptNested
-
def
castOptNestedOptMapInt(it: Iterator[_]): Option[Map[String, Int]]
- Attributes
- protected
- Definition Classes
- CastOptNested
-
def
castOptNestedOptMapLong(it: Iterator[_]): Option[Map[String, Long]]
- Attributes
- protected
- Definition Classes
- CastOptNested
-
def
castOptNestedOptMapString(it: Iterator[_]): Option[Map[String, String]]
- Attributes
- protected
- Definition Classes
- CastOptNested
-
def
castOptNestedOptMapURI(it: Iterator[_]): Option[Map[String, URI]]
- Attributes
- protected
- Definition Classes
- CastOptNested
-
def
castOptNestedOptMapUUID(it: Iterator[_]): Option[Map[String, UUID]]
- Attributes
- protected
- Definition Classes
- CastOptNested
-
def
castOptNestedOptOne[T](it: Iterator[_]): Option[T]
- Attributes
- protected
- Definition Classes
- CastOptNested
-
def
castOptNestedOptOneBigDecimal(it: Iterator[_]): Option[BigDecimal]
- Attributes
- protected
- Definition Classes
- CastOptNested
-
def
castOptNestedOptOneBigInt(it: Iterator[_]): Option[BigInt]
- Attributes
- protected
- Definition Classes
- CastOptNested
-
def
castOptNestedOptOneDouble(it: Iterator[_]): Option[Double]
- Attributes
- protected
- Definition Classes
- CastOptNested
-
def
castOptNestedOptOneEnum(it: Iterator[_]): Option[String]
- Attributes
- protected
- Definition Classes
- CastOptNested
-
def
castOptNestedOptOneInt(it: Iterator[_]): Option[Int]
- Attributes
- protected
- Definition Classes
- CastOptNested
-
def
castOptNestedOptOneLong(it: Iterator[_]): Option[Long]
- Attributes
- protected
- Definition Classes
- CastOptNested
-
def
castOptNestedOptOneRefAttr(it: Iterator[_]): Option[Long]
- Attributes
- protected
- Definition Classes
- CastOptNested
-
def
castOptNestedOptOneURI(it: Iterator[_]): Option[URI]
- Attributes
- protected
- Definition Classes
- CastOptNested
-
def
castOptOne[T](row: List[_], colIndex: Int): Option[T]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castOptOneBigDecimal(row: List[_], colIndex: Int): Option[BigDecimal]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castOptOneBigInt(row: List[_], colIndex: Int): Option[BigInt]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castOptOneDouble(row: List[_], colIndex: Int): Option[Double]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castOptOneEnum(row: List[_], colIndex: Int): Option[String]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castOptOneInt(row: List[_], colIndex: Int): Option[Int]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castOptOneLong(row: List[_], colIndex: Int): Option[Long]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castOptOneRefAttr(row: List[_], colIndex: Int): Option[Long]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
castOptOneURI(row: List[_], colIndex: Int): Option[URI]
- Attributes
- protected
- Definition Classes
- CastTypes
-
def
clean(attr: String): String
- Definition Classes
- Helpers
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
collectionAsScalaIterable[A](i: Collection[A]): Iterable[A]
- Definition Classes
- JavaConversions
-
implicit
def
collectionAsScalaIterableConverter[A](i: Collection[A]): AsScala[Iterable[A]]
Adds an
asScalamethod that implicitly converts a JavaCollectionto an ScalaIterable.Adds an
asScalamethod that implicitly converts a JavaCollectionto an ScalaIterable.- Definition Classes
- JavaConversions
-
def
convert(tpe: String, arg: Any): (Any) ⇒ String
- Definition Classes
- ColOps
-
def
date2datomicStr(date: Date, zoneOffset: ZoneOffset = localZoneOffset): String
- Definition Classes
- DateHandling
-
def
date2datomicStr2(date: Date, zoneOffset: ZoneOffset = localZoneOffset): String
- Definition Classes
- DateHandling
-
def
date2str(date: Date, zoneOffset: ZoneOffset = localZoneOffset): String
- Definition Classes
- DateHandling
-
def
daylight(ms: Long): Int
- Definition Classes
- DateHandling
-
def
dictionaryAsScalaMap[A, B](p: Dictionary[A, B]): Map[A, B]
- Definition Classes
- JavaConversions
-
implicit
def
dictionaryAsScalaMapConverter[K, V](p: Dictionary[K, V]): AsScala[Map[K, V]]
Adds an
asScalamethod that implicitly converts a JavaDictionaryto a Scala mutableMap.Adds an
asScalamethod that implicitly converts a JavaDictionaryto a Scala mutableMap.- Definition Classes
- JavaConversions
-
def
double(arg: Any): String
- Attributes
- protected
- Definition Classes
- Helpers
-
def
enumerationAsScalaIterator[A](i: Enumeration[A]): Iterator[A]
- Definition Classes
- JavaConversions
-
implicit
def
enumerationAsScalaIteratorConverter[A](i: Enumeration[A]): AsScala[Iterator[A]]
Adds an
asScalamethod that implicitly converts a JavaEnumerationto a ScalaIterator.Adds an
asScalamethod that implicitly converts a JavaEnumerationto a ScalaIterator.- Definition Classes
- JavaConversions
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
escStr(s: String): String
- Definition Classes
- Helpers
-
def
expandDateStr(dateStr: String): String
- Definition Classes
- DateHandling
-
def
extractFlatValues(propCount: Int, refIndexes: List[Int], tacitIndexes: List[Int], deeper: Boolean = false): (Collection[Any]) ⇒ Iterator[Any]
- Definition Classes
- JsonBase
-
final
def
f(a: Any): Any
- Attributes
- protected
- Definition Classes
- Helpers
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
firstNs(model: Model): String
- Definition Classes
- Helpers
-
def
get(maxRows: Int)(implicit futConn: Future[Conn], ec: ExecutionContext): Future[List[(A, B, C, D, E, F, G, H, I, J, K, L, M)]]
Get Future with List of n rows as tuples matching a molecule.
Get Future with List of n rows as tuples matching a molecule.
Person.name.age.get(1).map(_ ==> List( ("Ben", 42) )
Since retrieving a List is considered the default fetch format, the getter method is simply namedget(and notgetList).- maxRows
Int Number of rows returned
- futConn
Implicit Conn value in scope
- returns
Future[List[Tpl]]where Tpl is a tuple of types matching the attributes of the molecule
- Definition Classes
- GetTpls
-
def
get(implicit futConn: Future[Conn], ec: ExecutionContext): Future[List[(A, B, C, D, E, F, G, H, I, J, K, L, M)]]
Get Future with List of all rows as tuples matching a molecule.
Get Future with List of all rows as tuples matching a molecule.
Person.name.age.get.map(_ ==> List( ("Ben", 42), ("Liz", 37), ))
Since retrieving a List is considered the default fetch format, the getter method is simply namedget(and notgetList).- futConn
Implicit Conn value in scope
- returns
Future[List[Tpl]]where Tpl is a tuple of types matching the attributes of the molecule
- Definition Classes
- GetTpls
-
def
getAsOf(date: Date, n: Int)(implicit conn: Future[Conn], ec: ExecutionContext): Future[List[(A, B, C, D, E, F, G, H, I, J, K, L, M)]]
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 { beforeInsert = new java.util.Date // Insert tx1 <- Person.name.age insert List( ("Ben", 42), ("Liz", 37) ) List(ben, liz) = tx1.eids afterInsert = new java.util.Date // Update tx2 <- Person(ben).age(43).update afterUpdate = new java.util.Date // Get List of all rows as of afterUpdate _ <- Person.name.age.getAsOf(afterUpdate).map(_ ==> List( ("Ben", 43), ("Liz", 37) )) // Get List of n rows as of afterUpdate _ <- Person.name.age.getAsOf(afterUpdate, 1).map(_ ==> List( ("Ben", 43) )) } yield ()
- 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
- GetTpls
-
def
getAsOf(date: Date)(implicit conn: Future[Conn], ec: ExecutionContext): Future[List[(A, B, C, D, E, F, G, H, I, J, K, L, M)]]
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 { beforeInsert = new java.util.Date // Insert tx1 <- Person.name.age insert List( ("Ben", 42), ("Liz", 37), ) List(ben, liz) = tx1.eids afterInsert = new java.util.Date // Update tx2 <- Person(ben).age(43).update afterUpdate = new java.util.Date // Retract tx3 <- ben.retract afterRetract = new java.util.Date // No data yet before insert _ <- Person.name.age.getAsOf(beforeInsert).map(_ ==> Nil) // Get List of all rows as of afterInsert _ <- Person.name.age.getAsOf(afterInsert).map(_ ==> List( ("Ben", 42), ("Liz", 37)´ )) // Get List of all rows as of afterUpdate _ <- Person.name.age.getAsOf(afterUpdate).map(_ ==> List( ("Ben", 43), // Ben now 43 ("Liz", 37) )) // Get List of all rows as of afterRetract _ <- Person.name.age.getAsOf(afterRetract).map(_ ==> List( ("Liz", 37) // Ben gone )) } yield ()
- 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
- GetTpls
-
def
getAsOf(txR: TxReport, n: Int)(implicit conn: Future[Conn], ec: ExecutionContext): Future[List[(A, B, C, D, E, F, G, H, I, J, K, L, M)]]
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 internalasOfmethod 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,retractetc.for { // Insert (tx report 1) tx1 <- Person.name.age insert List( ("Ben", 42), ("Liz", 37) ) List(ben, liz) = tx1.eids // Update (tx report 2) tx2 <- Person(ben).age(43).update // Get List of all rows as of tx2 (after update) _ <- Person.name.age.getAsOf(tx2).map(_ ==> List( ("Ben", 43), ("Liz", 37) )) // Get List of n rows as of tx2 (after update) _ <- Person.name.age.getAsOf(tx2, 1).map(_ ==> List( ("Ben", 43) )) } yield ()
- 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
- GetTpls
-
def
getAsOf(txR: TxReport)(implicit conn: Future[Conn], ec: ExecutionContext): Future[List[(A, B, C, D, E, F, G, H, I, J, K, L, M)]]
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 internalasOfmethod 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,retractetc.for { // Insert (tx report 1) tx1 <- Person.name.age insert List( ("Ben", 42), ("Liz", 37), ) List(ben, liz) = tx1.eids // Update (tx report 2) tx2 <- Person(ben).age(43).update // Retract (tx report 3) tx3 <- ben.retract // Get List of all rows as of tx1 (after insert) _ <- Person.name.age.getAsOf(tx1).map(_ ==> List( ("Ben", 42), ("Liz", 37) )) // Get List of all rows as of tx2 (after update) _ <- Person.name.age.getAsOf(tx2).map(_ ==> List( ("Ben", 43), // Ben now 43 ("Liz", 37) )) // Get List of all rows as of tx3 (after retract) _ <- Person.name.age.getAsOf(tx3).map(_ ==> List( ("Liz", 37) // Ben gone )) } yield ()
- 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
- GetTpls
-
def
getAsOf(t: Long, n: Int)(implicit conn: Future[Conn], ec: ExecutionContext): Future[List[(A, B, C, D, E, F, G, H, I, J, K, L, M)]]
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 timetis an auto-incremented transaction number assigned internally by Datomic.
tcan 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 { // Insert (t 1028) 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.map(_.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).map(_ ==> List( ("Ben", 43), ("Liz", 37) )) // Get List of n rows as of transaction t 1031 (after update) _ <- Person.name.age.getAsOf(1031, 1).map(_ ==> List( ("Ben", 43) )) } yield ()
- 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
- GetTpls
-
def
getAsOf(t: Long)(implicit conn: Future[Conn], ec: ExecutionContext): Future[List[(A, B, C, D, E, F, G, H, I, J, K, L, M)]]
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 timetis an auto-incremented transaction number assigned internally by Datomic.
tcan 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 { // Insert (t 1028) 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.map(_.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).map(_ ==> List( ("Liz", 37), ("Ben", 42) )) // Get List of all rows as of transaction t 1031 (after update) _ <- Person.name.age.getAsOf(1031).map(_ ==> List( ("Liz", 37), ("Ben", 43) )) // Get List of all rows as of transaction t 1032 (after retract) _ <- Person.name.age.getAsOf(1032).map(_ ==> List( ("Liz", 37) )) } yield ()
- 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
- GetTpls
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
macro
def
getDynObjs(body: (Obj) ⇒ Unit): Future[List[DynamicMolecule with Obj]]
- Definition Classes
- Molecule_0
-
def
getHistory(implicit conn: Future[Conn], ec: ExecutionContext): Future[List[(A, B, C, D, E, F, G, H, I, J, K, L, M)]]
Get
Futurewith history of operations asListon an attribute in the db.Get
Futurewith history of operations asListon an attribute in the db.
Generic datom attributes that can be called whengetHistoryis 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:for { // Insert (t 1028) 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.map(_.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 )) } yield ()
- conn
Implicit Conn value in scope
- returns
List[Tpl] where Tpl is tuple of data matching molecule
- Definition Classes
- GetTpls
-
def
getJson(n: Int)(implicit futConn: Future[Conn], ec: ExecutionContext): Future[String]
Get json data for n rows matching a molecule
Get json data for n rows matching a molecule
Person.name.age.getJson(1).map(_ ==> """[ |{"person.name": "Ben", "person.age": 42} |]""".stripMargin)
Namespace.Attribute is used as json fields. Values are quoted when necessary. Nested data becomes json objects etc.
- n
Number of rows returned
- futConn
Implicit Conn value in scope
- returns
String of json
- Definition Classes
- GetJson
-
def
getJson(implicit conn: Future[Conn], ec: ExecutionContext): Future[String]
Get json data for all rows matching a molecule.
Get json data for all rows matching a molecule.
Person.name.age.getJson.map(_ ==> """[ |{"person.name": "Ben", "person.age": 42}, |{"person.name": "Liz", "person.age": 37} |]""".stripMargin)
Namespace.Attribute is used as json fields. Values are quoted when necessary. Nested data becomes json objects etc.
- conn
Implicit Conn value in scope
- returns
String of json
- Definition Classes
- GetJson
-
def
getJsonAsOf(date: Date, n: Int)(implicit conn: Future[Conn], ec: ExecutionContext): Future[String]
Get json data for n rows matching a molecule as of tx.
Get json data for n rows matching a molecule as of tx.
Get data at a human point in time (a java.util.Date).for { beforeInsert = new java.util.Date // Insert tx1 = Person.name.age insert List( ("Ben", 42), ("Liz", 37) ) List(ben, liz) = tx1.eids afterInsert = new java.util.Date // Update tx2 <- Person(ben).age(43).update afterUpdate = new java.util.Date // Get List of all rows as of afterUpdate _ <- Person.name.age.getJsonAsOf(afterUpdate).map(_ ==> """[ |{"person.name": "Ben", "person.age": 43}, |{"person.name": "Liz", "person.age": 37} |]""".stripMargin) // Get List of n rows as of afterUpdate _ <- Person.name.age.getJsonAsOf(afterUpdate, 1).map(_ ==> """[ |{"person.name": "Ben", "person.age": 43} |]""".stripMargin) } yield ()
- date
java.util.Date
- n
Int Number of rows returned
- conn
Implicit Conn value in scope
- returns
String of json
- Definition Classes
- GetJson
-
def
getJsonAsOf(date: Date)(implicit conn: Future[Conn], ec: ExecutionContext): Future[String]
Get json data for all rows matching a molecule as of date.
Get json data for all rows matching a molecule as of date.
Get data at a human point in time (a java.util.Date).for { beforeInsert = new java.util.Date // Insert tx1 <- Person.name.age insert List( ("Ben", 42), ("Liz", 37), ) List(ben, liz) = tx1.eids afterInsert = new java.util.Date // Update tx2 <- Person(ben).age(43).update afterUpdate = new java.util.Date // Retract tx3 <- ben.retract afterRetract = new java.util.Date // No data yet before insert _ <- Person.name.age.getJsonAsOf(beforeInsert).map(_ ==> "") // Get List of all rows as of afterInsert _ <- Person.name.age.getJsonAsOf(afterInsert).map(_ ==> """[ |{"person.name": "Ben", "person.age": 42}, |{"person.name": "Liz", "person.age": 37} |]""".stripMargin) // Get List of all rows as of afterUpdate _ <- Person.name.age.getJsonAsOf(afterUpdate).map(_ ==> """[ |{"person.name": "Ben", "person.age": 43}, |{"person.name": "Liz", "person.age": 37} |]""".stripMargin) // Get List of all rows as of afterRetract _ <- Person.name.age.getJsonAsOf(afterRetract).map(_ ==> """[ |{"person.name": "Liz", "person.age": 37} |]""".stripMargin) } yield ()
- date
java.util.Date
- conn
Implicit Conn value in scope
- returns
String of json
- Definition Classes
- GetJson
-
def
getJsonAsOf(tx: TxReport, n: Int)(implicit conn: Future[Conn], ec: ExecutionContext): Future[String]
Get json data for n rows matching a molecule as of tx.
Get json data for n rows matching a molecule as of tx.
Datomic's internalasOfmethod 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,retractetc.for { // Insert (tx report 1) tx1 <- Person.name.age insert List( ("Ben", 42), ("Liz", 37) ) List(ben, liz) = tx1.eids // Update (tx report 2) tx2 <- Person(ben).age(43).update // Get json for all rows as of transaction tx2 (after update) - Ben now 43 _ <- Person.name.age.getJsonAsOf(tx2).map(_ ==> """[ |{"person.name": "Ben", "person.age": 43}, |{"person.name": "Liz", "person.age": 37} |]""".stripMargin) // Get json for n rows as of transaction tx2 (after update) - Ben now 43 _ <- Person.name.age.getJsonAsOf(tx2, 1).map(_ ==> """[ |{"person.name": "Ben", "person.age": 43} |]""".stripMargin) } yield ()
- tx
TxReport (returned from all molecule transaction operations)
- n
Int Number of rows returned
- conn
Implicit Conn value in scope
- returns
String of json
- Definition Classes
- GetJson
-
def
getJsonAsOf(tx: TxReport)(implicit conn: Future[Conn], ec: ExecutionContext): Future[String]
Get json data for all rows matching a molecule as of tx.
Get json data for all rows matching a molecule as of tx.
Datomic's internalasOfmethod 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,retractetc.for { // Insert (tx report 1) tx1 <- Person.name.age insert List( ("Ben", 42), ("Liz", 37) ) List(ben, liz) = tx1.eids // Update (tx report 2) tx2 <- Person(ben).age(43).update // Retract (tx report 3) tx3 <- ben.retract // Get json for all rows as of transaction tx1 (after insert) _ <- Person.name.age.getJsonAsOf(tx1).map(_ ==> """[ |{"person.name": "Ben", "person.age": 42}, |{"person.name": "Liz", "person.age": 37} |]""".stripMargin) // Get json for all rows as of transaction tx2 (after update) - Ben now 43 _ <- Person.name.age.getJsonAsOf(tx2).map(_ ==> """[ |{"person.name": "Ben", "person.age": 43}, |{"person.name": "Liz", "person.age": 37} |]""".stripMargin) // Get json for all rows as of transaction tx3 (after retract) - Ben gone _ <- Person.name.age.getJsonAsOf(tx3).map(_ ==> """[ |{"person.name": "Liz", "person.age": 37} |]""".stripMargin) } yield ()
- tx
TxReport (returned from all molecule transaction operations)
- conn
Implicit Conn value in scope
- returns
String of json
- Definition Classes
- GetJson
-
def
getJsonAsOf(t: Long, n: Int)(implicit conn: Future[Conn], ec: ExecutionContext): Future[String]
Get json data for n rows matching a molecule as of transaction time
t.Get json data for n rows matching a molecule as of transaction time
t.
Transaction timetis an auto-incremented transaction number assigned internally by Datomic.
tcan 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 { // Insert (t 1028) 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.map(_.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 json for all rows as of transaction t 1031 (after update) _ <- Person.name.age.getJsonAsOf(1031).map(_ ==> """[ |{"person.name": "Ben", "person.age": 43}, |{"person.name": "Liz", "person.age": 37} |]""".stripMargin) // Get json for n (1) rows as of transaction t 1031 (after update) _ <- Person.name.age.getJsonAsOf(1031, 1).map(_ ==> """[ |{"person.name": "Ben", "person.age": 43} |]""".stripMargin) } yield ()
- t
Transaction time t
- n
Int Number of rows returned
- conn
Implicit Conn value in scope
- returns
String of json
- Definition Classes
- GetJson
-
def
getJsonAsOf(t: Long)(implicit conn: Future[Conn], ec: ExecutionContext): Future[String]
Get json data for all rows matching a molecule as of transaction time
t.Get json data for all rows matching a molecule as of transaction time
t.
Transaction timetis an auto-incremented transaction number assigned internally by Datomic.
tcan 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 { // Insert (t 1028) 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)).map(_ ==> 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 json for all rows as of transaction t 1028 (after insert) _ <- Person.name.age.getJsonAsOf(1028).map(_ ==> """[ |{"person.name": "Ben", "person.age": 42}, |{"person.name": "Liz", "person.age": 37} |]""".stripMargin) // Get json for all rows as of transaction t 1031 (after update) - Ben now 43 _ <- Person.name.age.getJsonAsOf(1031).map(_ ==> """[ |{"person.name": "Ben", "person.age": 43}, |{"person.name": "Liz", "person.age": 37} |]""".stripMargin) // Get json for all rows as of transaction t 1032 (after retract) - Ben gone _ <- Person.name.age.getJsonAsOf(1032).map(_ ==> """[ |{"person.name": "Liz", "person.age": 37} |]""".stripMargin) } yield ()
- t
Transaction time t
- conn
Implicit Conn value in scope
- returns
String of json
- Definition Classes
- GetJson
-
def
getJsonSince(date: Date, n: Int)(implicit conn: Future[Conn], ec: ExecutionContext): Future[String]
Get json data for n rows matching a molecule since date.
Get json data for n rows matching a molecule since date.
Get data added/retracted since a human point in time (a java.util.Date).for { // Transact 3 times (`inst` retrieves transaction time/Date from tx report) date1 <- Person.name("Ann").save.map(_.inst) date2 <- Person.name("Ben").save.map(_.inst) date3 <- Person.name("Cay").save.map(_.inst) // Current values _ <- Person.name.get.map(_ ==> List("Ann", "Ben", "Cay")) // Ben and Cay added since date1 _ <- Person.name.getJsonSince(date1).map(_ ==> """[ |{"person.name": "Ben"}, |{"person.name": "Cay"} |]""".stripMargin) // Ben and Cay added since date1 - only n (1) rows returned _ <- Person.name.getJsonSince(date1, 1).map(_ ==> """[ |{"person.name": "Ben"} |]""".stripMargin) }
- date
java.util.Date
- n
Int Number of rows returned
- conn
Implicit Conn value in scope
- returns
String of json
- Definition Classes
- GetJson
-
def
getJsonSince(date: Date)(implicit conn: Future[Conn], ec: ExecutionContext): Future[String]
Get json data for all rows matching a molecule since date.
Get json data for all rows matching a molecule since date.
Get data added/retracted since a human point in time (a java.util.Date).for { // Transact 3 times (`inst` retrieves transaction time/Date from tx report) date1 <- Person.name("Ann").save.map(_.inst) date2 <- Person.name("Ben").save.map(_.inst) date3 <- Person.name("Cay").save.map(_.inst) // Current values _ <- Person.name.get.map(_ ==> List("Ann", "Ben", "Cay")) // Ben and Cay added since date1 _ <- Person.name.getJsonSince(date1).map(_ ==> """[ |{"person.name": "Ben"}, |{"person.name": "Cay"} |]""".stripMargin) // Cay added since date2 _ <- Person.name.getJsonSince(date2).map(_ ==> """[ |{"person.name": "Cay"} |]""".stripMargin) // Nothing added since date3 _ <- Person.name.getJsonSince(date3).map(_ ==> "" } yield ()
- date
java.util.Date
- conn
Implicit Conn value in scope
- returns
String of json
- Definition Classes
- GetJson
-
def
getJsonSince(tx: TxReport, n: Int)(implicit conn: Future[Conn], ec: ExecutionContext): Future[String]
Get json data for n rows matching a molecule since tx.
Get json data for n rows matching a molecule since tx.
Datomic's internalsincecan 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 likeget,update,retractetc.for { // Get tx reports for 3 transactions tx1 <- Person.name("Ann").save tx2 <- Person.name("Ben").save tx3 <- Person.name("Cay").save // Current values _ <- Person.name.get.map(_ ==> List("Ann", "Ben", "Cay")) // Ben and Cay added since tx1 _ <- Person.name.getJsonSince(tx1).map(_ ==> """[ |{"person.name": "Ben"}, |{"person.name": "Cay"} |]""".stripMargin) // Ben and Cay added since tx1 - only n (1) rows returned _ <- Person.name.getJsonSince(tx1, 1).map(_ ==> """[ |{"person.name": "Ben"} |]""".stripMargin) } yield ()
- tx
TxReport (returned from all molecule transaction operations)
- n
Int Number of rows returned
- conn
Implicit Conn value in scope
- returns
String of json
- Definition Classes
- GetJson
-
def
getJsonSince(tx: TxReport)(implicit conn: Future[Conn], ec: ExecutionContext): Future[String]
Get json data for all rows matching a molecule since tx.
Get json data for all rows matching a molecule since tx.
Datomic's internalsincecan 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 likeget,update,retractetc.for { // Get tx reports for 3 transactions tx1 <- Person.name("Ann").save tx2 <- Person.name("Ben").save tx3 <- Person.name("Cay").save // Current values _ <- Person.name.get.map(_ ==> List("Ann", "Ben", "Cay")) // Ben and Cay added since tx1 _ <- Person.name.getJsonSince(tx1).map(_ ==> """[ |{"person.name": "Ben"}, |{"person.name": "Cay"} |]""".stripMargin) // Cay added since tx2 _ <- Person.name.getJsonSince(tx2).map(_ ==> """[ |{"person.name": "Cay"} |]""".stripMargin) // Nothing added since tx3 _ <- Person.name.getJsonSince(tx3).map(_ ==> "") } yield ()
- tx
TxReport (returned from all molecule transaction operations)
- conn
Implicit Conn value in scope
- returns
String of json
- Definition Classes
- GetJson
-
def
getJsonSince(t: Long, n: Int)(implicit conn: Future[Conn], ec: ExecutionContext): Future[String]
Get json data for n rows matching a molecule since transaction time
t.Get json data for n rows matching a molecule since transaction time
t.
Transaction timetis an auto-incremented transaction number assigned internally by Datomic.
tcan for instance be retrieved by callington the tx report returned from transactional operations and then be used to get data since that point in time (excluding that transaction):for { // 3 transaction times `t` t1 <- Person.name("Ann").save.map(_.t) t2 <- Person.name("Ben").save.map(_.t) t3 <- Person.name("Cay").save.map(_.t) // Current values _ <- Person.name.get.map(_ ==> List("Ann", "Ben", "Cay")) // Ben and Cay added since transaction time t 1028 _ <- Person.name.getJsonSince(t1).map(_ ==> """[ |{"person.name": "Ben"}, |{"person.name": "Cay"} |]""".stripMargin) // Ben and Cay added since transaction time t 1028 - only n (1) rows returned _ <- Person.name.getJsonSince(t1, 1).map(_ ==> """[ |{"person.name": "Ben"} |]""".stripMargin) } yield ()
- t
Transaction time t
- n
Int Number of rows returned
- conn
Implicit Conn value in scope
- returns
String of json
- Definition Classes
- GetJson
-
def
getJsonSince(t: Long)(implicit conn: Future[Conn], ec: ExecutionContext): Future[String]
Get json data for all rows matching a molecule since transaction time
t.Get json data for all rows matching a molecule since transaction time
t.
Transaction timetis an auto-incremented transaction number assigned internally by Datomic.
tcan for instance be retrieved by callington the tx report returned from transactional operations and then be used to get data since that point in time (excluding that transaction):for { // 3 transaction times `t` t1 <- Person.name("Ann").save.map(_.t) t2 <- Person.name("Ben").save.map(_.t) t3 <- Person.name("Cay").save.map(_.t) // Current values _ <- Person.name.get.map(_ ==> List("Ann", "Ben", "Cay")) // Ben and Cay added since transaction time t 1028 _ <- Person.name.getJsonSince(t1).map(_ ==> """[ |{"person.name": "Ben"}, |{"person.name": "Cay"} |]""".stripMargin) // Cay added since transaction time t 1030 _ <- Person.name.getJsonSince(t2).map(_ ==> """[ |{"person.name": "Cay"} |]""".stripMargin) // Nothing added since transaction time t 1032 _ <- Person.name.getJsonSince(t3).map(_ ==> "") } yield ()
- t
Transaction time t
- conn
Implicit Conn value in scope
- returns
String of json
- Definition Classes
- GetJson
-
def
getJsonWith(n: Int, txMolecules: Future[Seq[Statement]]*)(implicit conn: Future[Conn], ec: ExecutionContext): Future[String]
Get json data for all rows matching a molecule with applied molecule transaction data.
Get json data for all rows matching a 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:for { // Current state List(ben, liz) <- Person.name.likes.insert( ("Ben", "pasta"), ("Liz", "pizza") ).map(_.eids) // Test multiple transactions _ <- Person.name.likes.getJsonWith( Person(ben).likes("sushi").getUpdateStmts, Person(liz).likes("cake").getUpdateStmts ).map(_ ==> """[ |{"person.name": "Ben", "person.likes": "sushi"}, |{"person.name": "Liz", "person.likes": "cake"} |]""".stripMargin) // Same as above, but only n (1) rows returned: _ <- Person.name.likes.getJsonWith( 1 Person(ben).likes("sushi").getUpdateStmts, Person(liz).likes("cake").getUpdateStmts ).map(_ ==> """[ |{"person.name": "Ben", "person.likes": "sushi"} |]""".stripMargin) } yield ()
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
String of json
- Definition Classes
- GetJson
-
def
getJsonWith(txMolecules: Future[Seq[Statement]]*)(implicit conn: Future[Conn], ec: ExecutionContext): Future[String]
Get json data for all rows matching a molecule with applied molecule transaction data.
Get json data for all rows matching a 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:for { // Current state ben <- Person.name("Ben").likes("pasta").save.map(_.eid) // Base data _ <- Person.name.likes.getJsonWith( // apply imaginary transaction data Person(ben).likes("sushi").getUpdateStmts ).map(_ ==> """[ |{"person.name": "Ben", "person.likes": "sushi"} |]""".stripMargin) // Current state is still the same _ <- Person.name.likes.get.map(_ ==> List(("Ben", "pasta"))) } yield ()
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
String of json
- Definition Classes
- GetJson
-
def
getKwName(kw: String): String
- Definition Classes
- Helpers
-
def
getObj(implicit conn: Future[Conn], ec: ExecutionContext): Future[Obj]
Convenience method to get head of list of objects matching a molecule.
Convenience method to get head of list of objects matching a molecule.
for { person <- Person.name.age.getObj _ = person.name ==> "Ben" _ = person.age ==> 42 } yield ()
- conn
Implicit Conn value in scope
- returns
List[Obj] where Obj is an object with properties matching the attributes of the molecule
- Definition Classes
- GetObjs
-
def
getObjs(n: Int)(implicit futConn: Future[Conn], ec: ExecutionContext): Future[List[Obj]]
Get Future with List of n rows as objects matching a molecule.
Get Future with List of n rows as objects matching a molecule.
for { List(p1) <- Person.name.age.getObjs(1) _ = p1.name ==> "Ben" _ = p1.age ==> 42 } yield ()
- n
Int Number of rows returned
- futConn
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
- GetObjs
-
def
getObjs(implicit futConn: Future[Conn], ec: ExecutionContext): Future[List[Obj]]
Get Future with List of all rows as objects matching a molecule.
Get Future with List of all rows as objects matching a molecule.
for { List(p1, p2) <- Person.name.age.getObjs _ = p1.name ==> "Ben" _ = p1.age ==> 42 _ = p2.name ==> "Liz" _ = p2.age ==> 37 } yield ()
- futConn
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
- GetObjs
-
def
getObjsAsOf(date: Date, n: Int)(implicit conn: Future[Conn], ec: ExecutionContext): Future[List[Obj]]
Get Future with List of n rows as objects matching a molecule as of date.
Get Future with List of n rows as objects matching a molecule as of date.
Get data at a human point in time (a java.util.Date).for { beforeInsert = new java.util.Date // Insert tx1 <- Person.name.age insert List( ("Ben", 42), ("Liz", 37) ) List(ben, liz) = tx1.eids afterInsert = new java.util.Date // Update tx2 <- Person(ben).age(43).update afterUpdate = new java.util.Date // Get List of all rows as of afterUpdate List(a1, a2) <- Person.name.age.getObjsAsOf(afterUpdate) _ = a1.name ==> "Ben" _ = a1.age ==> 43 // <-- updated _ = a2.name ==> "Liz" _ = a2.age ==> 37 // Get List of n rows as of afterUpdate List(b1) <- Person.name.age.getObjsAsOf(afterUpdate, 1) _ = b1.name ==> "Ben" _ = b1.age ==> 43 // <-- updated } yield ()
- 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
- GetObjs
-
def
getObjsAsOf(date: Date)(implicit conn: Future[Conn], ec: ExecutionContext): Future[List[Obj]]
Get Future with List of all rows as objects matching a molecule as of date.
Get Future with List of all rows as objects matching a molecule as of date.
Get data at a human point in time (a java.util.Date).for { beforeInsert = new java.util.Date // Insert tx1 <- Person.name.age insert List( ("Ben", 42), ("Liz", 37), ) List(ben, liz) = tx1.eids afterInsert = new java.util.Date // Update tx2 <- Person(ben).age(43).update afterUpdate = new java.util.Date // Retract tx3 <- ben.retract afterRetract = new java.util.Date // No data yet before insert _ <- Person.name.age.getObjsAsOf(beforeInsert).map(_ ==> Nil) // Get List of all rows as of afterInsert List(a1, a2) <- Person.name.age.getObjsAsOf(afterInsert) _ = a1.name ==> "Ben" _ = a1.age ==> 42 _ = a2.name ==> "Liz" _ = a2.age ==> 37 // Get List of all rows as of afterUpdate List(b1, b2) <- Person.name.age.getObjsAsOf(afterUpdate) _ = b1.name ==> "Ben" _ = b1.age ==> 43 // <-- updated _ = b2.name ==> "Liz" _ = b2.age ==> 37 // Get List of all rows as of afterRetract List(c1) <- Person.name.age.getObjsAsOf(afterRetract) _ = c1.name ==> "Liz" _ = c1.age ==> 37 } yield ()
- 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
- GetObjs
-
def
getObjsAsOf(tx: TxReport, n: Int)(implicit conn: Future[Conn], ec: ExecutionContext): Future[List[Obj]]
Get Future with List of n rows as objects matching a molecule as of tx.
Get Future with List of n rows as objects matching a molecule as of tx.
Datomic's internalasOfmethod 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,retractetc.for { // Insert (tx report 1) tx1 <- Person.name.age insert List( ("Ben", 42), ("Liz", 37) ) List(ben, liz) = tx1.eids // Update (tx report 2) tx2 <- Person(ben).age(43).update // Get List of all rows as of tx2 (after update) List(a1, a2) <- Person.name.age.getObjsAsOf(tx2) _ = a1.name ==> "Ben" _ = a1.age ==> 43 // <-- updated _ = a2.name ==> "Liz" _ = a2.age ==> 37 // Get List of n rows as of tx2 (after update) List(b1) <- Person.name.age.getObjsAsOf(tx2, 1) _ = b1.name ==> "Ben" _ = b1.age ==> 43 // <-- updated } yield ()
- 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
- GetObjs
-
def
getObjsAsOf(tx: TxReport)(implicit conn: Future[Conn], ec: ExecutionContext): Future[List[Obj]]
Get Future with List of all rows as objects matching a molecule as of tx.
Get Future with List of all rows as objects matching a molecule as of tx.
Datomic's internalasOfmethod 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,retractetc.for { // Insert (tx report 1) tx1 <- Person.name.age insert List( ("Ben", 42), ("Liz", 37), ) List(ben, liz) = tx1.eids // Update (tx report 2) tx2 <- Person(ben).age(43).update // Retract (tx report 3) tx3 = ben.retract // Get List of all rows as of tx1 (after insert) List(a1, a2) <- Person.name.age.getObjsAsOf(tx1) _ = a1.name ==> "Ben" _ = a1.age ==> 42 _ = a2.name ==> "Liz" _ = a2.age ==> 37 // Get List of all rows as of tx2 (after update) List(b1, b2) <- Person.name.age.getObjsAsOf(tx2) _ = b1.name ==> "Ben" _ = b1.age ==> 43 // <-- updated _ = b2.name ==> "Liz" _ = b2.age ==> 37 // Get List of all rows as of tx3 (after retract) List(c1) <- Person.name.age.getObjsAsOf(tx3) _ = c1.name ==> "Liz" _ = c1.age ==> 37 } yield ()
- 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
- GetObjs
-
def
getObjsAsOf(t: Long, n: Int)(implicit conn: Future[Conn], ec: ExecutionContext): Future[List[Obj]]
Get Future with List of n rows as objects matching a molecule as of transaction time
t.Get Future with List of n rows as objects matching a molecule as of transaction time
t.
Transaction timetis an auto-incremented transaction number assigned internally by Datomic.
tcan 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 { // Insert (t 1028) 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)).map(_ ==> 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) List(a1, a2) <- Person.name.age.getObjsAsOf(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) List(b1) <- Person.name.age.getObjsAsOf(1031) _ = b1.name ==> "Ben" _ = b1.age ==> 43 // <-- updated } yield ()
- 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
- GetObjs
-
def
getObjsAsOf(t: Long)(implicit conn: Future[Conn], ec: ExecutionContext): Future[List[Obj]]
Get Future with List of all rows as objects matching a molecule as of transaction time
t.Get Future with List of all rows as objects matching a molecule as of transaction time
t.
Transaction timetis an auto-incremented transaction number assigned internally by Datomic.
tcan 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 { // Insert (t 1028) 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)).map(_ ==> 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) List(a1, a2) <- Person.name.age.getObjsAsOf(1028) _ = a1.name ==> "Ben" _ = a1.age ==> 42 _ = a2.name ==> "Liz" _ = a2.age ==> 37 // Get List of data as of transaction t 1031 (after update) List(b1, b2) <- Person.name.age.getObjsAsOf(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) List(c1) <- Person.name.age.getObjsAsOf(1032) _ = c1.name ==> "Liz" _ = c1.age ==> 37 } yield ()
- 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
- GetObjs
-
def
getObjsHistory(implicit conn: Future[Conn], ec: ExecutionContext): Future[List[Obj]]
Get
Futurewith history of operations asListon an attribute in the db.Get
Futurewith history of operations asListon an attribute in the db.
Generic datom attributes that can be called whengetHistoryis 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:for { // Insert (t 1028) 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.getObjsHistory.map(_ .sortBy(o => (o.t, o.op)) .map(o => "" + 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 )) } yield ()
- 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
- GetObjs
-
def
getObjsSince(date: Date, n: Int)(implicit conn: Future[Conn], ec: ExecutionContext): Future[List[Obj]]
Get Future with List of n rows as objects matching a molecule since date.
Get Future with List of n rows as objects matching a molecule since date.
Get data added/retracted since a human point in time (a java.util.Date).for { // Transact 3 times (`inst` retrieves transaction time/Date from tx report) date1 <- Person.name("Ann").save.inst date2 <- Person.name("Ben").save.inst date3 <- Person.name("Cay").save.inst // Current values List(a1, a2, a3) <- Person.name.getObjs _ = a1.name ==> "Ann" _ = a2.name ==> "Ben" _ = a3.name ==> "Cay" // Ben and Cay added since date1 List(b1, b2) <- Person.name.getObjsSince(date1) _ = b1.name ==> "Ben" _ = b2.name ==> "Cay" // Ben and Cay added since date1 - only n (1) rows returned List(c1) <- Person.name.getObjsSince(date1, 1) _ = c1.name ==> "Ben" } yield ()
- 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
- GetObjs
-
def
getObjsSince(date: Date)(implicit conn: Future[Conn], ec: ExecutionContext): Future[List[Obj]]
Get Future with List of all rows as objects matching a molecule since date.
Get Future with List of all rows as objects matching a molecule since date.
Get data added/retracted since a human point in time (a java.util.Date).for { // Transact 3 times (`inst` retrieves transaction time/Date from tx report) date1 <- Person.name("Ann").save.inst date2 <- Person.name("Ben").save.inst date3 <- Person.name("Cay").save.inst // Current values List(a1, a2, a3) <- Person.name.getObjs _ = a1.name ==> "Ann" _ = a2.name ==> "Ben" _ = a3.name ==> "Cay" // Ben and Cay added since date1 List(b1, b2) <- Person.name.getObjsSince(date1) _ = b1.name ==> "Ben" _ = b2.name ==> "Cay" // Cay added since transaction time date2 List(c1) <- Person.name.getObjsSince(date2) _ = c1.name ==> "Cay" // Nothing added since transaction time date3 _ <- Person.name.getObjsSince(date3).map(_ ==> Nil) } yield ()
- 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
- GetObjs
-
def
getObjsSince(tx: TxReport, n: Int)(implicit conn: Future[Conn], ec: ExecutionContext): Future[List[Obj]]
Get Future with List of n rows as objects matching a molecule since tx.
Get Future with List of n rows as objects matching a molecule since tx.
Datomic's internalsincecan 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 likeget,update,retractetc.for { // Get tx reports for 3 transactions tx1 <- Person.name("Ann").save tx2 <- Person.name("Ben").save tx3 <- Person.name("Cay").save // Current values List(a1, a2, a3) <- Person.name.getObjs _ = a1.name ==> "Ann" _ = a2.name ==> "Ben" _ = a3.name ==> "Cay" // Ben and Cay added since tx1 List(b1, b2) <- Person.name.getObjsSince(tx1) _ = b1.name ==> "Ben" _ = b2.name ==> "Cay" // Ben and Cay added since tx1 - only n (1) rows returned List(c1) <- Person.name.getObjsSince(tx1, 1) _ = c1.name ==> "Ben" } yield ()
- tx
- 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
- GetObjs
-
def
getObjsSince(tx: TxReport)(implicit conn: Future[Conn], ec: ExecutionContext): Future[List[Obj]]
Get Future with List of all rows as objects matching a molecule since tx.
Get Future with List of all rows as objects matching a molecule since tx.
Datomic's internalsincecan 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 likeget,update,retractetc.for { // Get tx reports for 3 transactions tx1 <- Person.name("Ann").save tx2 <- Person.name("Ben").save tx3 <- Person.name("Cay").save // Current values List(a1, a2, a3) <- Person.name.getObjs _ = a1.name ==> "Ann" _ = a2.name ==> "Ben" _ = a3.name ==> "Cay" // Ben and Cay added since transaction time tx1 List(b1, b2) <- Person.name.getObjsSince(tx1) _ = b1.name ==> "Ben" _ = b2.name ==> "Cay" // Cay added since transaction time tx2 List(c1) <- Person.name.getObjsSince(tx2) _ = c1.name ==> "Cay" // Nothing added since transaction time tx3 _ <- Person.name.getObjsSince(tx3).map(_ ==> Nil) } yield ()
- tx
- 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
- GetObjs
-
def
getObjsSince(t: Long, n: Int)(implicit conn: Future[Conn], ec: ExecutionContext): Future[List[Obj]]
Get Future with List of n rows as objects matching a molecule since transaction time
t.Get Future with List of n rows as objects matching a molecule since transaction time
t.
Transaction timetis an auto-incremented transaction number assigned internally by Datomic.
tcan for instance be retrieved by callington the tx report returned from transactional operations and then be used to get data since that point in time (excluding that transaction):for { // 3 transaction times `t` t1 <- Person.name("Ann").save.map(_.t) t2 <- Person.name("Ben").save.map(_.t) t3 <- Person.name("Cay").save.map(_.t) // Current values List(a1, a2, a3) <- Person.name.getObjs _ = a1.name ==> "Ann" _ = a2.name ==> "Ben" _ = a3.name ==> "Cay" // Ben and Cay added since transaction time t1 List(b1, b2) <- Person.name.getObjsSince(t1) _ = b1.name ==> "Ben" _ = b2.name ==> "Cay" // Ben and Cay added since transaction time t1 - only n (1) rows returned List(c1) <- Person.name.getObjsSince(t1, 1) _ = c1.name ==> "Ben" } yield ()
- 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
- GetObjs
-
def
getObjsSince(t: Long)(implicit conn: Future[Conn], ec: ExecutionContext): Future[List[Obj]]
Get Future with List of all rows as objects matching a molecule since transaction time
t.Get Future with List of all rows as objects matching a molecule since transaction time
t.
Transaction timetis an auto-incremented transaction number assigned internally by Datomic.
tcan for instance be retrieved by callington the tx report returned from transactional operations and then be used to get data since that point in time (excluding that transaction):for { // 3 transaction times `t` t1 <- Person.name("Ann").save.map(_.t) t2 <- Person.name("Ben").save.map(_.t) t3 <- Person.name("Cay").save.map(_.t) // Current values List(a1, a2, a3) <- Person.name.getObjs _ = a1.name ==> "Ann" _ = a2.name ==> "Ben" _ = a3.name ==> "Cay" // Ben and Cay added since transaction time t1 List(b1, b2) <- Person.name.getObjsSince(t1) _ = b1.name ==> "Ben" _ = b2.name ==> "Cay" // Cay added since transaction time t2 List(c1) <- Person.name.getObjsSince(t2) _ = c1.name ==> "Cay" // Nothing added since transaction time t3 _ <- Person.name.getObjsSince(t3).map(_ ==> Nil) } yield ()
- 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
- GetObjs
-
def
getObjsWith(n: Int, txMolecules: Future[Seq[Statement]]*)(implicit conn: Future[Conn], ec: ExecutionContext): Future[List[Obj]]
Get Future with List of n rows as objects matching a molecule with applied molecule transaction data.
Get Future with List of n rows as objects matching a 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:for { // Current state List(ben, liz) <- Person.name.likes.insert( ("Ben", "pasta"), ("Liz", "pizza") ).map(_.eids) List(p1, p2) <- Person.name.likes.getObjs _ = p1.name ==> "Ben" _ = p1.likes ==> "pasta" _ = p2.name ==> "Liz" _ = p2.likes ==> "pizza" // Test multiple transactions List(testP1, testP2) <- Person.name.likes.getObjsWith( Person(ben).likes("sushi").getUpdateStmts, Person(liz).likes("cake").getUpdateStmts ) // 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: List(oneTestP) <- Person.name.likes.getObjsWith( 1 Person(ben).likes("sushi").getUpdateStmts, Person(liz).likes("cake").getUpdateStmts ) // Effect: sushi and cake now liked (but only Ben returned) _ = oneTestP.name ==> "Ben" _ = oneTestP.likes ==> "sushi" // Current state is still the same List(p3, p4) <- Person.name.likes.getObjs _ = p3.name ==> "Ben" _ = p3.likes ==> "pasta" _ = p4.name ==> "Liz" _ = p4.likes ==> "pizza" } yield ()
- 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
- GetObjs
- Note
Note how the
nparameter has to come before thetxMoleculesvararg.
-
def
getObjsWith(txMolecules: Future[Seq[Statement]]*)(implicit conn: Future[Conn], ec: ExecutionContext): Future[List[Obj]]
Get Future with List of all rows as objects matching a molecule with applied molecule transaction data.
Get Future with List of all rows as objects matching a 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:for { // Current state ben <- Person.name("Ben").likes("pasta").save.map(_.eid) List(p0) <- Person.name.likes.getObjs _ = p0.name ==> "Ben" _ = p0.likes ==> "pasta" // Test adding transaction data List(pTest) <- Person.name.likes.getObjsWith( // Additional transaction data Person(ben).likes("sushi").getUpdateStmts ) // Effect: Ben would like sushi if tx was applied _ = pTest.name ==> "Ben" _ = pTest.likes ==> "sushi" // Current state is still the same List(pAfter) <- Person.name.likes.getObjs _ = pAfter.name ==> "Ben" _ = pAfter.likes ==> "pasta" } yield ()
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
- GetObjs
-
def
getSaveStmts(implicit conn: Future[Conn], ec: ExecutionContext): Future[Seq[Statement]]
Get transaction statements of a call to
saveon a molecule (without affecting the db).Get transaction statements of a call to
saveon a molecule (without affecting the db).- conn
Implicit Conn value in scope
- returns
Transaction statements
- Definition Classes
- Molecule_0
-
def
getSince(date: Date, n: Int)(implicit conn: Future[Conn], ec: ExecutionContext): Future[List[(A, B, C, D, E, F, G, H, I, J, K, L, M)]]
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 { // Transact 3 times (`inst` retrieves transaction time/Date from tx report) date1 <- Person.name("Ann").save.map(_.inst) date2 <- Person.name("Ben").save.map(_.inst) date3 <- Person.name("Cay").save.map(_.inst) // Current values _ <- Person.name.get.map(_ ==> List("Ann", "Ben", "Cay")) // Ben and Cay added since date1 _ <- Person.name.getSince(date1).map(_ ==> List("Ben", "Cay")) // Ben and Cay added since date1 - only n (1) rows returned _ <- Person.name.getSince(date1, 1).map(_ ==> List("Ben")) } yield ()
- 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
- GetTpls
-
def
getSince(date: Date)(implicit conn: Future[Conn], ec: ExecutionContext): Future[List[(A, B, C, D, E, F, G, H, I, J, K, L, M)]]
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 { // Transact 3 times (`inst` retrieves transaction time/Date from tx report) date1 <- Person.name("Ann").save.map(_.inst) date2 <- Person.name("Ben").save.map(_.inst) date3 <- Person.name("Cay").save.map(_.inst) // Current values _ <- Person.name.get.map(_ ==> List("Ann", "Ben", "Cay")) // Ben and Cay added since date1 _ <- Person.name.getSince(date1).map(_ ==> List("Ben", "Cay")) // Cay added since date2 _ <- Person.name.getSince(date2).map(_ ==> List("Cay")) // Nothing added since date3 _ <- Person.name.getSince(date3).map(_ ==> Nil) } yield ()
- 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
- GetTpls
-
def
getSince(txR: TxReport, n: Int)(implicit conn: Future[Conn], ec: ExecutionContext): Future[List[(A, B, C, D, E, F, G, H, I, J, K, L, M)]]
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 internalsincecan 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 likeget,update,retractetc.for { // Get tx reports for 3 transactions tx1 <- Person.name("Ann").save tx2 <- Person.name("Ben").save tx3 <- Person.name("Cay").save // Current values _ <- Person.name.get.map(_ ==> List("Ann", "Ben", "Cay")) // Ben and Cay added since tx1 _ <- Person.name.getSince(tx1).map(_ ==> List("Ben", "Cay")) // Ben and Cay added since tx1 - only n (1) rows returned _ <- Person.name.getSince(tx1, 1).map(_ ==> List("Ben")) } yield ()
- 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
- GetTpls
-
def
getSince(txR: TxReport)(implicit conn: Future[Conn], ec: ExecutionContext): Future[List[(A, B, C, D, E, F, G, H, I, J, K, L, M)]]
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 internalsincecan 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 likeget,update,retractetc.for { // Get tx reports for 3 transactions tx1 <- Person.name("Ann").save tx2 <- Person.name("Ben").save tx3 <- Person.name("Cay").save // Current values _ <- Person.name.get.map(_ ==> List("Ann", "Ben", "Cay")) // Ben and Cay added since tx1 _ <- Person.name.getSince(tx1).map(_ ==> List("Ben", "Cay")) // Cay added since tx2 _ <- Person.name.getSince(tx2).map(_ ==> List("Cay")) // Nothing added since tx3 _ <- Person.name.getSince(tx3).map(_ ==> Nil) } yield ()
- 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
- GetTpls
-
def
getSince(t: Long, n: Int)(implicit conn: Future[Conn], ec: ExecutionContext): Future[List[(A, B, C, D, E, F, G, H, I, J, K, L, M)]]
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 timetis an auto-incremented transaction number assigned internally by Datomic.
tcan for instance be retrieved by callington the tx report returned from transactional operations and then be used to get data since that point in time (excluding that transaction):for { // 3 transaction times `t` t1 <- Person.name("Ann").save.map(_.t) t2 <- Person.name("Ben").save.map(_.t) t3 <- Person.name("Cay").save.map(_.t) // Current values _ <- Person.name.get.map(_ ==> List("Ann", "Ben", "Cay")) // Ben and Cay added since transaction time t1 _ <- Person.name.getSince(t1).map(_ ==> List("Ben", "Cay")) // Ben and Cay added since transaction time t1 - only n (1) rows returned _ <- Person.name.getSince(t1, 1).map(_ ==> List("Ben")) } yield ()
- 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
- GetTpls
-
def
getSince(t: Long)(implicit conn: Future[Conn], ec: ExecutionContext): Future[List[(A, B, C, D, E, F, G, H, I, J, K, L, M)]]
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 timetis an auto-incremented transaction number assigned internally by Datomic.
tcan for instance be retrieved by callington the tx report returned from transactional operations and then be used to get data since that point in time (excluding that transaction):for { // 3 transaction times `t` t1 <- Person.name("Ann").save.map(_.t) t2 <- Person.name("Ben").save.map(_.t) t3 <- Person.name("Cay").save.map(_.t) // Current values _ <- Person.name.get.map(_ ==> List("Ann", "Ben", "Cay")) // Ben and Cay added since transaction time t1 _ <- Person.name.getSince(t1).map(_ ==> List("Ben", "Cay")) // Cay added since transaction time t2 _ <- Person.name.getSince(t2).map(_ ==> List("Cay")) // Nothing added since transaction time t3 _ <- Person.name.getSince(t3).map(_ ==> Nil) } yield ()
- 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
- GetTpls
-
def
getUpdateStmts(implicit conn: Future[Conn], ec: ExecutionContext): Future[Seq[Statement]]
Get transaction statements of a call to
updateon a molecule (without affecting the db).Get transaction statements of a call to
updateon a molecule (without affecting the db).- conn
Implicit Conn value in scope
- Definition Classes
- Molecule_0
-
def
getWith(n: Int, txData: Future[Seq[Statement]]*)(implicit conn: Future[Conn], ec: ExecutionContext): Future[List[(A, B, C, D, E, F, G, H, I, J, K, L, M)]]
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 to see how it would then look:for { // Current state List(ben, liz) <- Person.name.likes.insert( ("Ben", "pasta"), ("Liz", "pizza") ).eids // Test multiple transactions _ <- Person.name.likes.getWith( Person(ben).likes("sushi").getUpdateStmts, Person(liz).likes("cake").getUpdateStmts ).map(_ ==> List( ("Ben", "sushi") ("Liz", "cake") )) // Same as above, but only n (1) rows returned: _ <- Person.name.likes.getWith( 1 Person(ben).likes("sushi").getUpdateStmts, Person(liz).likes("cake").getUpdateStmts ).map(_ ==> List( ("Ben", "sushi") )) } yield ()
- 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
- GetTpls
- Note
Note how the
nparameter has to come before thetxMoleculesvararg.
-
def
getWith(txData: Future[Seq[Statement]]*)(implicit conn: Future[Conn], ec: ExecutionContext): Future[List[(A, B, C, D, E, F, G, H, I, J, K, L, M)]]
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 to see how it would then look:for { // Current state ben <- Person.name("Ben").likes("pasta").save.map(_.eid) // Base data _ <- Person.name.likes.getWith( // apply imaginary transaction data Person(ben).likes("sushi").getUpdateStmts ).map(_ ==> List( // Effect: Ben would like sushi if tx was applied ("Ben", "sushi") )) // Current state is still the same _ <- Person.name.likes.get.map(_ ==> List(("Ben", "pasta"))) } yield ()
Multiple transactions can be applied to test more complex what-if scenarios!
- 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
- GetTpls
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
indent(tabs: Int): String
- Definition Classes
- JsonBase
-
def
inspectGet(implicit futConn: Future[Conn]): Future[Unit]
Inspect call to
geton a molecule (without affecting the db).Inspect call to
geton 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- futConn
Implicit Conn value in scope
- Definition Classes
- ShowInspect
-
def
inspectGetAsOf(date: Date)(implicit conn: Future[Conn]): Future[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
-
def
inspectGetAsOf(tx: TxReport)(implicit conn: Future[Conn]): Future[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).- Definition Classes
- ShowInspect
-
def
inspectGetAsOf(t: Long)(implicit conn: Future[Conn]): Future[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
-
def
inspectGetHistory(implicit conn: Future[Conn]): Future[Unit]
Inspect call to
getHistoryon a molecule (without affecting the db).Inspect call to
getHistoryon 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
-
def
inspectGetSince(date: Date)(implicit conn: Future[Conn]): Future[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
-
def
inspectGetSince(tx: TxReport)(implicit conn: Future[Conn]): Future[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).- Definition Classes
- ShowInspect
-
def
inspectGetSince(t: Long)(implicit conn: Future[Conn]): Future[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
-
def
inspectGetWith(txMolecules: Seq[Statement]*)(implicit conn: Future[Conn]): Future[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
-
def
inspectSave(implicit conn: Future[Conn]): Future[Unit]
Inspect call to
saveon a molecule (without affecting the db).Inspect call to
saveon 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
-
def
inspectUpdate(implicit conn: Future[Conn]): Future[Unit]
Inspect call to
updateon a molecule (without affecting the db).Inspect call to
updateon 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
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isOptNested: Boolean
- Attributes
- protected
- Definition Classes
- Marshalling
-
def
iterableAsScalaIterable[A](i: Iterable[A]): Iterable[A]
- Definition Classes
- JavaConversions
-
implicit
def
iterableAsScalaIterableConverter[A](i: Iterable[A]): AsScala[Iterable[A]]
Adds an
asScalamethod that implicitly converts a JavaIterableto a ScalaIterable.Adds an
asScalamethod that implicitly converts a JavaIterableto a ScalaIterable.- Definition Classes
- JavaConversions
-
def
jsNumber(tpe: String, v: Any): Any
- Definition Classes
- Helpers
-
def
jsonAggrManyList(sb: StringBuffer, field: String, row: List[_], colIndex: Int, tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonAggr
-
def
jsonAggrManyListDate(sb: StringBuffer, field: String, row: List[_], colIndex: Int, tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonAggr
-
def
jsonAggrManyListDistinct(sb: StringBuffer, field: String, row: List[_], colIndex: Int, tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonAggr
-
def
jsonAggrManyListDistinctDate(sb: StringBuffer, field: String, row: List[_], colIndex: Int, tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonAggr
-
def
jsonAggrManyListDistinctQuoted(sb: StringBuffer, field: String, row: List[_], colIndex: Int, tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonAggr
-
def
jsonAggrManyListDistinctToString(sb: StringBuffer, field: String, row: List[_], colIndex: Int, tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonAggr
-
def
jsonAggrManyListQuoted(sb: StringBuffer, field: String, row: List[_], colIndex: Int, tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonAggr
-
def
jsonAggrManyListRand(sb: StringBuffer, field: String, row: List[_], colIndex: Int, tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonAggr
-
def
jsonAggrManyListRandDate(sb: StringBuffer, field: String, row: List[_], colIndex: Int, tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonAggr
-
def
jsonAggrManyListRandQuoted(sb: StringBuffer, field: String, row: List[_], colIndex: Int, tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonAggr
-
def
jsonAggrManyListRandToString(sb: StringBuffer, field: String, row: List[_], colIndex: Int, tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonAggr
-
def
jsonAggrManyListToString(sb: StringBuffer, field: String, row: List[_], colIndex: Int, tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonAggr
-
def
jsonAggrManySingle(sb: StringBuffer, field: String, row: List[_], colIndex: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonAggr
-
def
jsonAggrManySingleDate(sb: StringBuffer, field: String, row: List[_], colIndex: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonAggr
-
def
jsonAggrManySingleQuoted(sb: StringBuffer, field: String, row: List[_], colIndex: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonAggr
-
def
jsonAggrManySingleToString(sb: StringBuffer, field: String, row: List[_], colIndex: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonAggr
-
def
jsonAggrOneList(sb: StringBuffer, field: String, row: List[_], colIndex: Int, tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonAggr
-
def
jsonAggrOneListDate(sb: StringBuffer, field: String, row: List[_], colIndex: Int, tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonAggr
-
def
jsonAggrOneListDistinct(sb: StringBuffer, field: String, row: List[_], colIndex: Int, tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonAggr
-
def
jsonAggrOneListDistinctDate(sb: StringBuffer, field: String, row: List[_], colIndex: Int, tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonAggr
-
def
jsonAggrOneListDistinctQuoted(sb: StringBuffer, field: String, row: List[_], colIndex: Int, tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonAggr
-
def
jsonAggrOneListDistinctToString(sb: StringBuffer, field: String, row: List[_], colIndex: Int, tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonAggr
-
def
jsonAggrOneListQuoted(sb: StringBuffer, field: String, row: List[_], colIndex: Int, tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonAggr
-
def
jsonAggrOneListRand(sb: StringBuffer, field: String, row: List[_], colIndex: Int, tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonAggr
-
def
jsonAggrOneListRandDate(sb: StringBuffer, field: String, row: List[_], colIndex: Int, tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonAggr
-
def
jsonAggrOneListRandQuoted(sb: StringBuffer, field: String, row: List[_], colIndex: Int, tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonAggr
-
def
jsonAggrOneListRandToString(sb: StringBuffer, field: String, row: List[_], colIndex: Int, tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonAggr
-
def
jsonAggrOneListToString(sb: StringBuffer, field: String, row: List[_], colIndex: Int, tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonAggr
-
def
jsonAggrSingleSample(sb: StringBuffer, field: String, row: List[_], colIndex: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonAggr
-
def
jsonAggrSingleSampleDate(sb: StringBuffer, field: String, row: List[_], colIndex: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonAggr
-
def
jsonAggrSingleSampleQuoted(sb: StringBuffer, field: String, row: List[_], colIndex: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonAggr
-
def
jsonAggrSingleSampleToString(sb: StringBuffer, field: String, row: List[_], colIndex: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonAggr
-
def
jsonAnyValue(sb: StringBuffer, v: Any): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonBase
-
def
jsonMany(sb: StringBuffer, field: String, row: List[_], colIndex: Int, tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonTypes
-
def
jsonManyDate(sb: StringBuffer, field: String, row: List[_], colIndex: Int, tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonTypes
-
def
jsonManyQuoted(sb: StringBuffer, field: String, row: List[_], colIndex: Int, tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonTypes
-
def
jsonManyToString(sb: StringBuffer, field: String, row: List[_], colIndex: Int, tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonTypes
-
def
jsonMap(sb: StringBuffer, field: String, row: List[_], colIndex: Int, tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonTypes
-
def
jsonMapQuoted(sb: StringBuffer, field: String, row: List[_], colIndex: Int, tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonTypes
-
def
jsonOne(sb: StringBuffer, field: String, row: List[_], colIndex: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonTypes
-
def
jsonOneAny(sb: StringBuffer, field: String, row: List[_], colIndex: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonTypes
-
def
jsonOneDate(sb: StringBuffer, field: String, row: List[_], colIndex: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonTypes
-
def
jsonOneQuoted(sb: StringBuffer, field: String, row: List[_], colIndex: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonTypes
-
def
jsonOneToString(sb: StringBuffer, field: String, row: List[_], colIndex: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonTypes
-
def
jsonOptApplyMany(sb: StringBuffer, field: String, row: List[_], colIndex: Int, tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonTypes
-
def
jsonOptApplyManyDate(sb: StringBuffer, field: String, row: List[_], colIndex: Int, tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonTypes
-
def
jsonOptApplyManyQuoted(sb: StringBuffer, field: String, row: List[_], colIndex: Int, tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonTypes
-
def
jsonOptApplyManyToString(sb: StringBuffer, field: String, row: List[_], colIndex: Int, tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonTypes
-
def
jsonOptApplyMap(sb: StringBuffer, field: String, row: List[_], colIndex: Int, tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonTypes
-
def
jsonOptApplyMapQuoted(sb: StringBuffer, field: String, row: List[_], colIndex: Int, tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonTypes
-
def
jsonOptApplyOne(sb: StringBuffer, field: String, row: List[_], colIndex: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonTypes
-
def
jsonOptApplyOneDate(sb: StringBuffer, field: String, row: List[_], colIndex: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonTypes
-
def
jsonOptApplyOneQuoted(sb: StringBuffer, field: String, row: List[_], colIndex: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonTypes
-
def
jsonOptApplyOneToString(sb: StringBuffer, field: String, row: List[_], colIndex: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonTypes
-
def
jsonOptMany(sb: StringBuffer, field: String, row: List[_], colIndex: Int, tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonTypes
-
def
jsonOptManyDate(sb: StringBuffer, field: String, row: List[_], colIndex: Int, tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonTypes
-
def
jsonOptManyEnum(sb: StringBuffer, field: String, row: List[_], colIndex: Int, tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonTypes
-
def
jsonOptManyQuoted(sb: StringBuffer, field: String, row: List[_], colIndex: Int, tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonTypes
-
def
jsonOptManyRefAttr(sb: StringBuffer, field: String, row: List[_], colIndex: Int, tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonTypes
-
def
jsonOptManyToString(sb: StringBuffer, field: String, row: List[_], colIndex: Int, tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonTypes
-
def
jsonOptMap(sb: StringBuffer, field: String, row: List[_], colIndex: Int, tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonTypes
-
def
jsonOptMapQuoted(sb: StringBuffer, field: String, row: List[_], colIndex: Int, tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonTypes
-
def
jsonOptNestedMany(sb: StringBuffer, field: String, it: Iterator[_], tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonOptNested
-
def
jsonOptNestedManyDate(sb: StringBuffer, field: String, it: Iterator[_], tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonOptNested
-
def
jsonOptNestedManyEnum(sb: StringBuffer, field: String, it: Iterator[_], tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonOptNested
-
def
jsonOptNestedManyQuoted(sb: StringBuffer, field: String, it: Iterator[_], tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonOptNested
-
def
jsonOptNestedManyRefAttr(sb: StringBuffer, field: String, it: Iterator[_], tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonOptNested
-
def
jsonOptNestedManyToString(sb: StringBuffer, field: String, it: Iterator[_], tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonOptNested
-
def
jsonOptNestedMap(sb: StringBuffer, field: String, it: Iterator[_], tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonOptNested
-
def
jsonOptNestedMapQuoted(sb: StringBuffer, field: String, it: Iterator[_], tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonOptNested
-
def
jsonOptNestedOne(sb: StringBuffer, field: String, it: Iterator[_]): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonOptNested
-
def
jsonOptNestedOneAny(sb: StringBuffer, field: String, it: Iterator[_]): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonOptNested
-
def
jsonOptNestedOneDate(sb: StringBuffer, field: String, it: Iterator[_]): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonOptNested
-
def
jsonOptNestedOneEnum(sb: StringBuffer, field: String, it: Iterator[_]): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonOptNested
-
def
jsonOptNestedOneQuoted(sb: StringBuffer, field: String, it: Iterator[_]): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonOptNested
-
def
jsonOptNestedOneRefAttr(sb: StringBuffer, field: String, it: Iterator[_]): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonOptNested
-
def
jsonOptNestedOneToString(sb: StringBuffer, field: String, it: Iterator[_]): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonOptNested
-
def
jsonOptNestedOptMany(sb: StringBuffer, field: String, it0: Iterator[_], tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonOptNested
-
def
jsonOptNestedOptManyDate(sb: StringBuffer, field: String, it0: Iterator[_], tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonOptNested
-
def
jsonOptNestedOptManyEnum(sb: StringBuffer, field: String, it0: Iterator[_], tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonOptNested
-
def
jsonOptNestedOptManyQuoted(sb: StringBuffer, field: String, it0: Iterator[_], tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonOptNested
-
def
jsonOptNestedOptManyRefAttr(sb: StringBuffer, field: String, it0: Iterator[_], tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonOptNested
-
def
jsonOptNestedOptManyToString(sb: StringBuffer, field: String, it0: Iterator[_], tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonOptNested
-
def
jsonOptNestedOptMap(sb: StringBuffer, field: String, it: Iterator[_], tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonOptNested
-
def
jsonOptNestedOptMapQuoted(sb: StringBuffer, field: String, it: Iterator[_], tabs: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonOptNested
-
def
jsonOptNestedOptOne(sb: StringBuffer, field: String, it: Iterator[_]): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonOptNested
-
def
jsonOptNestedOptOneDate(sb: StringBuffer, field: String, it: Iterator[_]): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonOptNested
-
def
jsonOptNestedOptOneEnum(sb: StringBuffer, field: String, it: Iterator[_]): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonOptNested
-
def
jsonOptNestedOptOneQuoted(sb: StringBuffer, field: String, it: Iterator[_]): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonOptNested
-
def
jsonOptNestedOptOneRefAttr(sb: StringBuffer, field: String, it: Iterator[_]): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonOptNested
-
def
jsonOptNestedOptOneToString(sb: StringBuffer, field: String, it: Iterator[_]): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonOptNested
-
def
jsonOptOne(sb: StringBuffer, field: String, row: List[_], colIndex: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonTypes
-
def
jsonOptOneDate(sb: StringBuffer, field: String, row: List[_], colIndex: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonTypes
-
def
jsonOptOneEnum(sb: StringBuffer, field: String, row: List[_], colIndex: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonTypes
-
def
jsonOptOneQuoted(sb: StringBuffer, field: String, row: List[_], colIndex: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonTypes
-
def
jsonOptOneRefAttr(sb: StringBuffer, field: String, row: List[_], colIndex: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonTypes
-
def
jsonOptOneToString(sb: StringBuffer, field: String, row: List[_], colIndex: Int): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonTypes
-
def
list(items: AnyRef*): List[AnyRef]
- Definition Classes
- JavaUtil
-
def
localOffset: String
- Definition Classes
- DateHandling
-
def
localZoneOffset: ZoneOffset
- Definition Classes
- DateHandling
-
def
mapAsJavaConcurrentMap[K, V](m: Map[K, V]): ConcurrentMap[K, V]
- Definition Classes
- JavaConversions
-
implicit
def
mapAsJavaConcurrentMapConverter[K, V](m: Map[K, V]): AsJava[ConcurrentMap[K, V]]
Adds an
asJavamethod that implicitly converts a Scala mutableconcurrent.Mapto a JavaConcurrentMap.Adds an
asJavamethod that implicitly converts a Scala mutableconcurrent.Mapto a JavaConcurrentMap.- Definition Classes
- JavaConversions
-
def
mapAsJavaMap[K, V](m: Map[K, V]): Map[K, V]
- Definition Classes
- JavaConversions
-
implicit
def
mapAsJavaMapConverter[K, V](m: Map[K, V]): AsJava[Map[K, V]]
Adds an
asJavamethod that implicitly converts a ScalaMapto a JavaMap.Adds an
asJavamethod that implicitly converts a ScalaMapto a JavaMap.- Definition Classes
- JavaConversions
-
def
mapAsScalaConcurrentMap[A, B](m: ConcurrentMap[A, B]): Map[A, B]
- Definition Classes
- JavaConversions
-
implicit
def
mapAsScalaConcurrentMapConverter[K, V](m: ConcurrentMap[K, V]): AsScala[Map[K, V]]
Adds an
asScalamethod that implicitly converts a JavaConcurrentMapto a Scala mutableconcurrent.Map.Adds an
asScalamethod that implicitly converts a JavaConcurrentMapto a Scala mutableconcurrent.Map.- Definition Classes
- JavaConversions
-
def
mapAsScalaMap[A, B](m: Map[A, B]): Map[A, B]
- Definition Classes
- JavaConversions
-
implicit
def
mapAsScalaMapConverter[K, V](m: Map[K, V]): AsScala[Map[K, V]]
Adds an
asScalamethod that implicitly converts a JavaMapto a Scala mutableMap.Adds an
asScalamethod that implicitly converts a JavaMapto a Scala mutableMap.- Definition Classes
- JavaConversions
-
def
marshallInputs(q: Query): (Seq[(Int, String, String)], Seq[(Int, String, Seq[String])], Seq[(Int, String, Seq[Seq[String]])])
- Definition Classes
- ColOps
-
def
maxRows: Int
- Definition Classes
- ShowInspect
-
def
mutableMapAsJavaMap[K, V](m: Map[K, V]): Map[K, V]
- Definition Classes
- JavaConversions
-
implicit
def
mutableMapAsJavaMapConverter[K, V](m: Map[K, V]): AsJava[Map[K, V]]
Adds an
asJavamethod that implicitly converts a Scala mutableMapto a JavaMap.Adds an
asJavamethod that implicitly converts a Scala mutableMapto a JavaMap.- Definition Classes
- JavaConversions
-
def
mutableSeqAsJavaList[A](s: Seq[A]): List[A]
- Definition Classes
- JavaConversions
-
implicit
def
mutableSeqAsJavaListConverter[A](b: Seq[A]): AsJava[List[A]]
Adds an
asJavamethod that implicitly converts a Scala mutableSeqto a JavaList.Adds an
asJavamethod that implicitly converts a Scala mutableSeqto a JavaList.- Definition Classes
- JavaConversions
-
def
mutableSetAsJavaSet[A](s: Set[A]): Set[A]
- Definition Classes
- JavaConversions
-
implicit
def
mutableSetAsJavaSetConverter[A](s: Set[A]): AsJava[Set[A]]
Adds an
asJavamethod that implicitly converts a Scala mutableSetto a JavaSet.Adds an
asJavamethod that implicitly converts a Scala mutableSetto a JavaSet.- Definition Classes
- JavaConversions
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
nestedLevels: Int
- Attributes
- protected
- Definition Classes
- Marshalling
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
o(opt: Option[Any]): String
- Definition Classes
- Helpers
-
def
obj: Obj
- Attributes
- protected
- Definition Classes
- Marshalling
-
final
def
os(opt: Option[Set[_]]): String
- Definition Classes
- Helpers
-
def
packed2json(vs: Iterator[String], sb: StringBuffer): StringBuffer
- Attributes
- protected
- Definition Classes
- Marshalling
-
def
packed2obj(vs: Iterator[String]): Obj
- Attributes
- protected
- Definition Classes
- Marshalling
-
def
packed2tpl(vs: Iterator[String]): (A, B, C, D, E, F, G, H, I, J, K, L, M)
- Attributes
- protected
- Definition Classes
- Marshalling
-
def
pad(longest: Int, shorter: Int): String
- Definition Classes
- Helpers
-
def
padS(longest: Int, str: String): String
- Definition Classes
- Helpers
-
def
pair(sb: StringBuffer, field: String, value: Any): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonBase
-
def
propertiesAsScalaMap(p: Properties): Map[String, String]
- Definition Classes
- JavaConversions
-
implicit
def
propertiesAsScalaMapConverter(p: Properties): AsScala[Map[String, String]]
Adds an
asScalamethod that implicitly converts a JavaPropertiesto a Scala mutableMap[String, String].Adds an
asScalamethod that implicitly converts a JavaPropertiesto a Scala mutableMap[String, String].- Definition Classes
- JavaConversions
-
def
quote(sb: StringBuffer, s: String): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonBase
-
def
quotedPair(sb: StringBuffer, field: String, value: String): StringBuffer
- Attributes
- protected
- Definition Classes
- JsonBase
-
def
refIndexes: List[List[Int]]
- Attributes
- protected
- Definition Classes
- Marshalling
-
final
def
render(value: Any): String
- Definition Classes
- Helpers
-
def
row2json(row: List[AnyRef], sb: StringBuffer): StringBuffer
- Attributes
- protected
- Definition Classes
- Marshalling
-
def
row2obj(row: List[AnyRef]): Obj
- Attributes
- protected
- Definition Classes
- Marshalling
-
def
row2tpl(row: List[AnyRef]): (A, B, C, D, E, F, G, H, I, J, K, L, M)
- Attributes
- protected
- Definition Classes
- Marshalling
-
def
save(implicit conn: Future[Conn], ec: ExecutionContext): Future[TxReport]
Save data applied to molecule attributes.
Save data applied to molecule attributes.
ReturnsFuturewith TxReport having info about the result of the save transaction.for { _ <- Person.name("Ben").age(42).save _ <- Person.name.age.get.map(_.head ==> ("Ben", 42)) } yield ()
The save operation is asynchronous and non-blocking. Internally calls Datomic's asynchronous API.
- conn
Implicit Conn value in scope
- returns
Future with TxReport with info about the result of the
savetransaction.
- Definition Classes
- Molecule_0
-
def
seqAsJavaList[A](s: Seq[A]): List[A]
- Definition Classes
- JavaConversions
-
implicit
def
seqAsJavaListConverter[A](b: Seq[A]): AsJava[List[A]]
Adds an
asJavamethod that implicitly converts a ScalaSeqto a JavaList.Adds an
asJavamethod that implicitly converts a ScalaSeqto a JavaList.- Definition Classes
- JavaConversions
-
def
setAsJavaSet[A](s: Set[A]): Set[A]
- Definition Classes
- JavaConversions
-
implicit
def
setAsJavaSetConverter[A](s: Set[A]): AsJava[Set[A]]
Adds an
asJavamethod that implicitly converts a ScalaSetto a JavaSet.Adds an
asJavamethod that implicitly converts a ScalaSetto a JavaSet.- Definition Classes
- JavaConversions
-
final
def
sq[T](values: Seq[T]): String
- Definition Classes
- Helpers
-
def
str2date(s: String, zoneOffset: ZoneOffset = localZoneOffset): Date
- Definition Classes
- DateHandling
-
def
str2zdt(s: String, zoneOffset: ZoneOffset = localZoneOffset): ZonedDateTime
- Definition Classes
- DateHandling
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
tacitIndexes: List[List[Int]]
- Attributes
- protected
- Definition Classes
- Marshalling
-
def
thousands(i: Long): String
- Definition Classes
- Helpers
-
final
def
time(n: Int, prev: Int = 0): Unit
- Attributes
- protected
- Definition Classes
- Helpers
-
def
toJavaList(scalaList: Seq[List[_]]): List[List[_]]
- Definition Classes
- JavaUtil
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
truncateDateStr(dateStr: String): String
- Definition Classes
- DateHandling
-
final
def
tupleToSeq(arg: Any): Seq[Any]
- Attributes
- protected
- Definition Classes
- Helpers
-
def
unescStr(s: String): String
- Definition Classes
- Helpers
-
final
def
untupled(rawData: Iterable[Seq[Any]]): Iterable[Seq[Any]]
- Definition Classes
- Helpers
-
def
update(implicit conn: Future[Conn], ec: ExecutionContext): Future[TxReport]
Update entity with data applied to molecule attributes.
Update entity with data applied to molecule attributes. Returns
Futurewith TxReport having info about the result of the update transaction.for { _ <- Person.name("Ben").age(42).save benId = saveStmts.map(_.eid) _ <- Person(benId).age(43).update _ <- Person.name.age.get.map(_.head ==> ("Ben", 43)) } yield ()
The update operation is asynchronous and non-blocking. Internally calls Datomic's asynchronous API.
- Definition Classes
- Molecule_0
-
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()
-
def
zone: ZoneId
- Definition Classes
- DateHandling
- object getInsertStmts extends getInsertStmts
- object insert extends insert
- object inspectInsert extends inspectInsert
Inherited from Molecule_0[Obj, (A, B, C, D, E, F, G, H, I, J, K, L, M)]
Inherited from ShowInspect[Obj, (A, B, C, D, E, F, G, H, I, J, K, L, M)]
Inherited from JavaConversions
Inherited from GetJson[Obj, (A, B, C, D, E, F, G, H, I, J, K, L, M)]
Inherited from JavaUtil
Inherited from GetObjs[Obj, (A, B, C, D, E, F, G, H, I, J, K, L, M)]
Inherited from GetTpls[Obj, (A, B, C, D, E, F, G, H, I, J, K, L, M)]
Inherited from ColOps
Inherited from JsonOptNested
Inherited from JsonAggr
Inherited from JsonTypes
Inherited from JsonBase
Inherited from CastOptNested
Inherited from CastAggr
Inherited from CastTypes
Inherited from Marshalling[Obj, (A, B, C, D, E, F, G, H, I, J, K, L, M)]
Inherited from Helpers
Inherited from DateHandling
Inherited from RegexMatching
Inherited from Molecule
Inherited from AnyRef
Inherited from Any
getAsync
getJsonAsOf
getJsonSince
getJsonWith
get
getAsOf
getSince
getWith
getHistory
save
insert
update
getStmts
Inspect get
Molecule getter inspecting methods.
Inspect operation
Molecule operation inspecting methods (no effect on live db).

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