Skip to main content

persistence/
persistence.rs

1use git_vdb::{open, Point};
2
3fn main() -> git_vdb::Result<()> {
4    let temporary = tempfile::TempDir::new()?;
5    let path = temporary.path().join("vectors.git");
6    open(&path)?
7        .collection("docs")
8        .upsert([Point::new("stable-id", [1.0, 0.0])])?;
9    assert_eq!(open(&path)?.collection("docs").count()?, 1);
10    Ok(())
11}