Execute a SQL query and return the result.
(&mut self, sql: &str)
| 227 | |
| 228 | /// Execute a SQL query and return the result. |
| 229 | pub async fn execute_sql(&mut self, sql: &str) -> NodeDbResult<QueryResult> { |
| 230 | let resp = self |
| 231 | .send( |
| 232 | OpCode::Sql, |
| 233 | TextFields { |
| 234 | sql: Some(sql.to_string()), |
| 235 | ..Default::default() |
| 236 | }, |
| 237 | ) |
| 238 | .await?; |
| 239 | response_to_query_result(resp) |
| 240 | } |
| 241 | |
| 242 | /// Execute a SQL query with bound parameters and return the result. |
| 243 | /// |