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