MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / evaluate_simple_condition

Function evaluate_simple_condition

nodedb/src/control/trigger/fire_common.rs:247–249  ·  view source on GitHub ↗

Simple condition evaluation for WHEN clauses. Handles common patterns without needing DataFusion: - Constants: TRUE, FALSE, 1, 0, NULL Falls back to `true` (fire the trigger) for complex conditions that require DataFusion evaluation. The trigger body itself will handle the condition via IF blocks.

(condition: &str)

Source from the content-addressed store, hash-verified

245/// that require DataFusion evaluation. The trigger body itself will
246/// handle the condition via IF blocks.
247pub fn evaluate_simple_condition(condition: &str) -> bool {
248 super::try_eval_simple_condition(condition).unwrap_or(true)
249}
250
251#[cfg(test)]
252mod tests {

Callers 3

fire_triggersFunction · 0.85
filter_batch_by_whenFunction · 0.85

Calls 1

Tested by

no test coverage detected