Get a value from a column family by key
(&self, cf_name: &str, key: &[u8])
| 59 | |
| 60 | // Get a value from a column family by key |
| 61 | pub fn get_cf(&self, cf_name: &str, key: &[u8]) -> Result<Option<Vec<u8>>, WaCustomError> { |
| 62 | match self.db.cf_handle(cf_name) { |
| 63 | Some(cf_handle) => { |
| 64 | let result = self.db.get_cf(cf_handle, key); |
| 65 | match result { |
| 66 | Ok(res) => return Ok(res), |
| 67 | Err(e) => Err(WaCustomError::CFReadWriteFailed(e.into_string())), |
| 68 | } |
| 69 | } |
| 70 | None => Err(WaCustomError::CFNotFound), |
| 71 | } |
| 72 | } |
| 73 | } |
nothing calls this directly
no outgoing calls
no test coverage detected