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

Method query

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

Execute a GQL query in this session This is the main method for executing queries. For simple read queries, this is all you need. For multi-statement operations that need atomicity, use transactions instead. # Arguments `query` - GQL query string # Examples ```no_run # use graphlite_sdk::GraphLite; # let db = GraphLite::open("./mydb")?; let session = db.session("admin")?; // Simple query let

(&self, query: &str)

Source from the content-addressed store, hash-verified

170 /// # Ok::<(), graphlite_sdk::Error>(())
171 /// ```
172 pub fn query(&self, query: &str) -> Result<QueryResult> {
173 self.coordinator
174 .process_query(query, &self.id)
175 .map_err(|e| Error::Query(format!("Query failed: {}", e)))
176 }
177
178 /// Execute a statement without returning results
179 ///

Callers 6

executeMethod · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
runExampleMethod · 0.45

Calls 2

QueryEnum · 0.85
process_queryMethod · 0.80

Tested by

no test coverage detected