pub async fn delete_app(pool: &Pool<MySql>, id: i64) -> Result<()>
Expand description
Deletes an application from the database.
This function permanently removes an application record with the specified ID. The operation is performed within a transaction to ensure data consistency.
§Arguments
pool
- Database connection pool for executing the queryid
- Unique identifier of the application to delete
§Returns
Ok(())
- Successfully deleted the applicationErr(anyhow::Error)
- Failed to delete the application
§Warning
This operation is irreversible. Once an application is deleted, all associated data that depends on the application’s existence may become invalid.
§Note
This function does not verify if the application exists before attempting deletion. If the application does not exist, the operation will still succeed (as far as SQL is concerned), but no rows will be affected.