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

Method ddl

nodedb-client/src/native/client/core.rs:51–62  ·  view source on GitHub ↗

Execute a DDL command.

(&self, sql: &str)

Source from the content-addressed store, hash-verified

49
50 /// Execute a DDL command.
51 pub async fn ddl(&self, sql: &str) -> NodeDbResult<QueryResult> {
52 let mut conn = self.pool.acquire().await?;
53 match conn.execute_ddl(sql).await {
54 Ok(r) => Ok(r),
55 Err(e) if is_connection_error(&e) => {
56 drop(conn);
57 let mut conn = self.pool.acquire().await?;
58 conn.execute_ddl(sql).await
59 }
60 Err(e) => Err(e),
61 }
62 }
63
64 /// Begin a transaction.
65 pub async fn begin(&self) -> NodeDbResult<()> {

Callers

nothing calls this directly

Calls 3

is_connection_errorFunction · 0.85
execute_ddlMethod · 0.80
acquireMethod · 0.45

Tested by

no test coverage detected