Skip to main content

Crate athena_rs

Crate athena_rs 

Source
Expand description

Athena

A lightweight Database Gateway that proxies and executes queries across multiple backends (Athena/ScyllaDB, PostgreSQL, and Supabase) with simple caching and routing.

  • Provides REST endpoints for executing SQL against supported drivers
  • Proxies arbitrary requests while handling auth headers and basic response shaping
  • Exposes a small set of utilities for driver execution and routing

Re-exports§

pub use client::AthenaClient;
pub use client::backend::BackendType;
pub use client::backend::QueryResult;
pub use client::builder::AthenaClientBuilder;
pub use client::Condition;
pub use client::ConditionOperator;
pub use client::OrderDirection;
pub use client::Gateway;
pub use client::GatewayDeleteRequest;
pub use client::GatewayDriverRequest;
pub use client::GatewayFetchRequest;
pub use client::GatewayInsertRequest;
pub use client::GatewayOperation;
pub use client::GatewayPath;
pub use client::GatewayQueryResult;
pub use client::GatewayRequest;
pub use client::GatewayRequestFactory;
pub use client::GatewayRequestPayload;
pub use client::GatewayRoutes;
pub use client::GatewayRpcFilter;
pub use client::GatewayRpcFilterOperator;
pub use client::GatewayRpcRequest;
pub use client::GatewaySqlRequest;
pub use client::GatewayUpdateRequest;
pub use client::RpcBuilder;
pub use client::build_gateway_endpoint;
pub use client::request;

Modules§

api
REST API surface, endpoints and request handlers. Public HTTP API routes for Athena RS.
bootstrap
Application bootstrap: shared AppState, Postgres registry, and pipeline registry.
cdc
Change Data Capture (CDC) module for streaming database changes.
cli
client
Athena client SDK with unified query helpers. Unified Athena client surface used by downstream crates.
config
Utils for configuration Configuration management for the application.
daemon
Daemon / background server module. Houses background tasks that run alongside the HTTP server.
data
Data access helpers and Supabase clients used by endpoints. Data access helpers and Supabase clients.
drivers
Database driver integrations (Scylla/Athena, PostgreSQL, Supabase). Database driver integrations.
error
Error processing and sanitization utilities. Error post-processing module for sanitizing and formatting errors.
parser
Parsers and helpers related to SQL processing. Parsers and helpers for SQL and related inputs.
provision_sql
provisioning
Database and cloud provisioning (Neon, Railway, Render, local Docker Postgres).
proxy_request
Reverse proxy that forwards requests to the configured target services. Reverse proxy for forwarding REST requests to target databases/services.
router
HTTP routing helpers and target URL determination. URL routing helpers used by the reverse proxy.
utils
Miscellaneous utilities (logging, helpers).
wss
WebSocket gateway scaffolding for Athena.

Structs§

AppState
Shared Actix application state.
ImmortalCache
Wrapper for the non‑expiring cache used by some endpoints.

Constants§

GATEWAY_DELETE_PATH
Backward-compatible route alias. Prefer Gateway::DELETE_PATH.
GATEWAY_FETCH_PATH
Backward-compatible route alias. Prefer Gateway::FETCH_PATH.
GATEWAY_INSERT_PATH
Backward-compatible route alias. Prefer Gateway::INSERT_PATH.
GATEWAY_QUERY_PATH
Backward-compatible route alias. Prefer Gateway::QUERY_PATH.
GATEWAY_RPC_PATH
Backward-compatible route alias. Prefer Gateway::RPC_PATH.
GATEWAY_SQL_PATH
Backward-compatible route alias. Prefer Gateway::SQL_PATH.
GATEWAY_UPDATE_PATH
Backward-compatible route alias. Prefer Gateway::UPDATE_PATH.
LEGACY_SQL_PATH
Backward-compatible route alias. Prefer Gateway::LEGACY_SQL_PATH.