pg_schema_cache_resolute/lib.rs
1mod error;
2mod introspection;
3mod listener;
4
5pub use error::SchemaCacheError;
6pub use listener::start_schema_listener;
7pub use pg_schema_cache_types::*;
8
9use resolute::Executor;
10
11/// Introspects a PostgreSQL database and builds a [`SchemaCache`] containing
12/// all tables, columns, relationships, and functions in the given schemas.
13pub async fn build_schema_cache(
14 db: &impl Executor,
15 schemas: &[String],
16) -> Result<SchemaCache, SchemaCacheError> {
17 introspection::build(db, schemas).await
18}