Welcome! Please see the About page for a little more info on how this works.

0 votes
in On-Prem by
edited by

Datomic Pro documentation, reference/database functions states:

You can deploy code to a Datomic system by installing database functions into a Datomic database, or by adding classpath functions to the Java classpath. Both database functions and classpath functions can be used as transaction functions that run inside a transaction to enforce arbitrary data invariants.

I understand that either kind "can be used as" a transaction function.
But in reality is this the only way either is used in practice?

I've been trying to unfangle what an implied other kind (that isn't used as a transaction function) could be and haven't found any examples.

So the conditions regarding taking the db value as first argument, and being pure function, actually apply to every function, whether database or classpath, that we may write?

1 Answer

+1 vote
edited by

I think it could be clearer in our docs and I will talk about this with the team, but Class path functions are transaction functions as well as query functions. You can add them in a different way, the class path, vs just transacting the fn to the db

Yes transaction functions/class path functions must be pure and free of side-effects:


Welcome to the Datomic Knowledgebase, where you can make features requests, ask questions and receive answers from other members of the community.