Skip to main content

keepsake_sqlx/
lib.rs

1//! `SQLx` adapter for Keepsake.
2
3mod repository;
4
5pub mod prelude {
6    //! Common imports for application modules using the `SQLx` adapter.
7
8    #[cfg(feature = "postgres")]
9    pub use crate::{KeepsakeRepository, PostgresKeepsakeRepository, TimedKeepsakeRepository};
10    #[cfg(feature = "mysql")]
11    pub use crate::{MySqlKeepsakeRepository, TimedMySqlKeepsakeRepository};
12    pub use crate::{RepositoryError, RepositoryResult};
13    #[cfg(feature = "sqlite")]
14    pub use crate::{SqliteKeepsakeRepository, TimedSqliteKeepsakeRepository};
15}
16
17pub use repository::{
18    ActiveRelation, AppliedKeepsake, AuditCursor, AuditEventRecord, FulfilledExpiryCandidate,
19    KeepsakeSqlxBackend, MembershipCursor, NoopRelationCache, RelationCache, RepositoryError,
20    RepositoryResult, SqlxKeepsakeRepository, TimedExpiryCandidate, TimedSqlxKeepsakeRepository,
21};
22#[cfg(feature = "postgres")]
23pub use repository::{
24    KeepsakeRepository, PostgresBackend, PostgresKeepsakeRepository, TimedKeepsakeRepository,
25};
26#[cfg(feature = "cache")]
27pub use repository::{LocalRelationCache, LocalRelationCacheConfig};
28#[cfg(feature = "mysql")]
29pub use repository::{MySqlBackend, MySqlKeepsakeRepository, TimedMySqlKeepsakeRepository};
30#[cfg(feature = "sqlite")]
31pub use repository::{SqliteBackend, SqliteKeepsakeRepository, TimedSqliteKeepsakeRepository};