forked from jexp/neo4j-java-rest-binding
-
Notifications
You must be signed in to change notification settings - Fork 69
Connect and Query Example
alexfrieden edited this page Apr 22, 2013
·
2 revisions
public class TestConnect { public static void main(String[] args) { System.out.println("starting test"); final RestAPI api = new RestAPIFacade("http://localhost:7474/db/data"); System.out.println("API created"); final RestCypherQueryEngine engine = new RestCypherQueryEngine(api); System.out.println("engine created"); QueryResult<Map<String,Object>> result = engine.query("start n=node({id}) return n;", map("id",0)))
System.out.println("query created");
for (Map<String, Object> row : result) {
long id=((Number)row.get("id")).longValue();
System.out.println("id is " + id);
System.out.println(row.get("myRow"));
}
} }