Cypherize is an OGM which connects a Cypher-based database (Neo4j) to a JS application. Cypherize is intended to be familiar to those who have used Sequelize.
- Neo4j must be installed
- Install Neo4j
- Create a database in Neo4j, noting what password you use at setup.
- Copy
secrets_example.js
and rename your copy tosecrets.js
. Add the password for your database to the appropriate spot. npm install
- Run tests (
npm test
) and ensure they pass. - You should be ready to go!
- TESTED (works to the best of my knowledge)
- UNTESTED (may or may not work- don't use)
- We can connect to the database and use the methods in connection.js and nodes.js to...
- add node
- find nodes
- update nodes
- delete node
- add connection
- find connections
- update connections
- delete connection
- We can define models which have a name and fields
- These models have methods...
- Model.create(options)
- Model.findAll(options)
- Model.findOne(options)
- Model.delete(options)
- model.setProperty(options)
- Key names for properties on a node/connection set using Cypherize must adhere to the following rules
- Alphanumeric and underscore are the only characters allowed (Any other characters will be stripped)