Sfairadora

  • Reference Guide

Data Type Editor

The Data type editor is used to manipulate with the definition of a data type. It consists mainly of a menu, in which you can select a scalar type or a compound type category. Every scalar type is identified by a name in English followed by its identifier in the Enki language enclosed in parentheses – for example: “Real number (Real)”. Some less frequently used scalar types are listed in the Next submenu. This submenu also contains dispel definition types, but these are used only in special cases.
Individual compound types are described in the following section.

Table, Sequence

Sequence is a data type consisting of a variable number of elements of the same type. Table is a sequence whose element is a structure (see below). Elements of the structure are regarded as columns of the table. Since table is the most important instance of a sequence in Sfairadora, the element type is automatically set to structure if you select this category.
You can specify filter (explained in detail in the table control section), order, unicity, inserter function, remover function, and especially the data type of the sequence element for the sequence. Again, the element data type is assigned by the data type editor.
The meaning of these parameters is explained in the chapter devoted to the sequence data type.

Structure

Structure is a data type consisting of a predetermined number of components. Every component has its own defined data type. The components are distinguished by names.
A list of elements (components) of the structure must be specified. Every element has the following attributes:
Attribute
Description
Name
Element name. Must be an identifier.
Data type
Element type selection (corresponds to selection from the data type editor).
Type properties
Other properties of compound types as described herein. You can either expand the properties in the actual table or click the button to open a separate window.
Optional
If checked, the element value may be missing.
Initial value
The initial value of the structure element. For example, if the structure represents a table row, this field determines the initial value for the given column.
You can find more information in the chapter on the structure data type category.

Union

Union allows you to specify that the data item may assume values of different types. A union may be either unbound, permitting any type, or bound, permitting only enumerated types.
The union editor contains a table, where you can specify permitted types. If no type is specified, the union is unbound. For a bound union, select the element type using the data type editor; if you select a compound type, specify also other properties of the type as described herein. You can either expand the properties in the actual table or click the button to open a separate window.
You can find more information in the chapter on the union data type category.

Array

Array is a data type consisting of a fixed number of elements of the same type. You have to specify the number of the elements and their type. Elements are identified by a numeric index (starting from 0).
You can find more information in the chapter on the array data type category.

Named

Named type is any type, but usually compound, that is assigned a name so that it can be easily used elsewhere. In order to define a named type, you only need to specify its name.
A named type is defined either in the Definitions document section and Data Types subsection or in the definition of a data provider dispel.

Forwarded

Forwarded item indicates that the data concerned should be equal to another data item. Forwarded data items are most often created automatically when a table view is produced.
You can find more information in the chapter on the forwarded data type category.

Computed

The value of a computed item is calculated from other data values. The most common use of a computed item is the creation of a computed table column.
You can find more information in the chapter on the computed data type category.

Inferred Table, Sequence

Inferred sequence is a sequence whose elements have been derived from one or more source sequences. Inferred sequence is used for the realization of a table view. It is much easier to create an inferred sequence implicitly, through manipulation with a table view, rather than directly, through specification in the data type editor.
You can find more information in the chapter on the inferred sequence data type category.

Type Encapsulation

Sometimes you will need to change the existing type in order to create a more complex type. For example, you may need to create a sequence of structures from a structure if you find out that a single segment is insufficient. This purpose is served by the Encapsulate type option in the menu. You can select encapsulation into the following categories of types:
●
Sequence
●
Array
●
Structure
●
Union
If you select one of these options, the existing type is changed to the selected type, and, at the same time, the existing type becomes the type of an element constituting the selected compound type.
For example, if you have a string type and select encapsulation into structure, the result is a structure with one element, whose type is string.
If you are using the editor to modify, for example, the data type of an element in the Data document section, encapsulation maintains also the data in the respective data type instance. The same applies to any other data type change.