MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / execute_raw

Method execute_raw

nodedb-client/src/remote/client/core.rs:98–107  ·  view source on GitHub ↗

Execute a statement that doesn't return rows (INSERT/UPDATE/DELETE).

(
        &self,
        sql: &str,
        params: &[&(dyn tokio_postgres::types::ToSql + Sync)],
    )

Source from the content-addressed store, hash-verified

96
97 /// Execute a statement that doesn't return rows (INSERT/UPDATE/DELETE).
98 pub(super) async fn execute_raw(
99 &self,
100 sql: &str,
101 params: &[&(dyn tokio_postgres::types::ToSql + Sync)],
102 ) -> NodeDbResult<u64> {
103 let client = self.client.lock().await;
104 client.execute(sql, params).await.map_err(|e| {
105 NodeDbError::storage(format!("pgwire execute failed: {}", pg_error_detail(&e)))
106 })
107 }
108
109 /// Execute a parameterless statement via the simple-query protocol
110 /// (single `Query` message — no `Parse`/`Bind`/`Describe` round-trip).

Callers 7

document_put_implMethod · 0.80
document_delete_implMethod · 0.80
vector_insert_implMethod · 0.80
vector_delete_implMethod · 0.80

Calls 2

lockMethod · 0.80
executeMethod · 0.45

Tested by

no test coverage detected