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

Method insert_json_with_path

collab/src/util.rs:95–108  ·  view source on GitHub ↗
(
    &self,
    txn: &mut TransactionMut,
    path: P,
    value: V,
  )

Source from the content-addressed store, hash-verified

93 }
94
95 fn insert_json_with_path<P, V>(
96 &self,
97 txn: &mut TransactionMut,
98 path: P,
99 value: V,
100 ) -> Result<(), CollabError>
101 where
102 P: Into<Path>,
103 V: Serialize,
104 {
105 let value = serde_json::to_value(value)?;
106 self.insert_with_path(txn, path, Entity::from(value))?;
107 Ok(())
108 }
109
110 fn get_json_with_path<T, P, V>(&self, txn: &T, path: P) -> Result<V, CollabError>
111 where

Callers 6

insert_json_attrsFunction · 0.80
observer_attr_mutFunction · 0.80
remove_valueFunction · 0.80
init_sync_testFunction · 0.80
root_change_testFunction · 0.80

Implementers 1

util.rscollab/src/util.rs

Calls 1

insert_with_pathMethod · 0.80

Tested by 6

insert_json_attrsFunction · 0.64
observer_attr_mutFunction · 0.64
remove_valueFunction · 0.64
init_sync_testFunction · 0.64
root_change_testFunction · 0.64