Packages

  • package root

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

    Manual | scalamolecule.org | Github | Forum

    Definition Classes
    root
  • package molecule

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

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

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

    Sub-packages

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

    Definition Classes
    root
  • package action

    Various actions and operations on molecules and entities.

    Various actions and operations on molecules and entities.

    Definition Classes
    molecule
  • package exception
    Definition Classes
    action
  • package get

    Package with various synchronous getter methods to retrieve data from Datomic with molecules.

    Package with various synchronous getter methods to retrieve data from Datomic with molecules.

    For the Datomic Peer model, Datomic returns data synchronously. The Peer lives in application memory and caches data aggressively to save roundtrips to disk or memcached. Query results that can fit in memory will therefore have near-zero latency and return extremely fast.

    Molecule has not yet addressed the Client api although the query engine would be the same as for the current Peer version.

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

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

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

    • get [current data]
    • getAsOf
    • getSince
    • getWith
    • getHistory

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

    Definition Classes
    action
  • CompositeInserts
  • Entity
  • EntityOps
  • Molecule
  • OptionalMapOps
  • ShowDebug
t

molecule.action

CompositeInserts

trait CompositeInserts extends Helpers

Insert methods to create composite entities containing multiple sub-molecules/tuples.

Insert composite data

insert(
  // 2 sub-molecules
  Article.name.author, Tag.name.weight
)(
  // Rows of tuples, each with 2 sub-tuples of data matching sub-molecules
  List(
    (("Battle of Waterloo", "Ben Bridge"), ("serious", 5)),
    (("Best jokes ever", "John Cleese"), ("fun", 3))
  )
)(
  // Optional transaction meta data molecule saved with the tx entity created
  MetaData.submitter("Brenda Johnson").usecase("AddReviews")
)

Query inserted composite data

We can then query the composite data:

// Important articles submitted by Brenda Johnson
// In queries we tie composite sub-molecules together with `~`
m(Article.name.author ~ Tag.weight.>=(4).Tx(MetaData.submitter_("Brenda Johnson"))).get === List(
  (("Battle of Waterloo", "Ben Bridge"), 5)
)

Debug a composite insert

Without affecting the database, a composite insert can be debugged with debugInsert to see the produced output:

debugInsert(
  Article.name.author, Tag.name.weight
)(
  List(
    (("Battle of Waterloo", "Ben Bridge"), ("serious", 5)),
    (("Best jokes ever", "John Cleese"), ("fun", 3))
  )
)(
  MetaData.submitter("Brenda Johnson").usecase("AddReviews")
)

outputs:

## 1 ## Composite arity-2 insert debug
========================================================================
1      Model(
  1      Atom(article,name,String,1,VarValue,None,List(),List())
  2      Atom(article,author,String,1,VarValue,None,List(),List())
  3      Atom(tag,name,String,1,VarValue,None,List(),List())
  4      Atom(tag,weight,Long,1,VarValue,None,List(),List())
  5      TxMetaData(
    1      Atom(metaData,submitter,String,1,Eq(List(Brenda Johnson)),None,List(),List())
    2      Atom(metaData,usecase,String,1,Eq(List(AddReviews)),None,List(),List())))
------------------------------------------------
2      List(
  1      :db/add    'tempId    :article/name          'arg                                     Card(1)
  2      :db/add    'e         :article/author        'arg                                     Card(1)
  3      :db/add    'e         :tag/name              'arg                                     Card(1)
  4      :db/add    'e         :tag/weight            'arg                                     Card(1)
  5      :db/add    'tx        :metaData/submitter    Values(Eq(List(Brenda Johnson)),None)    Card(1)
  6      :db/add    'tx        :metaData/usecase      Values(Eq(List(AddReviews)),None)        Card(1))
------------------------------------------------
3      List(
  1      List(
    1      :db/add    #db/id[:db.part/user -1000097]    :article/name          Battle of Waterloo    Card(1)
    2      :db/add    #db/id[:db.part/user -1000097]    :article/author        Ben Bridge            Card(1)
    3      :db/add    #db/id[:db.part/user -1000097]    :tag/name              serious               Card(1)
    4      :db/add    #db/id[:db.part/user -1000097]    :tag/weight            5                     Card(1))
  2      List(
    1      :db/add    #db/id[:db.part/user -1000098]    :article/name          Best jokes ever       Card(1)
    2      :db/add    #db/id[:db.part/user -1000098]    :article/author        John Cleese           Card(1)
    3      :db/add    #db/id[:db.part/user -1000098]    :tag/name              fun                   Card(1)
    4      :db/add    #db/id[:db.part/user -1000098]    :tag/weight            3                     Card(1))
  3      List(
    1      :db/add    #db/id[:db.part/tx -1000100]      :metaData/submitter    Brenda Johnson        Card(1)
    2      :db/add    #db/id[:db.part/tx -1000100]      :metaData/usecase      AddReviews            Card(1)))
========================================================================

The two first sections are internal Molecule representations.

The third section shows the transactional data sent to Datomic (except the line indexing numbers in the left column) - in this case two rows of data and one row of transaction data.

Source
CompositeInserts.scala
See also

Manual: composite inserts | composites

Tests: composite inserts

Linear Supertypes
Helpers, AnyRef, Any
Type Hierarchy
Ordering
  1. Grouped
  2. Alphabetic
  3. By Inheritance
Inherited
  1. CompositeInserts
  2. Helpers
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. final def cast(value: Any): String
    Attributes
    protected
    Definition Classes
    Helpers
  6. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  7. final def date(s: String): Date
    Attributes
    protected
    Definition Classes
    Helpers
  8. def debugInsert[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](m1: Molecule[T1], m2: Molecule[T2], m3: Molecule[T3], m4: Molecule[T4], m5: Molecule[T5], m6: Molecule[T6], m7: Molecule[T7], m8: Molecule[T8], m9: Molecule[T9], m10: Molecule[T10], m11: Molecule[T11], m12: Molecule[T12], m13: Molecule[T13], m14: Molecule[T14], m15: Molecule[T15], m16: Molecule[T16], m17: Molecule[T17], m18: Molecule[T18], m19: Molecule[T19], m20: Molecule[T20], m21: Molecule[T21], m22: Molecule[T22])(data: Seq[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22)])(txMolecules: MoleculeBase*)(implicit conn: Conn): Unit
  9. def debugInsert[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](m1: Molecule[T1], m2: Molecule[T2], m3: Molecule[T3], m4: Molecule[T4], m5: Molecule[T5], m6: Molecule[T6], m7: Molecule[T7], m8: Molecule[T8], m9: Molecule[T9], m10: Molecule[T10], m11: Molecule[T11], m12: Molecule[T12], m13: Molecule[T13], m14: Molecule[T14], m15: Molecule[T15], m16: Molecule[T16], m17: Molecule[T17], m18: Molecule[T18], m19: Molecule[T19], m20: Molecule[T20], m21: Molecule[T21])(data: Seq[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21)])(txMolecules: MoleculeBase*)(implicit conn: Conn): Unit
  10. def debugInsert[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](m1: Molecule[T1], m2: Molecule[T2], m3: Molecule[T3], m4: Molecule[T4], m5: Molecule[T5], m6: Molecule[T6], m7: Molecule[T7], m8: Molecule[T8], m9: Molecule[T9], m10: Molecule[T10], m11: Molecule[T11], m12: Molecule[T12], m13: Molecule[T13], m14: Molecule[T14], m15: Molecule[T15], m16: Molecule[T16], m17: Molecule[T17], m18: Molecule[T18], m19: Molecule[T19], m20: Molecule[T20])(data: Seq[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20)])(txMolecules: MoleculeBase*)(implicit conn: Conn): Unit
  11. def debugInsert[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](m1: Molecule[T1], m2: Molecule[T2], m3: Molecule[T3], m4: Molecule[T4], m5: Molecule[T5], m6: Molecule[T6], m7: Molecule[T7], m8: Molecule[T8], m9: Molecule[T9], m10: Molecule[T10], m11: Molecule[T11], m12: Molecule[T12], m13: Molecule[T13], m14: Molecule[T14], m15: Molecule[T15], m16: Molecule[T16], m17: Molecule[T17], m18: Molecule[T18], m19: Molecule[T19])(data: Seq[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19)])(txMolecules: MoleculeBase*)(implicit conn: Conn): Unit
  12. def debugInsert[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](m1: Molecule[T1], m2: Molecule[T2], m3: Molecule[T3], m4: Molecule[T4], m5: Molecule[T5], m6: Molecule[T6], m7: Molecule[T7], m8: Molecule[T8], m9: Molecule[T9], m10: Molecule[T10], m11: Molecule[T11], m12: Molecule[T12], m13: Molecule[T13], m14: Molecule[T14], m15: Molecule[T15], m16: Molecule[T16], m17: Molecule[T17], m18: Molecule[T18])(data: Seq[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18)])(txMolecules: MoleculeBase*)(implicit conn: Conn): Unit
  13. def debugInsert[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17](m1: Molecule[T1], m2: Molecule[T2], m3: Molecule[T3], m4: Molecule[T4], m5: Molecule[T5], m6: Molecule[T6], m7: Molecule[T7], m8: Molecule[T8], m9: Molecule[T9], m10: Molecule[T10], m11: Molecule[T11], m12: Molecule[T12], m13: Molecule[T13], m14: Molecule[T14], m15: Molecule[T15], m16: Molecule[T16], m17: Molecule[T17])(data: Seq[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17)])(txMolecules: MoleculeBase*)(implicit conn: Conn): Unit
  14. def debugInsert[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16](m1: Molecule[T1], m2: Molecule[T2], m3: Molecule[T3], m4: Molecule[T4], m5: Molecule[T5], m6: Molecule[T6], m7: Molecule[T7], m8: Molecule[T8], m9: Molecule[T9], m10: Molecule[T10], m11: Molecule[T11], m12: Molecule[T12], m13: Molecule[T13], m14: Molecule[T14], m15: Molecule[T15], m16: Molecule[T16])(data: Seq[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16)])(txMolecules: MoleculeBase*)(implicit conn: Conn): Unit
  15. def debugInsert[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15](m1: Molecule[T1], m2: Molecule[T2], m3: Molecule[T3], m4: Molecule[T4], m5: Molecule[T5], m6: Molecule[T6], m7: Molecule[T7], m8: Molecule[T8], m9: Molecule[T9], m10: Molecule[T10], m11: Molecule[T11], m12: Molecule[T12], m13: Molecule[T13], m14: Molecule[T14], m15: Molecule[T15])(data: Seq[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)])(txMolecules: MoleculeBase*)(implicit conn: Conn): Unit
  16. def debugInsert[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14](m1: Molecule[T1], m2: Molecule[T2], m3: Molecule[T3], m4: Molecule[T4], m5: Molecule[T5], m6: Molecule[T6], m7: Molecule[T7], m8: Molecule[T8], m9: Molecule[T9], m10: Molecule[T10], m11: Molecule[T11], m12: Molecule[T12], m13: Molecule[T13], m14: Molecule[T14])(data: Seq[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)])(txMolecules: MoleculeBase*)(implicit conn: Conn): Unit
  17. def debugInsert[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13](m1: Molecule[T1], m2: Molecule[T2], m3: Molecule[T3], m4: Molecule[T4], m5: Molecule[T5], m6: Molecule[T6], m7: Molecule[T7], m8: Molecule[T8], m9: Molecule[T9], m10: Molecule[T10], m11: Molecule[T11], m12: Molecule[T12], m13: Molecule[T13])(data: Seq[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)])(txMolecules: MoleculeBase*)(implicit conn: Conn): Unit
  18. def debugInsert[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12](m1: Molecule[T1], m2: Molecule[T2], m3: Molecule[T3], m4: Molecule[T4], m5: Molecule[T5], m6: Molecule[T6], m7: Molecule[T7], m8: Molecule[T8], m9: Molecule[T9], m10: Molecule[T10], m11: Molecule[T11], m12: Molecule[T12])(data: Seq[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)])(txMolecules: MoleculeBase*)(implicit conn: Conn): Unit
  19. def debugInsert[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11](m1: Molecule[T1], m2: Molecule[T2], m3: Molecule[T3], m4: Molecule[T4], m5: Molecule[T5], m6: Molecule[T6], m7: Molecule[T7], m8: Molecule[T8], m9: Molecule[T9], m10: Molecule[T10], m11: Molecule[T11])(data: Seq[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)])(txMolecules: MoleculeBase*)(implicit conn: Conn): Unit
  20. def debugInsert[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10](m1: Molecule[T1], m2: Molecule[T2], m3: Molecule[T3], m4: Molecule[T4], m5: Molecule[T5], m6: Molecule[T6], m7: Molecule[T7], m8: Molecule[T8], m9: Molecule[T9], m10: Molecule[T10])(data: Seq[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)])(txMolecules: MoleculeBase*)(implicit conn: Conn): Unit
  21. def debugInsert[T1, T2, T3, T4, T5, T6, T7, T8, T9](m1: Molecule[T1], m2: Molecule[T2], m3: Molecule[T3], m4: Molecule[T4], m5: Molecule[T5], m6: Molecule[T6], m7: Molecule[T7], m8: Molecule[T8], m9: Molecule[T9])(data: Seq[(T1, T2, T3, T4, T5, T6, T7, T8, T9)])(txMolecules: MoleculeBase*)(implicit conn: Conn): Unit
  22. def debugInsert[T1, T2, T3, T4, T5, T6, T7, T8](m1: Molecule[T1], m2: Molecule[T2], m3: Molecule[T3], m4: Molecule[T4], m5: Molecule[T5], m6: Molecule[T6], m7: Molecule[T7], m8: Molecule[T8])(data: Seq[(T1, T2, T3, T4, T5, T6, T7, T8)])(txMolecules: MoleculeBase*)(implicit conn: Conn): Unit
  23. def debugInsert[T1, T2, T3, T4, T5, T6, T7](m1: Molecule[T1], m2: Molecule[T2], m3: Molecule[T3], m4: Molecule[T4], m5: Molecule[T5], m6: Molecule[T6], m7: Molecule[T7])(data: Seq[(T1, T2, T3, T4, T5, T6, T7)])(txMolecules: MoleculeBase*)(implicit conn: Conn): Unit
  24. def debugInsert[T1, T2, T3, T4, T5, T6](m1: Molecule[T1], m2: Molecule[T2], m3: Molecule[T3], m4: Molecule[T4], m5: Molecule[T5], m6: Molecule[T6])(data: Seq[(T1, T2, T3, T4, T5, T6)])(txMolecules: MoleculeBase*)(implicit conn: Conn): Unit
  25. def debugInsert[T1, T2, T3, T4, T5](m1: Molecule[T1], m2: Molecule[T2], m3: Molecule[T3], m4: Molecule[T4], m5: Molecule[T5])(data: Seq[(T1, T2, T3, T4, T5)])(txMolecules: MoleculeBase*)(implicit conn: Conn): Unit
  26. def debugInsert[T1, T2, T3, T4](m1: Molecule[T1], m2: Molecule[T2], m3: Molecule[T3], m4: Molecule[T4])(data: Seq[(T1, T2, T3, T4)])(txMolecules: MoleculeBase*)(implicit conn: Conn): Unit
  27. def debugInsert[T1, T2, T3](m1: Molecule[T1], m2: Molecule[T2], m3: Molecule[T3])(data: Seq[(T1, T2, T3)])(txMolecules: MoleculeBase*)(implicit conn: Conn): Unit
  28. def debugInsert[T1, T2](m1: Molecule[T1], m2: Molecule[T2])(data: Seq[(T1, T2)])(txMolecules: MoleculeBase*)(implicit conn: Conn): Unit

    Debug composite insert with 2 sub-molecules/tuples

    Debug composite insert with 2 sub-molecules/tuples

    A composite insert can be debugged to see the expected transaction in advance without affecting the database:

    debugInsert(
      Article.name.author, Tag.name.weight
    )(
      List(
        (("Battle of Waterloo", "Ben Bridge"), ("serious", 5)),
        (("Best jokes ever", "John Cleese"), ("fun", 3))
      )
    )(
      MetaData.submitter("Brenda Johnson").usecase("AddReviews")
    )

    This will print debugging info about the composite insert to output (without affecting the database):

    ## 1 ## Composite arity-2 insert debug
    =================================================================================================================
    1      Model(
      1      Atom(article,name,String,1,VarValue,None,List(),List())
      2      Atom(article,author,String,1,VarValue,None,List(),List())
      3      Atom(tag,name,String,1,VarValue,None,List(),List())
      4      Atom(tag,weight,Long,1,VarValue,None,List(),List())
      5      TxMetaData(
        1      Atom(metaData,submitter,String,1,Eq(List(Brenda Johnson)),None,List(),List())
        2      Atom(metaData,usecase,String,1,Eq(List(AddReviews)),None,List(),List())))
    ------------------------------------------------
    2      List(
      1      :db/add    'tempId    :article/name          'arg                                     Card(1)
      2      :db/add    'e         :article/author        'arg                                     Card(1)
      3      :db/add    'e         :tag/name              'arg                                     Card(1)
      4      :db/add    'e         :tag/weight            'arg                                     Card(1)
      5      :db/add    'tx        :metaData/submitter    Values(Eq(List(Brenda Johnson)),None)    Card(1)
      6      :db/add    'tx        :metaData/usecase      Values(Eq(List(AddReviews)),None)        Card(1))
    ------------------------------------------------
    3      List(
      1      List(
        1      :db/add    #db/id[:db.part/user -1000097]    :article/name          Battle of Waterloo    Card(1)
        2      :db/add    #db/id[:db.part/user -1000097]    :article/author        Ben Bridge            Card(1)
        3      :db/add    #db/id[:db.part/user -1000097]    :tag/name              serious               Card(1)
        4      :db/add    #db/id[:db.part/user -1000097]    :tag/weight            5                     Card(1))
      2      List(
        1      :db/add    #db/id[:db.part/user -1000098]    :article/name          Best jokes ever       Card(1)
        2      :db/add    #db/id[:db.part/user -1000098]    :article/author        John Cleese           Card(1)
        3      :db/add    #db/id[:db.part/user -1000098]    :tag/name              fun                   Card(1)
        4      :db/add    #db/id[:db.part/user -1000098]    :tag/weight            3                     Card(1))
      3      List(
        1      :db/add    #db/id[:db.part/tx -1000100]      :metaData/submitter    Brenda Johnson        Card(1)
        2      :db/add    #db/id[:db.part/tx -1000100]      :metaData/usecase      AddReviews            Card(1)))
    =================================================================================================================

    The two first sections are internal Molecule representations.

    The third shows the transactional data sent to Datomic, in this case two rows of data (each with 4 datoms) and one row of transaction data (2 datoms).

    T1

    Type of first data tuple (can be single type too)

    T2

    Type of second data tuple (can be single type too)

    m1

    First molecule of type Molecule[T1]

    m2

    Second molecule of type Molecule[T2]

    data

    List of tuples (rows) of sub-tuples, type: Seq[(T1, T2)]

    txMolecules

    Optional transaction molecule(s) with tx meta data applied to tx attributes.

    conn

    Implicit Conn in scope

    returns

    Unit (prints to output)

    See also

    Manual: Composite inserts

  29. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  30. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  31. final def f(a: Any): Any
    Attributes
    protected
    Definition Classes
    Helpers
  32. final def f2(a: Any): Any
    Attributes
    protected
    Definition Classes
    Helpers
  33. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  34. final def format(date: Date): String
    Attributes
    protected
    Definition Classes
    Helpers
  35. final def format2(date: Date): String
    Attributes
    protected
    Definition Classes
    Helpers
  36. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  37. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  38. def insert[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](m1: Molecule[T1], m2: Molecule[T2], m3: Molecule[T3], m4: Molecule[T4], m5: Molecule[T5], m6: Molecule[T6], m7: Molecule[T7], m8: Molecule[T8], m9: Molecule[T9], m10: Molecule[T10], m11: Molecule[T11], m12: Molecule[T12], m13: Molecule[T13], m14: Molecule[T14], m15: Molecule[T15], m16: Molecule[T16], m17: Molecule[T17], m18: Molecule[T18], m19: Molecule[T19], m20: Molecule[T20], m21: Molecule[T21], m22: Molecule[T22])(data: Seq[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22)])(txMolecules: MoleculeBase*)(implicit conn: Conn): TxReport
  39. def insert[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](m1: Molecule[T1], m2: Molecule[T2], m3: Molecule[T3], m4: Molecule[T4], m5: Molecule[T5], m6: Molecule[T6], m7: Molecule[T7], m8: Molecule[T8], m9: Molecule[T9], m10: Molecule[T10], m11: Molecule[T11], m12: Molecule[T12], m13: Molecule[T13], m14: Molecule[T14], m15: Molecule[T15], m16: Molecule[T16], m17: Molecule[T17], m18: Molecule[T18], m19: Molecule[T19], m20: Molecule[T20], m21: Molecule[T21])(data: Seq[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21)])(txMolecules: MoleculeBase*)(implicit conn: Conn): TxReport
  40. def insert[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](m1: Molecule[T1], m2: Molecule[T2], m3: Molecule[T3], m4: Molecule[T4], m5: Molecule[T5], m6: Molecule[T6], m7: Molecule[T7], m8: Molecule[T8], m9: Molecule[T9], m10: Molecule[T10], m11: Molecule[T11], m12: Molecule[T12], m13: Molecule[T13], m14: Molecule[T14], m15: Molecule[T15], m16: Molecule[T16], m17: Molecule[T17], m18: Molecule[T18], m19: Molecule[T19], m20: Molecule[T20])(data: Seq[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20)])(txMolecules: MoleculeBase*)(implicit conn: Conn): TxReport
  41. def insert[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](m1: Molecule[T1], m2: Molecule[T2], m3: Molecule[T3], m4: Molecule[T4], m5: Molecule[T5], m6: Molecule[T6], m7: Molecule[T7], m8: Molecule[T8], m9: Molecule[T9], m10: Molecule[T10], m11: Molecule[T11], m12: Molecule[T12], m13: Molecule[T13], m14: Molecule[T14], m15: Molecule[T15], m16: Molecule[T16], m17: Molecule[T17], m18: Molecule[T18], m19: Molecule[T19])(data: Seq[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19)])(txMolecules: MoleculeBase*)(implicit conn: Conn): TxReport
  42. def insert[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](m1: Molecule[T1], m2: Molecule[T2], m3: Molecule[T3], m4: Molecule[T4], m5: Molecule[T5], m6: Molecule[T6], m7: Molecule[T7], m8: Molecule[T8], m9: Molecule[T9], m10: Molecule[T10], m11: Molecule[T11], m12: Molecule[T12], m13: Molecule[T13], m14: Molecule[T14], m15: Molecule[T15], m16: Molecule[T16], m17: Molecule[T17], m18: Molecule[T18])(data: Seq[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18)])(txMolecules: MoleculeBase*)(implicit conn: Conn): TxReport
  43. def insert[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17](m1: Molecule[T1], m2: Molecule[T2], m3: Molecule[T3], m4: Molecule[T4], m5: Molecule[T5], m6: Molecule[T6], m7: Molecule[T7], m8: Molecule[T8], m9: Molecule[T9], m10: Molecule[T10], m11: Molecule[T11], m12: Molecule[T12], m13: Molecule[T13], m14: Molecule[T14], m15: Molecule[T15], m16: Molecule[T16], m17: Molecule[T17])(data: Seq[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17)])(txMolecules: MoleculeBase*)(implicit conn: Conn): TxReport
  44. def insert[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16](m1: Molecule[T1], m2: Molecule[T2], m3: Molecule[T3], m4: Molecule[T4], m5: Molecule[T5], m6: Molecule[T6], m7: Molecule[T7], m8: Molecule[T8], m9: Molecule[T9], m10: Molecule[T10], m11: Molecule[T11], m12: Molecule[T12], m13: Molecule[T13], m14: Molecule[T14], m15: Molecule[T15], m16: Molecule[T16])(data: Seq[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16)])(txMolecules: MoleculeBase*)(implicit conn: Conn): TxReport
  45. def insert[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15](m1: Molecule[T1], m2: Molecule[T2], m3: Molecule[T3], m4: Molecule[T4], m5: Molecule[T5], m6: Molecule[T6], m7: Molecule[T7], m8: Molecule[T8], m9: Molecule[T9], m10: Molecule[T10], m11: Molecule[T11], m12: Molecule[T12], m13: Molecule[T13], m14: Molecule[T14], m15: Molecule[T15])(data: Seq[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)])(txMolecules: MoleculeBase*)(implicit conn: Conn): TxReport
  46. def insert[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14](m1: Molecule[T1], m2: Molecule[T2], m3: Molecule[T3], m4: Molecule[T4], m5: Molecule[T5], m6: Molecule[T6], m7: Molecule[T7], m8: Molecule[T8], m9: Molecule[T9], m10: Molecule[T10], m11: Molecule[T11], m12: Molecule[T12], m13: Molecule[T13], m14: Molecule[T14])(data: Seq[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)])(txMolecules: MoleculeBase*)(implicit conn: Conn): TxReport
  47. def insert[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13](m1: Molecule[T1], m2: Molecule[T2], m3: Molecule[T3], m4: Molecule[T4], m5: Molecule[T5], m6: Molecule[T6], m7: Molecule[T7], m8: Molecule[T8], m9: Molecule[T9], m10: Molecule[T10], m11: Molecule[T11], m12: Molecule[T12], m13: Molecule[T13])(data: Seq[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)])(txMolecules: MoleculeBase*)(implicit conn: Conn): TxReport
  48. def insert[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12](m1: Molecule[T1], m2: Molecule[T2], m3: Molecule[T3], m4: Molecule[T4], m5: Molecule[T5], m6: Molecule[T6], m7: Molecule[T7], m8: Molecule[T8], m9: Molecule[T9], m10: Molecule[T10], m11: Molecule[T11], m12: Molecule[T12])(data: Seq[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)])(txMolecules: MoleculeBase*)(implicit conn: Conn): TxReport
  49. def insert[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11](m1: Molecule[T1], m2: Molecule[T2], m3: Molecule[T3], m4: Molecule[T4], m5: Molecule[T5], m6: Molecule[T6], m7: Molecule[T7], m8: Molecule[T8], m9: Molecule[T9], m10: Molecule[T10], m11: Molecule[T11])(data: Seq[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)])(txMolecules: MoleculeBase*)(implicit conn: Conn): TxReport
  50. def insert[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10](m1: Molecule[T1], m2: Molecule[T2], m3: Molecule[T3], m4: Molecule[T4], m5: Molecule[T5], m6: Molecule[T6], m7: Molecule[T7], m8: Molecule[T8], m9: Molecule[T9], m10: Molecule[T10])(data: Seq[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)])(txMolecules: MoleculeBase*)(implicit conn: Conn): TxReport
  51. def insert[T1, T2, T3, T4, T5, T6, T7, T8, T9](m1: Molecule[T1], m2: Molecule[T2], m3: Molecule[T3], m4: Molecule[T4], m5: Molecule[T5], m6: Molecule[T6], m7: Molecule[T7], m8: Molecule[T8], m9: Molecule[T9])(data: Seq[(T1, T2, T3, T4, T5, T6, T7, T8, T9)])(txMolecules: MoleculeBase*)(implicit conn: Conn): TxReport
  52. def insert[T1, T2, T3, T4, T5, T6, T7, T8](m1: Molecule[T1], m2: Molecule[T2], m3: Molecule[T3], m4: Molecule[T4], m5: Molecule[T5], m6: Molecule[T6], m7: Molecule[T7], m8: Molecule[T8])(data: Seq[(T1, T2, T3, T4, T5, T6, T7, T8)])(txMolecules: MoleculeBase*)(implicit conn: Conn): TxReport
  53. def insert[T1, T2, T3, T4, T5, T6, T7](m1: Molecule[T1], m2: Molecule[T2], m3: Molecule[T3], m4: Molecule[T4], m5: Molecule[T5], m6: Molecule[T6], m7: Molecule[T7])(data: Seq[(T1, T2, T3, T4, T5, T6, T7)])(txMolecules: MoleculeBase*)(implicit conn: Conn): TxReport
  54. def insert[T1, T2, T3, T4, T5, T6](m1: Molecule[T1], m2: Molecule[T2], m3: Molecule[T3], m4: Molecule[T4], m5: Molecule[T5], m6: Molecule[T6])(data: Seq[(T1, T2, T3, T4, T5, T6)])(txMolecules: MoleculeBase*)(implicit conn: Conn): TxReport
  55. def insert[T1, T2, T3, T4, T5](m1: Molecule[T1], m2: Molecule[T2], m3: Molecule[T3], m4: Molecule[T4], m5: Molecule[T5])(data: Seq[(T1, T2, T3, T4, T5)])(txMolecules: MoleculeBase*)(implicit conn: Conn): TxReport
  56. def insert[T1, T2, T3, T4](m1: Molecule[T1], m2: Molecule[T2], m3: Molecule[T3], m4: Molecule[T4])(data: Seq[(T1, T2, T3, T4)])(txMolecules: MoleculeBase*)(implicit conn: Conn): TxReport
  57. def insert[T1, T2, T3](m1: Molecule[T1], m2: Molecule[T2], m3: Molecule[T3])(data: Seq[(T1, T2, T3)])(txMolecules: MoleculeBase*)(implicit conn: Conn): TxReport
  58. def insert[T1, T2](m1: Molecule[T1], m2: Molecule[T2])(data: Seq[(T1, T2)])(txMolecules: MoleculeBase*)(implicit conn: Conn): TxReport

    Composite insert with 2 sub-molecules/tuples:

    Composite insert with 2 sub-molecules/tuples:

    insert(
      Article.name.author, Tag.name.weight
    )(
      List(
        (("Battle of Waterloo", "Ben Bridge"), ("serious", 5)),
        (("Best jokes ever", "John Cleese"), ("fun", 3))
      )
    )(
      MetaData.submitter("Brenda Johnson").usecase("AddReviews")
    )
    T1

    Type of first data tuple (can be single type too)

    T2

    Type of second data tuple (can be single type too)

    m1

    First molecule of type Molecule[T1]

    m2

    Second molecule of type Molecule[T2]

    data

    List of tuples (rows) of sub-tuples, type: Seq[(T1, T2)]

    txMolecules

    Optional transaction molecule(s) with tx meta data applied to tx attributes

    conn

    Implicit Conn in scope

    returns

    TxReport with result of insert

    See also

    Manual: Composite inserts

  59. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  60. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  61. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  62. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  63. final def o(opt: Option[Any]): String
    Attributes
    protected
    Definition Classes
    Helpers
  64. final lazy val sdf: SimpleDateFormat
    Attributes
    protected
    Definition Classes
    Helpers
  65. final def seq[T](values: Seq[T]): String
    Attributes
    protected
    Definition Classes
    Helpers
  66. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  67. final def time(n: Int, prev: Int = 0): Unit
    Attributes
    protected
    Definition Classes
    Helpers
  68. def toString(): String
    Definition Classes
    AnyRef → Any
  69. final def tupleToSeq(arg: Any): Seq[Any]
    Attributes
    protected
    Definition Classes
    Helpers
  70. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  71. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  72. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  73. object mkDate
    Attributes
    protected
    Definition Classes
    Helpers

Inherited from Helpers

Inherited from AnyRef

Inherited from Any

Composite inserts (arity 2-22)

Insert composite data with optional transaction data. See Composite insert

Ungrouped