MCPcopy Create free account
hub / github.com/AmrDeveloper/GQL / cast_op

Method cast_op

crates/gitql-core/src/values/float.rs:296–304  ·  view source on GitHub ↗
(&self, target_type: &Box<dyn DataType>)

Source from the content-addressed store, hash-verified

294 }
295
296 fn cast_op(&self, target_type: &Box<dyn DataType>) -> Result<Box<dyn Value>, String> {
297 // Cast Integer
298 if target_type.is_int() {
299 let value = self.value as i64;
300 return Ok(Box::new(IntValue { value }));
301 }
302
303 Err("Unexpected value to perform `CAST` with".to_string())
304 }
305}

Callers

nothing calls this directly

Calls 1

is_intMethod · 0.45

Tested by

no test coverage detected