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],
)
| 64 | /// |
| 65 | /// Returns `true` if generated columns need recomputation after this UPDATE. |
| 66 | pub 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 | /// |
no test coverage detected