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 uuid;
50
51 #[cfg(feature = "json-schema")]
52 pub use schemars;
53}
54
55#[doc(inline)]
56pub use context::*;
57#[doc(inline)]
58pub use error::*;
59pub use es_entity_macros::EsEntity;
60pub use es_entity_macros::EsEvent;
61pub use es_entity_macros::EsRepo;
62pub use es_entity_macros::es_event_context;
63pub use es_entity_macros::expand_es_query;
64pub use es_entity_macros::retry_on_concurrent_modification;
65#[doc(inline)]
66pub use events::*;
67#[doc(inline)]
68pub use forgettable::{Forgettable, ForgettableRef};
69#[doc(inline)]
70pub use idempotent::*;
71#[doc(inline)]
72pub use nested::*;
73#[doc(inline)]
74pub use one_time_executor::*;
75#[doc(inline)]
76pub use operation::*;
77#[doc(inline)]
78pub use pagination::*;
79#[doc(inline)]
80pub use query::*;
81#[doc(inline)]
82pub use traits::*;
83
84#[cfg(feature = "graphql")]
85pub mod graphql {
86 pub use async_graphql;
87 pub use base64;
88
89 #[derive(Debug, serde::Serialize, serde::Deserialize, Clone, Copy)]
90 #[serde(transparent)]
91 pub struct UUID(crate::prelude::uuid::Uuid);
92 async_graphql::scalar!(UUID);
93 impl<T: Into<crate::prelude::uuid::Uuid>> From<T> for UUID {
94 fn from(id: T) -> Self {
95 let uuid = id.into();
96 Self(uuid)
97 }
98 }
99 impl From<&UUID> for crate::prelude::uuid::Uuid {
100 fn from(id: &UUID) -> Self {
101 id.0
102 }
103 }
104}