Expressions & Object Sets

A serializable expression AST for filters, computed properties, access control conditions, and composable entity collection queries.

Expr Variants

VariantDescription
LiteralConstant PropertyValue
PropertyPropertyRef (direct or via LinkHop traversal)
CompareEq, Ne, Lt, Le, Gt, Ge, Contains, StartsWith, EndsWith
ArithmeticAdd, Sub, Mul, Div, Mod
And / Or / NotBoolean composition
AggregateCount, Sum, Avg, Min, Max, P95, P99, CountDistinct over an ObjectSet
IsNullNull check
CastType conversion to target PropertyType
CallServer-side FunctionDef invocation
HasInterfaceCheck if entity implements an interface
SpatialGeographic predicate on a GeoPoint/GeoShape property

ObjectSet Queries

Composable, predicate-defined entity collections.

VariantDescription
OfType(id)All instances of an ObjectType
Implementing(id)All types implementing an Interface
FilterBase set + Expr predicate
Union / Intersect / SubtractSet algebra
SearchAroundGraph traversal via HopDescriptor (link_type, direction, filter)
TextSearchFull-text search with optional type filter
Explicit(ids)Named set of InstanceIds

Chaining

Rust
// "All HVAC units in zone A where temp > 28"
ObjectSet::of_type(hvac_id)
    .filter(Expr::And(vec![
        Expr::Compare {
            left: Box::new(Expr::Property(PropertyRef::direct("zone"))),
            op: CompareOp::Eq,
            right: Box::new(Expr::Literal(PropertyValue::String("A".into()))),
        },
        Expr::Compare {
            left: Box::new(Expr::Property(PropertyRef::direct("temperature"))),
            op: CompareOp::Gt,
            right: Box::new(Expr::Literal(PropertyValue::F64(28.0))),
        },
    ]))

Questions?

Reach out for help with integration, deployment, or custom domain codecs.