use splice::graph::CodeGraph;
use std::path::Path;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let db_path = Path::new("/tmp/test_splice.db");
let _ = std::fs::remove_file(db_path);
let mut graph = CodeGraph::open(db_path)?;
println!("Database created successfully at {:?}", db_path);
let metadata = std::fs::metadata(db_path)?;
println!("Database file size: {} bytes", metadata.len());
let node_id = graph.store_symbol_with_file_and_language(
Path::new("test.rs"),
"test_function",
"function",
splice::symbol::Language::Rust,
0,
100,
0,
0,
0,
0, )?;
println!("Symbol inserted: {:?}", node_id);
let span = graph.get_span(node_id)?;
println!("Span retrieved: {:?}", span);
println!("\n✅ All Native V2 backend operations successful!");
Ok(())
}