Skip to content

ORM between cypher-based graph databases (neo4j) and javascript

Notifications You must be signed in to change notification settings

tessmonical/cypherize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

93 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cypherize

Goal

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.

Requirements

  • Neo4j must be installed

Setup

  1. Install Neo4j
  2. Create a database in Neo4j, noting what password you use at setup.
  3. Copy secrets_example.js and rename your copy to secrets.js. Add the password for your database to the appropriate spot.
  4. npm install
  5. Run tests (npm test) and ensure they pass.
  6. You should be ready to go!

Functionality

  • TESTED (works to the best of my knowledge)
  • UNTESTED (may or may not work- don't use)

Low level

  • 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

Higher level

  • 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)

Caveats and warnings

  • 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)

About

ORM between cypher-based graph databases (neo4j) and javascript

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published