7个版本

0.1.11 2024年6月4日
0.1.10 2023年7月30日

#117 in 科学

Download history 117/week @ 2024-04-27 1/week @ 2024-05-04 131/week @ 2024-06-01 11/week @ 2024-06-08 1/week @ 2024-06-15 40/week @ 2024-06-29 22/week @ 2024-07-27

每月58次下载

MIT许可

295KB
6K SLoC

zawgl-core

Zawgl 图形核心库

用法

示例用法

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();
 }

依赖项

~0.6–1.2MB
~27K SLoC