MCPcopy Create free account
hub / github.com/GraphLite-AI/GraphLite / open

Method open

sdk-rust/src/connection.rs:58–62  ·  view source on GitHub ↗

Open a GraphLite database at the given path Creates or opens a database at the specified path and initializes all necessary components. This is the main entry point for working with GraphLite databases. # Arguments `path` - Path to the database directory # Examples ```no_run use graphlite_sdk::GraphLite; let db = GraphLite::open("./mydb")?; # Ok::<(), graphlite_sdk::Error>(()) ```

(path: P)

Source from the content-addressed store, hash-verified

56 /// # Ok::<(), graphlite_sdk::Error>(())
57 /// ```
58 pub fn open<P: AsRef<std::path::Path>>(path: P) -> Result<Self> {
59 let coordinator = QueryCoordinator::from_path(path)
60 .map_err(|e| Error::Connection(format!("Failed to open database: {}", e)))?;
61 Ok(GraphLite { coordinator })
62 }
63
64 /// Create a new session for the given user
65 ///

Callers 2

runExampleMethod · 0.95
mainFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected