ts_sqlx 0.1.3

Typescript SQLx compile-time checked queries without a DSL.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use anyhow::Result;
use clap::Parser;
use ts_sqlx::{opt::Opt, run::run};

// cargo invokes this binary as `cargo-sqlx sqlx <args>`
// so the parser below is defined with that in mind
#[derive(Parser, Debug)]
#[clap(bin_name = "cargo")]
enum Cli {
  Sqlx(Opt),
}

fn main() -> Result<()> {
  dotenvy::dotenv().ok();
  let Cli::Sqlx(opt) = Cli::parse();
  run(opt)?;
  Ok(())
}