pellucidanalytics/datomisca — pull request #23 by dwhjames (2013-02-18 23:07:12+00:00)
Title: Introduce database and transaction functions

I’ve done some minor cleaning to `DatomicOps`, and I’ve made a first attempt at introducing database functions. `AddDbFunction` constructs transaction data to add a function to the database. `InvokeTxFunction` constructs transaction data to invoke a database function as a transaction function in a transaction.

I had some problems getting Datomic to accept Java code, so this only supports raw Clojure for now. (The Datomic compiler was complaining about imports when I gave it Java code.)

I’ve added a new sample application to demonstrate transaction functions, which was adapted from here: https://gist.github.com/pelle/2635666

Maybe you have some thoughts about how to improve/generalize the code?

We definitely need to add Datomic functions into the `DatomicData` hierarchy, as inspecting the value of a `:db/fn` attribute will currently throw an exception.