Liking cljdoc? Tell your friends :D

Matlab

Setup

JqEqrlS

Go to http://neo4j.com/download and download, install and start neo4j 3.3.1.

After providing the initial password, choose a new password, you’ll need it later.

Type into the command-line at the top: :play movies, click the big block of text which is then copied into the command-line and hit the triangular "Run" button (or press Ctrl-Enter).

The data is inserted and should be visualized.

Get JDBC Driver

Download the Neo4j jdbc driver from neo4j-contrib/neo4j-jdbc GitHub releases Need the older version b/c MATLAB still runs on Java 7

curl -O "$HOME/Documents/MATLAB/neo4j-jdbc-driver-3.1.0.jar" https://github.com/neo4j-contrib/neo4j-jdbc/releases/download/3.1.0/neo4j-jdbc-driver-3.1.0.jar

Add the jar to the class pah via javaaddpath

javaaddpath([matlabroot,'/neo4j-jdbc-driver-3.1.0.jar'])

and check that the dynamic path contains the jar

javaclasspath

Test Connection

34491711 d06858e2 efe4 11e7 96de 941f4ac06844
Open Connection
conn = database('','neo4j','test','org.neo4j.jdbc.BoltNeo4jDriver','jdbc:neo4j:bolt://localhost:7687')
Fetch Total Node Count
curs = exec(conn,'MATCH (n) RETURN count(*)')
curs = fetch(curs);
curs.Data
close(curs)
Output
ans =

    '102671'
Fetch Movies
curs = exec(conn,'MATCH (n:Movie) RETURN n.title, n.released, n.tagline')
curs = fetch(curs).Data
curs.Data
close(curs)
Output
ans =

    'The Matrix'                         '1999'    'Welcome to the Real World'
    'The Matrix Reloaded'                '2003'    'Free your mind'
    'The Matrix Revolutions'             '2003'    'Everything that has a beginni…'
    'The Devil's Advocate'               '1997'    'Evil has its winning ways'
    'A Few Good Men'                     '1992'    'In the heart of the nation's …'
    'Top Gun'                            '1986'    'I feel the need, the need for…'
    'Jerry Maguire'                      '2000'    'The rest of his life begins n…'
....
Close Connection
close(conn)

Can you improve this documentation? These fine people already did:
Lorenzo Speranzoni & glaggia-larus
Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close