pub async fn get_app_by_id(pool: &Pool<MySql>, id: i64) -> Result<App>Expand description
Retrieves a specific application by its unique identifier.
This function fetches a single application record matching the provided ID. It’s typically used for retrieving detailed information about a specific application.
§Arguments
pool- Database connection pool for executing the queryid- Unique identifier of the application to retrieve
§Returns
Ok(App)- Successfully retrieved applicationErr(anyhow::Error)- Failed to fetch application (including if not found)
§Error Handling
Returns an error if no application with the given ID exists or if a database error occurs during the query execution.