MCPcopy Create free account
hub / github.com/AppFlowy-IO/AppFlowy-Collab / remove_calculation

Method remove_calculation

collab/src/database/database.rs:1087–1101  ·  view source on GitHub ↗
(&mut self, view_id: &str, calculation_id: &str)

Source from the content-addressed store, hash-verified

1085 }
1086
1087 pub fn remove_calculation(&mut self, view_id: &str, calculation_id: &str) {
1088 let mut txn = self.collab.transact_mut();
1089 if let Ok(view_id) = self.body.parse_view_id(view_id) {
1090 self
1091 .body
1092 .views
1093 .update_database_view(&mut txn, &view_id, |update| {
1094 update.update_calculations(|txn, calculation_update| {
1095 if let Some(i) = calculation_update.index_by_id(txn, calculation_id) {
1096 calculation_update.remove(txn, i);
1097 }
1098 });
1099 });
1100 }
1101 }
1102
1103 pub fn get_all_filters<T>(&self, view_id: &str) -> Vec<T>
1104 where

Callers

nothing calls this directly

Calls 6

transact_mutMethod · 0.80
parse_view_idMethod · 0.80
update_calculationsMethod · 0.80
index_by_idMethod · 0.80
update_database_viewMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected