Skip to content

CLi: made cli-lib modules publicly available for other crates #3881

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 26 additions & 6 deletions sqlx-cli/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
//! # SQLx CLI
//!
//! Command-line utility for the [SQLx](https://github.com/launchbadge/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:
//!
//! ```toml
//! 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.

use std::future::Future;
use std::io;
use std::time::Duration;
Expand All @@ -9,15 +29,15 @@ use tokio::{select, signal};

use crate::opt::{Command, ConnectOpts, DatabaseCommand, MigrateCommand};

mod database;
mod metadata;
pub mod database;
pub mod metadata;
// mod migration;
// mod migrator;
#[cfg(feature = "completions")]
mod completions;
mod migrate;
mod opt;
mod prepare;
pub mod completions;
pub mod migrate;
pub mod opt;
pub mod prepare;

pub use crate::opt::Opt;

Expand Down