pub async fn get_app_with_instances(
pool: &Pool<MySql>,
app_id: i64,
) -> Result<AppWithInstances>Expand description
Retrieves a specific application along with its associated instances.
This function fetches an application by its ID and also retrieves all instances associated with that application. The results are combined into a single structure for easier access.
§Arguments
pool- Database connection pool for executing the queryapp_id- Unique identifier of the application to retrieve
§Returns
Ok(AppWithInstances)- Successfully retrieved application and its instancesErr(anyhow::Error)- Failed to fetch application or instances, with context