locksmith 0.2.0

Extract Postgres locks from a given SQL statement
docs.rs failed to build locksmith-0.2.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: locksmith-0.2.3

Locksmith

This crate provides the logic for detecting the impact of a given SQL statement on a Postgres database.

It is the brains behind locksmith-cli.

Detecting the impact of a statement

use locksmith::QueryOracle;

async fn inspect_statement() {
    let mut oracle = QueryOracle::new("postgres://localhost:5432/mydb");
    let inspection = oracle.inspect_statement("alter table customers alter column id type bigint;").await.unwrap();
    println!("{:?}", inspection.locks);
}