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