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)
| 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 | /// |
no outgoing calls
no test coverage detected