pub async fn get_build_by_id(pool: &Pool<MySql>, id: i64) -> Result<Build>
Expand description
Retrieves a specific build by its unique identifier.
This function fetches detailed information about a single build record. It’s typically used when specific build details are needed, such as viewing build logs or checking build status.
§Arguments
pool
- Database connection pool for executing the queryid
- Unique identifier of the build to retrieve
§Returns
Ok(Build)
- Successfully retrieved build informationErr(anyhow::Error)
- Failed to fetch build (including if not found)
§Error Handling
Returns an error if no build with the given ID exists or if a database error occurs during the query execution.