Method
cast_op
(&self, target_type: &Box<dyn DataType>)
Source from the content-addressed store, hash-verified
| 288 | } |
| 289 | |
| 290 | fn cast_op(&self, target_type: &Box<dyn DataType>) -> Result<Box<dyn Value>, String> { |
| 291 | // Cast to Int Type |
| 292 | if target_type.is_int() { |
| 293 | let value = if self.value { 1 } else { 0 }; |
| 294 | return Ok(Box::new(IntValue { value })); |
| 295 | } |
| 296 | |
| 297 | Err("Unexpected value to perform `CAST` with".to_string()) |
| 298 | } |
| 299 | } |
Callers
nothing calls this directly
Tested by
no test coverage detected