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)
| 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 | /// |