rok-repl 0.3.4

Interactive REPL (tinker) engine for the rok ecosystem
Documentation
/// Interactive REPL (tinker) engine for rok applications.
///
/// Connects to the application database via `DATABASE_URL` and provides
/// an interactive prompt for inspecting data and running SQL.
///
/// # Example
///
/// ```rust,ignore
/// rok_repl::run().await?;
/// ```
#[cfg(feature = "postgres")]
mod session;

/// Start the interactive tinker REPL.
///
/// Reads `DATABASE_URL` from the environment (or `.env`), connects to
/// PostgreSQL, and opens the readline prompt.
///
/// # Errors
///
/// Returns an error if `DATABASE_URL` is unset or the connection fails.
#[cfg(feature = "postgres")]
pub async fn run() -> anyhow::Result<()> {
    session::TinkerSession::new().await?.run().await
}