I’m using datomic on-prem version 1.0.6165 and I’m trying to make use of the xform feature in the pull api. It states specifically that :
The fn is either a fully qualified function allowed under the :xforms key in resources/datomic/extensions.edn , or one of the following built-ins…
But I fail to see an extensions.edn anywhere where I can override. Is this file supposed to be on the transactor’s classpath? The peer server’s classpath? Is there an example anywhere on how to configure it? The documentation seems a bit light
Since the pull api is only reading data, it means it runs within the peer library, which runs within your application, so the mentioned datomic/extension.edn should be on your application’s classpath, assuming resources/ is specified in the :paths key of your application’s deps.edn.
(I haven’t tried it yet, but that’s my understanding.)
For the record, this is how the program fails if the function is not allowed from the extensions.edn:
echo '{:xforms [my.custom/disable-xform]}' > resources/datomic/extensions.edn
time clj ...
#'user/uri
true
Execution error (ExceptionInfo) at datomic.extension-resolver/anomaly! (extension_resolver.clj:24).
'my.custom/xform' is not allowed by datomic/extensions.edn
Full report at:
/var/folders/2y/8p3dxqr946v837dq1bp3t3t40000gn/T/clojure-9247805102933861.edn
clj -Sdeps -e 8.71s user 0.42s system 272% cpu 3.347 total