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

Function needs_recomputation

nodedb/src/data/executor/handlers/generated.rs:66–78  ·  view source on GitHub ↗

Check if any of the updated fields are dependencies of generated columns. Returns `true` if generated columns need recomputation after this UPDATE.

(
    update_fields: &[(String, V)],
    specs: &[GeneratedColumnSpec],
)

Source from the content-addressed store, hash-verified

64///
65/// Returns `true` if generated columns need recomputation after this UPDATE.
66pub fn needs_recomputation<V>(
67 update_fields: &[(String, V)],
68 specs: &[GeneratedColumnSpec],
69) -> bool {
70 for (field, _) in update_fields {
71 for spec in specs {
72 if spec.depends_on.contains(field) {
73 return true;
74 }
75 }
76 }
77 false
78}
79
80/// Topological sort of generated column specs by dependency order.
81///

Callers 3

execute_bulk_updateMethod · 0.85
execute_point_updateMethod · 0.85

Calls 1

containsMethod · 0.45

Tested by

no test coverage detected