pub struct RelPredicate {
pub rel_name: String,
pub as_name: String,
pub model: String,
pub local_field: String,
pub foreign_field: String,
pub filter: Option<Value>,
pub nested: Vec<NestedRelFilter>,
pub agg: Vec<(String, AggDef)>,
pub having: Value,
pub negated: bool,
}Expand description
单个关系聚合谓词(归一表示)
Fields§
§rel_name: String关系名(根 schema.relations 的键)
as_name: String$lookup.as(同时是代理字段前缀)
model: String目标 model(定位目标 schema 的唯一依据)
local_field: String关系本地键(根表标量列)
foreign_field: String关系外键(子表标量列,子 pipeline $group 键)
filter: Option<Value>子级过滤(已剥离嵌套关系路径;仅标量 / 对象点号路径 / 数组整值);None = 无
nested: Vec<NestedRelFilter>子级过滤中的嵌套关系下钻(一层;8c-2)
agg: Vec<(String, AggDef)>本块聚合别名 → 聚合定义(仅保留 having 引用到的)
having: Value谓词条件(仅可引用本块 agg 别名)
negated: bool否定($not / $exists:false)→ anti-join
Trait Implementations§
Source§impl Clone for RelPredicate
impl Clone for RelPredicate
Auto Trait Implementations§
impl Freeze for RelPredicate
impl RefUnwindSafe for RelPredicate
impl Send for RelPredicate
impl Sync for RelPredicate
impl Unpin for RelPredicate
impl UnsafeUnpin for RelPredicate
impl UnwindSafe for RelPredicate
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more