Search code examples
phpneo4jcypherneo4jphp

Cypher vs Neo4jPhp


I'm new to the neo4j platform and I've just started to implement the Neo4j in my server.

I've started to do all the connection between the php and the db with the neo4j functions and not with the Cypher language.

The problem that i'm having is that i feel that the neo4jPhp really lack a lot of options that i could do with the Cypher language like merge, Constraints and more. Anther thing ,to do some easy actions like add new node and set a label to it, I need to do 2 calls to the db with the save().

Am i doing something wrong? or it just better to use the Cypher queries instead of the neo4jphp?

I'm feeling the the things i can do with Cypher is so much more that the neo4jphp


Solution

  • Using the neo4jphp Node/Relationship/Label entities is not required, if you do not wish to use them. If you feel more comfortable using Cypher queries, that is what you should use. Neo4jphp can do Cypher queries. Here are the docs to get you started https://github.com/jadell/neo4jphp/wiki/Cypher-and-gremlin-queries.

    It can also handle Cypher transactions https://github.com/jadell/neo4jphp/wiki/Cypher-Transactions

    If there are any missing features in neo4jphp that you need, please open a github issue.