//! Example: athena-js-style aliases (`fetch` and `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 fetched = client.fetch("projects").limit(5).execute().await?;
    println!("Fetched rows: {}", fetched.rows.len());

    let sql_rows = client.sql("SELECT now() AS server_time").await?;
    println!("SQL rows: {}", sql_rows.rows.len());

    Ok(())
}
