pub async fn delete_data(&self) -> core::result::Result<(), MySqlError> {
        let mut conn = self.get_connection().await?;
        let mut tx = conn.start_transaction(TxOpts::default()).await?;

        let command = "DELETE FROM `".to_owned() + TABLE_AZKS + "`";
        tx.query_drop(command).await?;

        let command = "DELETE FROM `".to_owned() + TABLE_USER + "`";
        tx.query_drop(command).await?;

        let command = "DELETE FROM `".to_owned() + TABLE_HISTORY_NODE_STATES + "`";
        tx.query_drop(command).await?;

        let command = "DELETE FROM `".to_owned() + TABLE_HISTORY_TREE_NODES + "`";
        tx.query_drop(command).await?;

        tx.commit().await?;

        Ok(())
    }
/// Delete all the data in the tables
Delete all the data in the tables
Delete all the data in the tables
pub async fn delete_data(&self) -> core::result::Result<(), MySqlError> {
        let mut conn = self.get_connection().await?;
        let mut tx = conn.start_transaction(TxOpts::default()).await?;
        let command = "DELETE FROM `".to_owned() + TABLE_AZKS + "`";
        tx.query_drop(command).await?;
        let command = "DELETE FROM `".to_owned() + TABLE_USER + "`";
        tx.query_drop(command).await?;
        let command = "DELETE FROM `".to_owned() + TABLE_HISTORY_NODE_STATES + "`";
        tx.query_drop(command).await?;
        let command = "DELETE FROM `".to_owned() + TABLE_HISTORY_TREE_NODES + "`";
        tx.query_drop(command).await?;
        tx.commit().await?;
        Ok(())
    }
pub async fn delete_data ( & self ) -> core :: result :: Result < ( ) , MySqlError > { let mut conn = self . get_connection ( ) . await ? ; let mut tx = conn . start_transaction ( TxOpts :: default ( ) ) . await ? ; let command = " " . to_owned ( ) + TABLE_AZKS + " " ; tx . query_drop ( command ) . await ? ; let command = " " . to_owned ( ) + TABLE_USER + " " ; tx . query_drop ( command ) . await ? ; let command = " " . to_owned ( ) + TABLE_HISTORY_NODE_STATES + " " ; tx . query_drop ( command ) . await ? ; let command = " " . to_owned ( ) + TABLE_HISTORY_TREE_NODES + " " ; tx . query_drop ( command ) . await ? ; tx . commit ( ) . await ? ; Ok ( ( ) ) }
Delete all the data in the tables
Delete all the data in the tables
&self
&self