Figure out how custom statements could output to multiple graph formats
beechnut opened this issue · 1 comments
Okay, first things first, the compiler really wants Formatter objects instead of this string handling here.
Second and most importantly, we need to figure out how to support custom statements for various output formats.
Parse the Cypher and do something with it
Parse the Cypher (maybe with libcypher-parser) and render JSON or GEXF with the output. Use FFI to get the output into Ruby. May be difficult to implement, but easier on the authors.
Custom formatter per language
Custom formatter is scoped to a specific output format, so you write a template and then outputs for JSON, GEXF, and/or Cypher, whichever you're using. Maybe this is what we start with for now; I'd like to get Neo4j out of the Aspen Editor stack. Relatively simple to implement but requires more writing on the authors' part, which is antithetical to the goals of Aspen.
Introduce an abstraction
Have an abstracted graph templating language that looks like Cypher but isn't, perhaps a subset. This would require long-term support, and be quite complex, and would introduce quite a few limitations because it can't support full Cypher.
I've been hearing about GQL, a standard Graph Query Language. If we wait long enough, this problem might solve itself.