Skip to content

Commit 2e8fe61

Browse files
committed
Updated Readme
1 parent 8ee7040 commit 2e8fe61

File tree

1 file changed

+21
-10
lines changed

1 file changed

+21
-10
lines changed

README.adoc

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,18 @@
22

33
image:https://travis-ci.org/neo4j-contrib/neo4j-script-procedures.svg?branch=3.1["Build Status", link="https://travis-ci.org/neo4j-contrib/neo4j-script-procedures"]
44

5-
This project demonstrates how to create dynamic procedures on top of Neo4j's built in ones.
6-
You can create javascript functions in your database that can be later run using the 'nashorn' engine.
5+
This project demonstrates how to create dynamic procedures and functions on top of Neo4j's built in infrastructure.
6+
7+
You can create JavaScript functions in your database that can be later run using the 'nashorn' engine.
78

89
[Note]
9-
This project requires a Neo4j 3.0.0 snapshot or milestone dependency.
10+
This project requires Neo4j 3.1.x (not 3.1.2 though)
11+
12+
== Installation
13+
14+
1. Download the jar from the http://github.com/neo4j-contrib/neo4j-script-procedures/releases/latest[latest release]
15+
2. Copy it into your `$NEO4J_HOME/plugins` directory.
16+
3. Restart your server.
1017

1118
== Operations
1219

@@ -24,19 +31,24 @@ CALL scripts.function({name}, {code})
2431
.run function as procedure
2532
[source,cypher]
2633
----
27-
CALL scripts.run({name}, {params})
34+
CALL scripts.run({name}[, {params}])
2835
2936
CALL scripts.run('users', null)
37+
CALL scripts.run('users')
3038
3139
-> returns one user per row
3240
----
3341

3442
.run function as function
3543
[source,cypher]
3644
----
37-
RETURN scripts.run({name}, {params})
45+
RETURN scripts.run({name}[, {params}])
46+
47+
RETURN scripts.run('users', null) as users
48+
49+
or
3850
39-
RETURN scripts.run('users', null)
51+
RETURN scripts.run('users') as users
4052
4153
-> returns a list of users
4254
----
@@ -57,16 +69,15 @@ function type(s) { return org.neo4j.graphdb.RelationshipType.withName(s); }
5769
function collection(it) { r=[]; while (it.hasNext()) r.push(it.next()); return Java.to(r); }
5870
----
5971

60-
== Building
72+
== Building it yourself
6173

6274
This project uses maven, to build a jar-file with the procedure in this
6375
project, simply package the project with maven:
6476

6577
mvn clean package
6678

67-
This will produce a jar-file,`target/neo4j-javascript-procs-1.0.0-SNAPSHOT.jar`,
68-
that can be deployed in the `plugin` directory of your Neo4j instance.
79+
This will produce a jar-file,`target/neo4j-script-procedures-1.0.0-SNAPSHOT.jar`, that can be copied in the `$NEO4J_HOME/plugins` directory of your Neo4j instance.
6980

7081
== License
7182

72-
Apache License V2, see LICENSE
83+
Apache License V2, see LICENSE

0 commit comments

Comments
 (0)