Function get_app_with_instances

Source
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 query
  • app_id - Unique identifier of the application to retrieve

§Returns

  • Ok(AppWithInstances) - Successfully retrieved application and its instances
  • Err(anyhow::Error) - Failed to fetch application or instances, with context