zawgl-core

Crates.iozawgl-core
lib.rszawgl-core
version0.1.11
sourcesrc
created_at2023-07-09 10:09:12.3826
updated_at2024-06-04 07:12:54.916091
descriptionZawgl Graph Core Library
homepage
repository
max_upload_size
id911940
size295,647
Alexandre RICCIARDI (alexandre-ricciardi)

documentation

README

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();
 }
Commit count: 0

cargo fmt