https://github.com/reshiadavan/levaunadb
My Extensible In-Memory Graph Database.
https://github.com/reshiadavan/levaunadb
cargo graph-database graphs gremlin rust
Last synced: 6 days ago
JSON representation
My Extensible In-Memory Graph Database.
- Host: GitHub
- URL: https://github.com/reshiadavan/levaunadb
- Owner: ReshiAdavan
- Created: 2023-03-19T14:30:39.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-11-09T15:29:23.000Z (over 2 years ago)
- Last Synced: 2025-01-12T23:09:48.552Z (over 1 year ago)
- Topics: cargo, graph-database, graphs, gremlin, rust
- Language: Rust
- Homepage:
- Size: 17.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# LevaunaDB
Developed in R\*\*\* [Redacted due to policy] and implemented by a Gremlin inspired traversal language.
### Inspiration
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.
### Sample
```
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`
### Skills
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)
### Dependencies
- maplit = "0.1.4"