MCPcopy Create free account
hub / github.com/encrypted-spaces/prototype / insert

Method insert

sdk/src/table.rs:154–159  ·  view source on GitHub ↗

Insert a row and return an insert builder. Construction is infallible. If `data` fails to serialize to a JSON object the error is captured inside the builder and surfaced when you call [`InsertBuilder::execute`] (or one of the related execute methods). This keeps the call site uniform with `update()` / `delete()` / `select()`, which also return builders directly. # Examples ```ignore let id = u

(&self, data: &T)

Source from the content-addressed store, hash-verified

152 /// let id = users.insert(&UserRow { id: None, name: "Grace".into(), age: 37 }).execute().await?;
153 /// ```
154 pub fn insert(&self, data: &T) -> InsertBuilder<T>
155 where
156 T: Serialize,
157 {
158 InsertBuilder::new(self.name.clone(), Arc::clone(&self.space), data)
159 }
160
161 /// Begin building an `UPDATE` query on this table.
162 ///

Callers 15

encrypt_rowFunction · 0.45
decrypt_rowFunction · 0.45
test_missing_keyFunction · 0.45
new_multi_userMethod · 0.45
insert_acl_ruleFunction · 0.45
record_responseFunction · 0.45
build_fixtureFunction · 0.45
file_uploadMethod · 0.45

Calls 1

cloneMethod · 0.45