cat_gateway/db/event/common/
mod.rs1pub(crate) mod query_limits;
4pub(crate) mod uuid_list;
5pub(crate) mod uuid_selector;
6
7pub(crate) trait ConditionalStmt {
9 fn conditional_stmt(
11 &self,
12 f: &mut std::fmt::Formatter<'_>,
13 table_field: &str,
14 ) -> std::fmt::Result;
15}
16
17impl<T: ConditionalStmt> ConditionalStmt for Option<T> {
18 fn conditional_stmt(
19 &self,
20 f: &mut std::fmt::Formatter<'_>,
21 table_field: &str,
22 ) -> std::fmt::Result {
23 if let Some(v) = self {
24 v.conditional_stmt(f, table_field)?;
25 }
26 Ok(())
27 }
28}