athena_rs 3.3.0

Database gateway API
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! Example: raw SQL execution via `AthenaClient::sql`.
use athena_rs::AthenaClient;
use std::error::Error;

#[tokio::main]
async fn main() -> Result<(), Box<dyn Error>> {
    let client = AthenaClient::new("http://localhost:4052", "secret", "reporting").await?;

    let result = client
        .sql("SELECT id, email FROM users WHERE status = 'active' LIMIT 10")
        .await?;

    println!("Rows: {}", result.rows.len());
    println!("Columns: {:?}", result.columns);
    Ok(())
}