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