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

Method clear

collab/src/folder/section.rs:380–391  ·  view source on GitHub ↗
(&self, txn: &mut TransactionMut)

Source from the content-addressed store, hash-verified

378 }
379
380 pub fn clear(&self, txn: &mut TransactionMut) {
381 let Some(uid) = self.uid() else {
382 return;
383 };
384 if let Some(array) = self
385 .container()
386 .get_with_txn::<_, ArrayRef>(txn, uid.as_ref())
387 {
388 let len = array.iter(txn).count();
389 array.remove_range(txn, 0, len as u32);
390 }
391 }
392}
393
394/// An item in a user's section, representing a view and when it was added.

Calls 4

uidMethod · 0.80
containerMethod · 0.45
as_refMethod · 0.45
remove_rangeMethod · 0.45

Tested by

no test coverage detected