Check if any triggers exist for this collection+event combination. Quick check to avoid fetch_old_row and other overhead when no triggers are defined.
(state: &SharedState, tenant_id: TenantId, collection: &str)
| 329 | /// |
| 330 | /// Quick check to avoid fetch_old_row and other overhead when no triggers are defined. |
| 331 | pub fn has_triggers(state: &SharedState, tenant_id: TenantId, collection: &str) -> bool { |
| 332 | let tid = tenant_id.as_u64(); |
| 333 | !state |
| 334 | .trigger_registry |
| 335 | .get_matching(tid, collection, DmlEvent::Insert) |
| 336 | .is_empty() |
| 337 | || !state |
| 338 | .trigger_registry |
| 339 | .get_matching(tid, collection, DmlEvent::Update) |
| 340 | .is_empty() |
| 341 | || !state |
| 342 | .trigger_registry |
| 343 | .get_matching(tid, collection, DmlEvent::Delete) |
| 344 | .is_empty() |
| 345 | } |
nothing calls this directly
no test coverage detected