6 releases

0.1.10 Jul 30, 2023
0.1.9 Jul 28, 2023

#227 in Science

30 downloads per month

MIT license

295KB
6K SLoC

zawgl-core

Zawgl graph core library

Usage

Sample usage:

use zawgl_core::{model::{init::InitContext, Node, Property, PropertyValue, Relationship}, repository::graph_repository::GraphRepository};

fn main() {
    SimpleLogger::new().with_level(LevelFilter::Info).init().unwrap();
    let ctx: InitContext = InitContext::new("zawgl-db").expect("can't create database context");
    let mut gr = GraphRepository::new(ctx);
    let mut node = Node::new();
    node.set_labels(vec!["Person".to_string()]);
    node.set_properties(vec![Property::new("age".to_string(), PropertyValue::PInteger(42))]);
    let node_with_id = gr.create_node(&node).unwrap();
    gr.sync();
 }

Dependencies

~0.7–1.3MB
~29K SLoC