Load neo4j database with java -
i have neo4j database ready , want make java app retrieving data it. how can load made database in program , query it? in code i'm giving below want initialize db object database.
thanks in advance
executionengine engine = new executionengine(db); string query = ""; executionresult result = engine.execute( query);
see tutorial in neo4j manual:
http://docs.neo4j.org/chunked/stable/tutorials-cypher-java.html
graphdatabaseservice db = new graphdatabasefactory().newembeddeddatabase( db_path ); executionengine engine = new executionengine( db ); executionresult result = engine.execute( "start n=node(*) n.name! = 'my node' return n, n.name" );
make sure keep db , execution engine in shared variable. , shutdown()
db when program ends.
Comments
Post a Comment