Update stage
An update stage updates data in the database. Updatable data includes ownerships of attributes and role players of relations.
Behavior
-
Has statements replace existing attribute ownerships of the specified attribute’s type (
isa!
) with a new ownership of the specified instance. If an attribute is provided by value, the attribute type is mandatory. -
Links statements replace existing role players of the specified player’s role (
isa!
) with the specified instance. Role tags can be omitted if there is only a single role the role player can play.
Update stages cannot bind new variables.
If there is no data to existing replace, the operation is equivalent to insert.
Execution
The update stage must be preceded by other stages. The body of the update stage is executed once for each input row. The output is then a stream equivalent to the input rows, as no variables are modified.
Validation
Only unambiguous operations on owns
and relates
with cardinalities limited by 1 are allowed.
The modified concepts are validated the same way as in insert stages.