0

I am using JDBC driver (org.neo4j.jdbc.bolt.BoltDriver) to connect to neo4j (jdbc link url : neo4j-jdbc-driver-link) . Could see we need to write SQL while executing query.

Can we write a SQL query instead of CQL like SELECT p.* FROM products as p;?

Luanne
  • 19,145
  • 1
  • 39
  • 51
  • Note that Cypher isn't hard to pick up. The equivalent of that query is, assuming we have :Product nodes: `MATCH (p:Product) RETURN p`, though note this will only be a single column for `p` with a map of properties per row. As Luanne says, Neo4j doesn't have a concept of tables, there's nothing nailing down the properties a node of a particular label must have. SQL can dynamically infer the columns since that's defined in the products table. That doesn't exist in Neo4j, so that can't be inferred (without a more complex query and a label scan), and even then that wouldn't be dynamic. – InverseFalcon Dec 09 '19 at 19:58

1 Answers1

0

No, it accepts only Cypher. There is no concept of tables in Neo4j. The docs are at https://neo4j-contrib.github.io/neo4j-jdbc/

Luanne
  • 19,145
  • 1
  • 39
  • 51