7个版本
0.1.11 | 2024年6月4日 |
---|---|
0.1.10 | 2023年7月30日 |
#117 in 科学
每月58次下载
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