MCPcopy Create free account
hub / github.com/Rust-Web-Development/code / delete_question

Method delete_question

ch_08/src/store.rs:112–124  ·  view source on GitHub ↗
(self, id: i32)

Source from the content-addressed store, hash-verified

110 }
111
112 pub async fn delete_question(self, id: i32) -> Result<bool, Error> {
113 match sqlx::query("DELETE FROM questions WHERE id = $1")
114 .bind(id)
115 .execute(&self.connection)
116 .await
117 {
118 Ok(_) => Ok(true),
119 Err(e) => {
120 tracing::event!(tracing::Level::ERROR, "{:?}", e);
121 Err(Error::DatabaseQueryError)
122 }
123 }
124 }
125
126 pub async fn add_answer(
127 &self,

Callers 1

delete_questionFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected