bestool_psql/
lib.rs

1#![deny(rust_2018_idioms)]
2// #[doc(hidden)] items must not be used! Only pub for testing purposes.
3
4#[doc(hidden)]
5pub mod audit;
6mod colors;
7mod completer;
8mod config;
9mod input;
10mod ots;
11mod parser;
12mod query;
13#[doc(hidden)]
14pub mod repl;
15#[doc(hidden)]
16pub mod result_store;
17mod schema_cache;
18mod signals;
19#[doc(hidden)]
20pub mod snippets;
21mod table;
22mod theme;
23
24pub use audit::{ExportOptions, QueryOptions, export_audit_entries};
25pub use bestool_postgres::pool::PgPool;
26pub use config::Config;
27pub use repl::run;
28pub use signals::register_sigint_handler;
29pub use theme::Theme;
30
31/// Create a connection pool with application_name set to "bestool-psql"
32pub async fn create_pool(url: &str) -> miette::Result<PgPool> {
33	bestool_postgres::pool::create_pool(url, "bestool-psql").await
34}
35
36pub fn default_audit_dir() -> String {
37	audit::Audit::help_text_default_dir()
38}