You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ability to relate resources (directionally) using an expressive library (not just parent/child) that can eventually persist to graph databases. A query syntax would also be required to traverse relationships depending on persistence mode.
// creates bidirectional link ?
rel.create(user, creature, 'friend');
Note: third param could be options to define type of relationship / schema along with directionality and make the relationships introspectable - easily graphed for doc generation and visual navigation uis.
// query
rel.find(user, 'friend');
Ideally more params could be added to support a detailed query syntax - start node, other node, depth, etc... and could utilize query engines for the different persistence adapters.
I don't know exactly how this should work in terms of IOC, if it makes more sense for it to be core resource functionality, or sit on top. It should be easy enough to extend the resource with methods like the persistence resource does (CRUD) to allow for orm style queries of relationships.
user.rel.create()
user.rel.find()
The text was updated successfully, but these errors were encountered:
The ability to relate resources (directionally) using an expressive library (not just parent/child) that can eventually persist to graph databases. A query syntax would also be required to traverse relationships depending on persistence mode.
http://docs.neo4j.org/chunked/milestone/graphdb-neo4j-relationships.html
http://aseemk.com/talks/neo4j-with-nodejs#/
var rel = resource.use('relationship');
// creates bidirectional link ?
rel.create(user, creature, 'friend');
Note: third param could be options to define type of relationship / schema along with directionality and make the relationships introspectable - easily graphed for doc generation and visual navigation uis.
// query
rel.find(user, 'friend');
Ideally more params could be added to support a detailed query syntax - start node, other node, depth, etc... and could utilize query engines for the different persistence adapters.
I don't know exactly how this should work in terms of IOC, if it makes more sense for it to be core resource functionality, or sit on top. It should be easy enough to extend the resource with methods like the persistence resource does (CRUD) to allow for orm style queries of relationships.
user.rel.create()
user.rel.find()
The text was updated successfully, but these errors were encountered: