1use serde::{Deserialize, Serialize};
9
10#[derive(Debug, Clone, Serialize, Deserialize)]
16pub struct CallGraphNode {
17 pub name: String,
18 pub file_path: String,
19 pub kind: String,
20 pub depth: i32,
21}
22
23#[derive(Debug, Clone, Serialize, Deserialize)]
25pub struct ImpactNode {
26 pub name: String,
27 pub file_path: String,
28 pub kind: String,
29 pub distance: i32,
30}
31
32#[derive(Debug, Clone, Serialize, Deserialize)]
34pub struct ComplexityResult {
35 pub name: String,
36 pub file_path: String,
37 pub line: u32,
38 pub fan_out: i64,
39 pub fan_in: i64,
40 pub complexity_score: i64,
41 pub severity: String,
42}
43
44#[derive(Debug, Clone, Serialize, Deserialize)]
46#[allow(dead_code)]
47pub struct ModuleDep {
48 pub source_module: String,
49 pub target_module: String,
50 pub imported_names: Vec<String>,
51}
52
53#[derive(Debug, Clone, Serialize, Deserialize)]
55pub struct FileStats {
56 pub file_path: String,
57 pub symbol_count: i64,
58 pub functions: i64,
59 pub structs: i64,
60 pub enums: i64,
61 pub public_symbols: i64,
62}
63
64#[cfg(feature = "duckdb")]
69mod duckdb_impl;
70
71#[cfg(not(feature = "duckdb"))]
72mod stub;
73
74#[cfg(feature = "duckdb")]
75pub use duckdb_impl::Analytics;
76
77#[cfg(feature = "duckdb")]
78pub use duckdb_impl::{SqlColumn, SqlResult};
79
80#[cfg(not(feature = "duckdb"))]
81pub use stub::Analytics;