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

Method get_cell_reader

collab/src/database/database.rs:553–561  ·  view source on GitHub ↗

Return [TypeOptionCellReader] for the given field id.

(&self, field_id: &str)

Source from the content-addressed store, hash-verified

551
552 /// Return [TypeOptionCellReader] for the given field id.
553 pub fn get_cell_reader(&self, field_id: &str) -> Option<Box<dyn TypeOptionCellReader>> {
554 let txn = self.collab.transact();
555 let field = self.body.fields.get_field(&txn, field_id)?;
556 drop(txn);
557
558 let field_type = FieldType::from(field.field_type);
559 let type_option = field.get_any_type_option(field_type.type_id())?;
560 Some(type_option_cell_reader(type_option, &field_type))
561 }
562
563 /// Return [TypeOptionCellWriter] for the given field id.
564 pub fn get_cell_writer(&self, field_id: &str) -> Option<Box<dyn TypeOptionCellWriter>> {

Callers 1

Calls 5

type_option_cell_readerFunction · 0.85
get_any_type_optionMethod · 0.80
type_idMethod · 0.80
transactMethod · 0.45
get_fieldMethod · 0.45

Tested by 1