I want to execute cypher statment using neo4j-jdbc jar remotely.
When I execute the below cypher, I am getting resultset with 25 rows in neo4j web console.
MATCH (n:USER) RETURN n LIMIT 25
When I execute the same program using the neo4j-jdbc remotely, I am getting 0 results.
public static void main(String[] args) throws Exception {
Neo4jConnection connect = (Neo4jConnection) DriverManager.getConnection("jdbc:neo4j://localhost:7474","neo4j","Neo4J");
final PreparedStatement statement = connect.prepareStatement("MATCH (n:USER) RETURN n LIMIT 25");
final ResultSet result = statement.executeQuery();
System.out.println(result.getFetchSize());
result.close();
statement.close();
connect.close();
}
It is printing size as zero.
I am not sure, what is the mistake exactly.