Skip to content

Commit

Permalink
fixes #523 - Add a apoc.version function (#524)
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniele Berton authored and jexp committed Aug 2, 2017
1 parent d3c45be commit 1ebee7b
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
6 changes: 6 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ group = 'org.neo4j.procedure'
version = '3.2.0.4'
archivesBaseName = 'apoc'

jar {
manifest {
attributes 'Implementation-Version': version
}
}

description = """neo4j-apoc-procedures"""

ext {
Expand Down
8 changes: 8 additions & 0 deletions readme.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,14 @@ Any version to be released after 1.1.0 will use a different, consistent versioni
|===

// end::version-matrix[]
=== Get APOC Version

To know your current `apoc` version you can use the *Function* :

[source,cypher]
----
RETURN apoc.version()
----

=== using APOC with Neo4j Docker image

Expand Down
18 changes: 18 additions & 0 deletions src/main/java/apoc/version/Version.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package apoc.version;

import org.neo4j.procedure.Description;
import org.neo4j.procedure.UserFunction;

/**
* @author AgileLARUS
* @since 24-07-17
*/

public class Version {

@UserFunction("apoc.version")
@Description("RETURN apoc.version() | return the current APOC installed version")
public String version() {
return Version.class.getPackage().getImplementationVersion();
}
}

0 comments on commit 1ebee7b

Please sign in to comment.