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