/// Execute an UPDATE, DELETE or INSERT query.
Execute an UPDATE, DELETE or INSERT query.
Execute an UPDATE DELETE or INSERT query .
fn execute_update_query(&mut self, sql: &str) -> anyhow::Result<()> {
        let mut stmt = self.conn.prepare(sql)?;
        if stmt.parameter_count() > 0 {
            anyhow::bail!("cannot run queries that require bind parameters");
        }
        let changes = stmt.execute([])?;
        println!("{} changes", changes);
        Ok(())
    }
fn execute_update_query ( & mut self , sql : & str ) -> anyhow :: Result < ( ) > { let mut stmt = self . conn . prepare ( sql ) ? ; if stmt . parameter_count ( ) > 0 { anyhow :: bail ! ( " " ) ; } let changes = stmt . execute ( [ ] ) ? ; println ! ( " " changes ) ; Ok ( ( ) ) }
Execute an UPDATE, DELETE or INSERT query.
Execute an UPDATE DELETE or INSERT query .
&mut self
sql
&str