sqlx-cli 0.1.0-beta.1

Command-line utility for SQLx, the Rust SQL toolkit.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use clap::{crate_version, FromArgMatches, IntoApp};
use console::style;
use sqlx_cli::Opt;

#[tokio::main]
async fn main() {
    let matches = Opt::into_app().version(crate_version!()).get_matches();

    // no special handling here
    if let Err(error) = sqlx_cli::run(Opt::from_arg_matches(&matches)).await {
        println!("{} {}", style("error:").bold().red(), error);
    }
}