pub struct SetItem {
pub property: Option<PropertyAccess>,
pub variable: Option<SmallName>,
pub labels: Vec<LabelExpr>,
pub value: Option<Expr>,
pub merge: bool,
pub is_keyword: bool,
pub labels_function: Option<(Expr, LabelsFunctionOp)>,
}Expand description
A single item in a SET clause.
Fields§
§property: Option<PropertyAccess>§variable: Option<SmallName>§labels: Vec<LabelExpr>Each element is a LabelExpr::Label (static, SET n:A) or
LabelExpr::Dynamic (CIP-162, SET n:$(<expr>)/SET n IS $(<expr>))
atom – the parser never produces any other LabelExpr variant here
(no &/|/!/%/grouping). See RemoveItem::labels.
value: Option<Expr>§merge: bool§is_keyword: boolTrue if this label item used the CIP-126 IS keyword (SET n IS A)
rather than : (SET n:A). Only meaningful when labels is
non-empty. Used for the CIP-40/CIP-126 statement-level rule that
forbids mixing IS with a colon-conjunction (:A:B) anywhere in the
same statement.
labels_function: Option<(Expr, LabelsFunctionOp)>CIP-162 “Alternatives” section: SET labels(<expr>) = / += / -= <expr>. Per the CIP’s own text this was never shipped in Neo4j
(“we have decided to implement the rest first, and leave this as a
potential future extension”) – Relate implements it anyway as
the CIP’s stated target semantics. Some((target_expr, op)) when
this item is that form, with target_expr the node expression
inside labels(...) and value (above) holding the RHS list
expression.