Packages

p

molecule

datomic

package datomic

Content Hierarchy
Ordering
  1. Alphabetic
Visibility
  1. Public
  2. Protected

Package Members

  1. package base
  2. package client
  3. package peer

Type Members

  1. trait api extends Keywords with LogicImplicits with EntityOps with TxBundles with TxFunctions with GenericSchema with GenericLog with GenericAEVT with GenericAVET with GenericEAVT with GenericVAET

    Molecule API to be imported into your project to use Molecule with the Datomic Peer API.

    Molecule API to be imported into your project to use Molecule with the Datomic Peer API.

    To start using Molecule involves 2 initial steps:

    • Define your schema: Docs
    • sbt compile your project to let the sbt-molecule plugin generate your custom molecule DSL.

    Then you can start using your DSL and create molecules by importing the api, your DSL and assign a Datomic connection to an implicit val:

    import molecule.datomic.api._                       // import Molecule API
    import molecule.datomic.peer.facade.Datomic_Peer._  // import system api
    import path.to.dsl.yourDomain._                     // auto-generated custom DSL
    import path.to.schema.YourDomainSchema              // auto-generated custom Schema Transaction data
    
    implicit val conn = recreateDbFrom(YourDomainDefiniton) // Only once
    
    // Create molecules
    Person.name("Ben").age(42).save
    val benAge = Person.name_("Ben").age.get.head // 42
    // etc..

Ungrouped