nova_boot_graphdb/
types.rs1use serde::{Deserialize, Serialize};
2use serde_json::Value as JsonValue;
3use std::collections::HashMap;
4
5#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
7pub struct GraphNode {
8 pub id: String,
9 pub labels: Vec<String>,
10 pub properties: HashMap<String, JsonValue>,
11}
12
13#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
15pub struct GraphEdge {
16 pub id: String,
17 pub from: String,
18 pub to: String,
19 pub rel_type: String,
20 pub properties: HashMap<String, JsonValue>,
21}
22
23#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
25pub struct GraphSubgraph {
26 pub nodes: Vec<GraphNode>,
27 pub edges: Vec<GraphEdge>,
28}
29
30#[derive(Debug, Clone, PartialEq, Eq)]
32pub enum GraphQuery {
33 Cypher(String),
34 GraphQl(String),
35}