Skip to main content

ListRelation FieldSelection

rascal-0.40.17

Synopsis

Select a field (column) from a list relation value.

Syntax

Exp . Name

Types

ExpExp . Name

| | lrel[T₁ L₁, T₂ L₂, ... ] | list[Tᵢ] |

Description

Exp should evaluate to a list relation that has an i-th field label Lᵢ that is identical to Name. Return a list with all values of that field. Name stands for itself and is not evaluated.

Examples

rascal>lrel[str street, int nm] R = [<"abc", 1>, <"abc", 2>, <"def", 4>, <"def", 5>];
lrel[str street,int nm]: [
<"abc",1>,
<"abc",2>,
<"def",4>,
<"def",5>
]
rascal>R.street;
list[str]: ["abc","abc","def","def"]