framework_cqrs_lib/cqrs/infra/query/
mod.rsuse mongodb::bson::{doc, Document};
use crate::cqrs::core::repositories::filter::Expr::ExprStr;
use crate::cqrs::core::repositories::filter::Filter;
use crate::cqrs::core::repositories::filter::Filter::Expr;
use crate::cqrs::core::repositories::query::Query;
pub mod pagination;
impl From<Query> for Document {
fn from(value: Query) -> Self {
match value.filter {
Expr(e) => {
match e {
ExprStr(x) => doc! { x.field.as_str() : x.head.as_str() }
}
}
Filter::None => doc! {}
}
}
}