Skip to main content

fraiseql_cli/
lib.rs

1//! FraiseQL CLI library - exposes internal modules for testing and reuse
2
3#![allow(clippy::format_push_string)] // Reason: push_str + format! is clearer for incremental SQL/query string building
4#![allow(clippy::option_if_let_else)] // Reason: style preference — if let chains are more readable in command handlers
5#![allow(clippy::needless_pass_by_value)] // Reason: API consistency; command handler functions receive owned values from clap
6#![allow(clippy::must_use_candidate)] // Reason: output/builder methods don't require #[must_use] in CLI context
7#![allow(clippy::module_name_repetitions)] // Reason: standard Rust API style (e.g. CliError, CliConfig, CliOutput)
8#![allow(clippy::doc_markdown)] // Reason: CLI help text uses backtick-free prose intentionally for readability
9#![allow(clippy::too_many_lines)] // Reason: some command handlers are inherently long (e.g. generate.rs)
10#![allow(clippy::unnecessary_wraps)] // Reason: API consistency — some fns return Result for future extensibility
11#![allow(clippy::match_same_arms)] // Reason: explicit duplicate arms improve readability for exhaustive schema matches
12#![allow(clippy::similar_names)] // Reason: domain names (type_name/type_kind, field_name/field_type) are intentionally similar
13#![allow(clippy::struct_excessive_bools)] // Reason: schema config structs use bool flags by design (per CLAUDE.md)
14#![allow(clippy::derive_partial_eq_without_eq)] // Reason: Eq not derivable for all schema structs (contain f64 fields)
15#![allow(clippy::missing_const_for_fn)] // Reason: const fn not stable for all patterns used here
16#![allow(clippy::print_stdout, clippy::print_stderr)] // Reason: this is the CLI crate; user-facing output is the contract
17
18pub mod cli;
19pub mod commands;
20pub mod config;
21pub mod connection;
22pub mod introspection;
23pub mod output;
24pub mod output_schemas;
25pub mod runner;
26pub mod schema;
27
28/// The `anyhow` this crate's public API is built against (#1198).
29pub use anyhow;
30/// The `clap` this crate's public API is built against (#1198).
31pub use clap;
32/// The `deadpool_postgres` behind [`connection::postgres_pool`]'s `Pool` (#1198).
33pub use deadpool_postgres;
34/// The `indexmap` this crate's public API is built against (#1198).
35pub use indexmap;
36pub use runner::run;
37/// The `serde_json` this crate's public API is built against (#1198).
38pub use serde_json;
39/// The `toml` this crate's public API is built against (#1198).
40pub use toml;
41
42#[cfg(test)]
43mod tests;