use sqlx::postgres::PgPoolOptions; #[tokio::main] async fn main() -> Result<(), Box> { let pool = PgPoolOptions::new() .max_connections(1) .connect("postgres://accusys@localhost:5432/momentry") .await?; let row: Option<(i32, String, String, Option)> = sqlx::query_as( "SELECT id, uuid, status, processors FROM monitor_jobs WHERE uuid = 'd8acb03870f0cc9b14e01f14a7bf24d6' ORDER BY id DESC LIMIT 1" ) .fetch_optional(&pool) .await?; if let Some((id, uuid, status, processors)) = row { println!("Job ID: {}", id); println!("UUID: {}", uuid); println!("Status: {}", status); println!("Processors: {:?}", processors); } else { println!("No job found for this UUID"); } Ok(()) }