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

Method insert_nested_views

collab/src/folder/folder.rs:1155–1161  ·  view source on GitHub ↗

Insert parent-children views into the folder. when only insert one view, user [Self::insert_view] instead.

(&mut self, views: Vec<ParentChildViews>, uid: i64)

Source from the content-addressed store, hash-verified

1153 /// Insert parent-children views into the folder.
1154 /// when only insert one view, user [Self::insert_view] instead.
1155 pub fn insert_nested_views(&mut self, views: Vec<ParentChildViews>, uid: i64) {
1156 let views = FlattedViews::flatten_views(views);
1157 let mut txn = self.collab.transact_mut();
1158 for view in views {
1159 self.body.views.insert(&mut txn, view, None, uid);
1160 }
1161 }
1162
1163 /// Get a view by id. When uid is provided, includes user-specific data like is_favorite.
1164 /// When uid is None, returns base view data without user-specific enrichment.

Callers 1

import_level_testFunction · 0.80

Calls 2

transact_mutMethod · 0.80
insertMethod · 0.45

Tested by 1

import_level_testFunction · 0.64