sqlitegraph/backend/sqlite/
types.rs1use serde::{Deserialize, Serialize};
7
8#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize)]
10pub enum BackendDirection {
11 Outgoing,
12 Incoming,
13}
14
15#[derive(Clone, Debug)]
17pub struct NeighborQuery {
18 pub direction: BackendDirection,
19 pub edge_type: Option<String>,
20}
21
22impl Default for NeighborQuery {
23 fn default() -> Self {
24 Self {
25 direction: BackendDirection::Outgoing,
26 edge_type: None,
27 }
28 }
29}
30
31#[derive(Clone, Debug)]
33pub struct NodeSpec {
34 pub kind: String,
35 pub name: String,
36 pub file_path: Option<String>,
37 pub data: serde_json::Value,
38}
39
40#[derive(Clone, Debug)]
42pub struct EdgeSpec {
43 pub from: i64,
44 pub to: i64,
45 pub edge_type: String,
46 pub data: serde_json::Value,
47}