You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/ROOT/pages/extending-neo4j/customized-code.adoc
+11-5Lines changed: 11 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,8 +4,8 @@
4
4
[[neo4j-customized-code]]
5
5
= Neo4j customized code
6
6
7
-
_User-defined procedures_ and _user-defined functions_ are mechanisms that enable you to extend Neo4j by writing customized code, which can be invoked directly from Cypher.
8
-
This is the preferred means for extending Neo4j.
7
+
Neo4j allows you to extend its functionality by writing your own code using _user-defined_ procedures and functions.
8
+
These mechanisms can be invoked directly from Cypher and are the preferred way of extending Neo4j.
9
9
10
10
Examples of use cases for procedures and functions are:
11
11
@@ -14,10 +14,16 @@ Examples of use cases for procedures and functions are:
14
14
* To perform graph-global operations, such as counting connected components or finding dense nodes.
15
15
* To express a procedural operation that is difficult to express declaratively with Cypher.
16
16
17
-
Procedures and functions are written in Java and compiled into JAR files.
18
-
They are deployed to the database by dropping that JAR file into the _plugins_ directory on each standalone or clustered server.
17
+
To write these procedures and functions, you must use Java and compile them into JAR files. Once compiled, these JAR files are deployed to the _NEO4J_HOME/plugins_ directory on each standalone or clustered server and loaded during start-up.
19
18
For the location of the _plugins_ directory, refer to link:{neo4j-docs-base-uri}/operations-manual/{page-version}/configuration/file-locations[Operations Manual -> Default file locations].
20
-
The database must be restarted on each server to pick up new procedures and functions.
19
+
20
+
label:enterprise-only[] From Neo4j 5.14 onwards, you can use the built-in procedure `CALL dbms.reloadProcedure()` to reload procedures and functions without restarting the DBMS.
21
+
Keep in mind that in a cluster deployment, you need to call this procedure on each cluster member.
22
+
23
+
[NOTE]
24
+
====
25
+
The reload process is isolated so that the operation only affects new transactions. Currently, running transactions continue to execute with a snapshot of the available procedures at their respective initialization.
26
+
====
21
27
22
28
Procedures and functions can take arguments and return results.
23
29
In addition, procedures can perform write operations on the database.
0 commit comments