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

Method query_read_only

graphlite/src/catalog/manager.rs:106–120  ·  view source on GitHub ↗

Execute a read-only query on a catalog This method only accepts query operations and uses immutable access, allowing for concurrent read operations. # Arguments `catalog_name` - Name of the catalog to query `query_type` - Type of query to execute `params` - Query parameters # Returns `Ok(CatalogResponse)` with the query result `Err(CatalogError::CatalogNotFound)` if catalog doesn't exist `Err(C

(
        &self,
        catalog_name: &str,
        query_type: crate::catalog::operations::QueryType,
        params: serde_json::Value,
    )

Source from the content-addressed store, hash-verified

104 /// * `Err(CatalogError::CatalogNotFound)` if catalog doesn't exist
105 /// * `Err(CatalogError)` if the query fails
106 pub fn query_read_only(
107 &self,
108 catalog_name: &str,
109 query_type: crate::catalog::operations::QueryType,
110 params: serde_json::Value,
111 ) -> CatalogResult<CatalogResponse> {
112 use crate::catalog::operations::CatalogOperation;
113
114 let operation = CatalogOperation::Query { query_type, params };
115
116 self.registry
117 .get(catalog_name)
118 .ok_or_else(|| CatalogError::CatalogNotFound(catalog_name.to_string()))?
119 .execute_read_only(operation)
120 }
121
122 /// Get catalog metadata without knowing the specific type
123 ///

Callers 15

execute_ddl_operationMethod · 0.80
get_graph_typeMethod · 0.80
get_graph_typeMethod · 0.80
get_graph_typeMethod · 0.80
list_graph_typesMethod · 0.80
describe_graph_typeMethod · 0.80
list_node_typesMethod · 0.80
list_edge_typesMethod · 0.80
describe_node_typeMethod · 0.80
describe_edge_typeMethod · 0.80
get_version_historyMethod · 0.80

Calls 2

execute_read_onlyMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected