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