mnm_store/lib.rs
1//! `mnm-store` — Postgres + pgvector storage for midnight-manual.
2//!
3//! Schema lives in `crates/mnm-store/migrations/`; typed entity APIs in
4//! [`entities`]; the `PgPool` builder and `sqlx::migrate!()` runner in
5//! [`pool`]. Errors are mapped through [`error::StoreError`] so callers don't
6//! depend on sqlx internals.
7//!
8//! See the data-model schema reference for schema details.
9
10#![doc(html_root_url = "https://docs.rs/mnm-store/0.1.0")]
11
12pub mod entities;
13pub mod error;
14pub mod pool;
15
16pub use error::{Result, StoreError};
17pub use pool::{connect, run_migrations, MIGRATOR};
18
19/// Crate version stamped at build time.
20pub const VERSION: &str = env!("CARGO_PKG_VERSION");
21
22/// Shared seeding helpers for DB integration tests (`#[sqlx::test]` and
23/// `--features integration` suites).
24///
25/// Gated so this code is never compiled into production builds.
26#[cfg(any(test, feature = "integration"))]
27pub mod test_fixtures;