MCPcopy Create free account
hub / github.com/4xmen/rustavel / execute

Method execute

core/src/sql/database_client.rs:51–58  ·  view source on GitHub ↗
(&self, sql: &str)

Source from the content-addressed store, hash-verified

49
50
51 async fn execute(&self, sql: &str) -> Result<(), DbError> {
52 for single_sql in sql.split(";") {
53 if !single_sql.trim().is_empty() {
54 sqlx::query(single_sql).execute(&self.pool).await?;
55 }
56 }
57 Ok(())
58 }
59
60 async fn fetch_strings(&self, sql: &str) -> Result<Vec<String>, DbError> {
61 let rows = sqlx::query(sql).fetch_all(&self.pool).await?;

Callers 10

execute_paramsMethod · 0.80
drop_table_if_existsMethod · 0.80
drop_tableMethod · 0.80
drop_viewMethod · 0.80
create_databaseMethod · 0.80
renameMethod · 0.80
execute_migrationMethod · 0.80

Calls 1

is_emptyMethod · 0.45

Tested by

no test coverage detected