Developed in R*** [Redacted due to policy] and implemented by a Gremlin inspired traversal language.
Graph architectures have become increasingly popular in software design - databases, query languages, machine learning, etc. Neo4j and GraphQL are great examples. I wanted to see the hype myself but instead by implementing it myself and seeing how things work behind the scenes.
I'll probably do the same for relational databases via B+ trees since im on the topic of creating small-scale databases.
let mut graph = Graph::new();
let v1 = graph.add_vertex(hashmap!{
"name".into() => Value::String("foo".into()),
"type".into() => Value::String("banana".into())
}).unwrap();
let v2 = graph.add_vertex(hashmap!{
"name".into() => Value::String("bar".into()),
"type".into() => Value::String("orange".into())
}).unwrap();
graph.add_edge(v1, v2, "fruitier".into(), hashmap!{});
let mut q = Query::new(&graph, VertexFilter::Id(v1));
let out = q.out(EdgeFilter::None).run();
assert_eq!(out, vec![QueryResult::Vertex(v2)]);
Testing files for the DB are in tests
Small disclaimer this DB does use hashmaps BUT for the purpose of creating a graph.
- R*** [Redacted due to policy]
- Graphs/Hashmaps, Traversals
- Gremlin (Traversal Query Languages)
- maplit = "0.1.4"