rex-ogm
An Object Graph Mapper ("OGM") which dramatically simplifies the creation, storage, retrieval and removal of vertices and edges within a graph database running Rexster.
This package makes it easier to talk to the Graph database via the Rexster RESTful API from NodeJS. It is still very much a work in progress - this version only covers the main Vertex/Edge operations. I've tried to keep it as intuitive as possible and adopt some of the styles/conventions that other ODMs and ORMs utilise
Originally this was built as a library within another project but it continued to grow to the point where it had enough functionality that it was worth packing up and releasing.
Installation
Coming soon.
Quick start
Connecting & Initialisation
var rex = ; // Graph DB settings (optional, will default to localhost, 8182, graph)rexClientGraphoptions = 'host': 'localhost' 'port': 8182 'graph': 'graph'; var Vertex = ;var Edge = ;
Add Vertex with .save()
VertexfirstName = "Ben";VertexlastName = "Mag"; Vertex;
Add Vertex with .create()
var values = key: "firstName" value: "Ben" key: "lastName" value: "Dover"; Vertex;
Find Vertex
var vertexId = 1; Vertex;
Delete Vertex
var vertexId = 1; Vertex;