Crate sqlx_cli

Crate sqlx_cli 

Source
Expand description

§SQLx CLI

Command-line utility for the SQLx ecosystem.

This crate provides the core logic for the sqlx command-line interface, enabling database management, migrations, and offline query preparation for Rust projects using SQLx.

§Note: Semver Exempt API

The API of this crate is not meant for general use and does not follow Semantic Versioning. The only crate that follows Semantic Versioning in the project is the sqlx crate itself. If you are building a custom SQLx driver, you should pin an exact version for sqlx-cli to avoid breakages:

sqlx-cli = { version = "=0.9.0" }

And then make releases in lockstep with sqlx-cli. We recommend all driver crates, in-tree or otherwise, use the same version numbers as sqlx-cli to avoid confusion.

Re-exports§

pub use crate::opt::Opt;

Modules§

completions
config
(Exported for documentation only) Guide and reference for sqlx.toml files.
database
metadata
migrate
opt
prepare

Structs§

Config
The parsed structure of a sqlx.toml file.

Functions§

maybe_apply_dotenv
Check arguments for --no-dotenv before Clap parsing, and apply .env if not set.
run