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

Function check_cascade_depth

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

Check cascade depth and return a clear error if exceeded.

(cascade_depth: u32, collection: &str)

Source from the content-addressed store, hash-verified

17
18/// Check cascade depth and return a clear error if exceeded.
19pub fn check_cascade_depth(cascade_depth: u32, collection: &str) -> crate::Result<()> {
20 if cascade_depth >= MAX_CASCADE_DEPTH {
21 return Err(crate::Error::BadRequest {
22 detail: format!(
23 "trigger cascade depth exceeded ({MAX_CASCADE_DEPTH}): \
24 possible infinite loop on collection '{collection}'"
25 ),
26 });
27 }
28 Ok(())
29}
30
31/// Execute a list of triggers with the given bindings.
32///

Callers 15

fire_after_statementFunction · 0.85
fire_before_insertFunction · 0.85
fire_before_updateFunction · 0.85
fire_before_deleteFunction · 0.85
fire_instead_of_insertFunction · 0.85
fire_instead_of_updateFunction · 0.85
fire_instead_of_deleteFunction · 0.85
fire_after_insertFunction · 0.85
fire_after_updateFunction · 0.85
fire_after_deleteFunction · 0.85
execute_before_batchFunction · 0.85

Calls

no outgoing calls