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

Function general_if

crates/gitql-std/src/general/mod.rs:169–176  ·  view source on GitHub ↗
(inputs: &[Box<dyn Value>])

Source from the content-addressed store, hash-verified

167}
168
169pub fn general_if(inputs: &[Box<dyn Value>]) -> Box<dyn Value> {
170 let condition = inputs[0].as_bool().unwrap();
171 if condition {
172 inputs[1].clone()
173 } else {
174 inputs[2].clone()
175 }
176}
177
178pub fn general_ifnull(inputs: &[Box<dyn Value>]) -> Box<dyn Value> {
179 if inputs[0].data_type().is_null() {

Callers

nothing calls this directly

Calls 1

as_boolMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…