db_schema/
lib.rs

1//! A module for working with PostgreSQL database schemas.
2//!
3//! This module provides a `PgSchema` struct that allows you to generate SQL statements
4//! for various schema-related tasks, such as creating tables, views, and functions.
5//!
6//! Example usage:
7//! ```
8//! use crate::PgSchema;
9//!
10//! let schema = PgSchema::new("my_schema");
11//! let pool = get_pg_pool(); // Function to get a connection pool
12//! let tables_sql = schema.get_tables(&pool).await.unwrap();
13//! ```
14
15#![warn(
16    clippy::all,
17    clippy::dbg_macro,
18    clippy::todo,
19    clippy::empty_enum,
20    clippy::enum_glob_use,
21    clippy::mem_forget,
22    clippy::unused_self,
23    clippy::filter_map_next,
24    clippy::needless_continue,
25    clippy::needless_borrow,
26    clippy::match_wildcard_for_single_variants,
27    clippy::if_let_mutex,
28    clippy::mismatched_target_os,
29    clippy::await_holding_lock,
30    clippy::match_on_vec_items,
31    clippy::imprecise_flops,
32    clippy::suboptimal_flops,
33    clippy::lossy_float_literal,
34    clippy::rest_pat_in_fully_bound_structs,
35    clippy::fn_params_excessive_bools,
36    clippy::exit,
37    clippy::inefficient_to_string,
38    clippy::linkedlist,
39    clippy::macro_use_imports,
40    clippy::option_option,
41    clippy::verbose_file_reads,
42    clippy::unnested_or_patterns,
43    clippy::str_to_string,
44    rust_2018_idioms,
45    future_incompatible,
46    nonstandard_style,
47    missing_debug_implementations,
48    missing_docs
49)]
50#![deny(unreachable_pub, private_in_public)]
51#![allow(elided_lifetimes_in_paths, clippy::type_complexity)]
52#![forbid(unsafe_code)]
53#![cfg_attr(docsrs, feature(doc_auto_cfg, doc_cfg))]
54#![cfg_attr(test, allow(clippy::float_cmp))]
55
56mod pg;
57pub use pg::PgSchema;