1#![cfg_attr(feature = "fail-on-warnings", deny(warnings))]
23#![cfg_attr(feature = "fail-on-warnings", deny(clippy::all))]
24#![forbid(unsafe_code)]
25
26pub mod clock;
27pub mod context;
28pub mod db;
29pub mod error;
30pub mod events;
31pub mod forgettable;
32pub mod idempotent;
33mod macros;
34pub mod nested;
35pub mod one_time_executor;
36pub mod operation;
37pub mod pagination;
38pub mod query;
39pub mod sql_commenter;
40pub mod traits;
41
42pub mod prelude {
43 pub use chrono;
46 pub use serde;
47 pub use serde_json;
48 pub use sqlx;
49 pub use tokio;
50 pub use uuid;
51
52 #[cfg(feature = "json-schema")]
53 pub use schemars;
54}
55
56#[doc(inline)]
57pub use context::*;
58#[doc(inline)]
59pub use error::*;
60pub use es_entity_macros::EsEntity;
61pub use es_entity_macros::EsEvent;
62pub use es_entity_macros::EsRepo;
63pub use es_entity_macros::es_event_context;
64pub use es_entity_macros::expand_es_query;
65pub use es_entity_macros::retry_on_concurrent_modification;
66#[doc(inline)]
67pub use events::*;
68#[doc(inline)]
69pub use forgettable::{Forgettable, ForgettableRef};
70#[doc(inline)]
71pub use idempotent::*;
72#[doc(inline)]
73pub use nested::*;
74#[doc(inline)]
75pub use one_time_executor::*;
76#[doc(inline)]
77pub use operation::*;
78#[doc(inline)]
79pub use pagination::*;
80#[doc(inline)]
81pub use query::*;
82#[doc(inline)]
83pub use traits::*;
84
85#[cfg(feature = "graphql")]
86pub mod graphql {
87 pub use async_graphql;
88 pub use base64;
89
90 #[derive(Debug, serde::Serialize, serde::Deserialize, Clone, Copy)]
91 #[serde(transparent)]
92 pub struct UUID(crate::prelude::uuid::Uuid);
93 async_graphql::scalar!(UUID);
94 impl<T: Into<crate::prelude::uuid::Uuid>> From<T> for UUID {
95 fn from(id: T) -> Self {
96 let uuid = id.into();
97 Self(uuid)
98 }
99 }
100 impl From<&UUID> for crate::prelude::uuid::Uuid {
101 fn from(id: &UUID) -> Self {
102 id.0
103 }
104 }
105}