After several years of work, I have now completed and released Molecule 1.0 (web, github) - a non-blocking asynchronous domain-customizable database query language for Scala and Scala.js against the Datomic database.
Molecule makes Datomic transactions and queries intuitive and type-safe. Here’s a simple example of building molecules using the words of some Person domain data model:
Person.name("Bob").age(42).Address.street("Sesame Street 4").save Person.name.age.Address.street.get.map(_.head ==> ("Bob", 42, "Sesame Street 4") )
This gets automatically translated to transaction data and Datalog query at compile time and executed against the Datomic database at runtime with minimal overhead.
Molecule can fetch typed tuples (as shown above), property objects or json and implements nearly all Datomic functionality, including nested hierarchies, associative relationships, time queries, transaction functions, reified transactions and more.
Both the Peer and Client apis are targeted.
Check out a sample project and give it a spin!