Skip to content

Instantly share code, notes, and snippets.

@theY4Kman
Created December 1, 2014 10:23
Show Gist options
  • Select an option

  • Save theY4Kman/b66f8cde75116edcfc9a to your computer and use it in GitHub Desktop.

Select an option

Save theY4Kman/b66f8cde75116edcfc9a to your computer and use it in GitHub Desktop.

My gut instinct is directory structure comes natural if you understand the components of the library. I don't think it requires a laborious planning process. So, I'm gonna recount the components:

  • Underlying compiler (converts an AST directly to a Cypher query)
    • Actual compiler (lucking out because there's only one dialect: Neo4j's Cypher)
    • Basic elements of the compiler (MATCH, RETURN, etc)
    • Basic types of Neo4j (string, int, float, array)
    • Base type classes, defining the contract of types, and making user-defined types easy to define (akin to SQLA's TypeEngine and TypeDecorator)
  • Object Graph Mapper (OGM, the ORM of graph shit, ooh-la-la -- NoSQL with relationships)
    • Node base class
    • Relationship base class
    • Property managers, allowing Nodes and Relationships to have labels and properties
  • Exceptions
  • Utilities: collections, compatibility libraries (most copied right from SQLAlchemy -- I have little shame, much respect, and a desire not to waste time)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment