Function delete_build

Source
pub async fn delete_build(pool: &Pool<MySql>, id: i64) -> Result<()>
Expand description

Deletes a specific build record from the database.

This function permanently removes a build record identified by its ID. It’s typically used for cleanup operations or when a build was created erroneously.

§Arguments

  • pool - Database connection pool for executing the query
  • id - Unique identifier of the build to delete

§Returns

  • Ok(()) - Successfully deleted the build
  • Err(anyhow::Error) - Failed to delete the build

§Warning

This operation is irreversible. Once a build is deleted, all associated information including build logs and status history is permanently lost.

§Note

This function does not verify if the build exists before attempting deletion. If the build does not exist, the operation will still succeed (as far as SQL is concerned), but no rows will be affected.