Handle read-only catalog operations (queries) This method handles operations that don't modify catalog state, allowing for concurrent read access without requiring mutable references. # Arguments `op` - The catalog operation to execute (should be read-only) # Returns `Ok(CatalogResponse)` with the operation result `Err(CatalogError)` if the operation fails or is not read-only
(&self, op: CatalogOperation)
| 70 | /// * `Ok(CatalogResponse)` with the operation result |
| 71 | /// * `Err(CatalogError)` if the operation fails or is not read-only |
| 72 | fn execute_read_only(&self, op: CatalogOperation) -> CatalogResult<CatalogResponse> { |
| 73 | // Default implementation: For most catalogs, query operations can be safely |
| 74 | // executed in read-only mode since they don't modify state. This is a |
| 75 | // temporary bridge until all catalogs implement proper read-only methods. |
| 76 | use super::error::CatalogError; |
| 77 | match op { |
| 78 | CatalogOperation::Query { .. } => { |
| 79 | // For now, return a temporary error encouraging migration |
| 80 | Err(CatalogError::NotSupported( |
| 81 | "Read-only queries not yet implemented for this catalog. \ |
| 82 | Consider implementing execute_read_only() for better concurrency." |
| 83 | .to_string(), |
| 84 | )) |
| 85 | } |
| 86 | _ => Err(CatalogError::NotSupported( |
| 87 | "Only query operations are supported in read-only mode".to_string(), |
| 88 | )), |
| 89 | } |
| 90 | } |
| 91 | |
| 92 | /// Persist catalog state to storage |
| 93 | /// |
nothing calls this directly
no outgoing calls
no test coverage detected