Eta (Haskell) and Neo4j
This is a repository combining examples from the neo4j website on stored procedures and user functions and from the Eta website on how to export Java functions written in Eta (Haskell).
Make sure you set
JAVA_HOME to your Java 8 directory in
If everything goes well it produces
output.jar in the root directory
of this repository. Copy that file to neo4j's
plugins directory, for
me that is
neo4j and try out the
neo4j-sh (?)$ return example.fib(12); +-----------------+ | example.fib(12) | +-----------------+ | 233 | +-----------------+ 1 row 55 ms
- Eta currently does not support annotations, so we need a Java wrapper library.
- Make sure the Eta project is compiled as an executable, otherwise
the Eta runtime won't be included and execution of the user function
will fail with
Failed to invoke function 'example.fib': Caused by: java.lang.NoClassDefFoundError: eta/runtime/stg/StgClosure.
- Use a very simple local maven repository to store the produced
jarfile, this makes sure that it's included in the next
jarfile that gets included by neo4j.