Skip to content

Extend Action

Leon Starr edited this page Aug 9, 2023 · 6 revisions

The relational extend operation creates an output Table Flow by adding a new Table Attribute to those in a Table of an input Table Flow. The value of that Table Attribute for each tuple is determined by evaluating a supplied expression. The output Table Flow is typed by the extended Table and a set of tuples each with a new value supplied for that added Table Attribute.

Here is a Scrall example:

going up cabins #= Cabin( Direction: _up )[>> Delay (.Estimate delay( Floor: dest floor, Direction: _up )) ]

This statement creates a new Table Flow named going up cabins by selecting all Cabin instances whose attribute matches the enumeration value _up and then adding a Delay attribute to those attributes already defined on the Cabin class. The delay time for each instance of Cabin is computed by invoking the Cabin.Estimate Delay( Floor, Direction) method on each instance.

Identifiers

  1. ID + Activity + Domain

Attributes

No non-referential attributes

Clone this wiki locally