MCPcopy Create free account
hub / github.com/SeaQL/sea-orm / execute_unprepared

Method execute_unprepared

src/driver/sqlx_postgres.rs:159–167  ·  view source on GitHub ↗
(&self, sql: &str)

Source from the content-addressed store, hash-verified

157 /// Execute an unprepared SQL statement on a PostgreSQL backend
158 #[instrument(level = "trace")]
159 pub async fn execute_unprepared(&self, sql: &str) -> Result<ExecResult, DbErr> {
160 debug_print!("{}", sql);
161
162 let conn = &mut self.pool.acquire().await.map_err(sqlx_conn_acquire_err)?;
163 match conn.execute(sql).await {
164 Ok(res) => Ok(res.into()),
165 Err(err) => Err(sqlx_error_to_exec_err(err)),
166 }
167 }
168
169 /// Get one result from a SQL query. Returns [Option::None] if no match was found
170 #[instrument(level = "trace")]

Callers

nothing calls this directly

Calls 2

sqlx_error_to_exec_errFunction · 0.85
executeMethod · 0.45

Tested by

no test coverage detected