Previous: Date and Time Types, Up: Field Types

6.7 Other Field Types

The Email field type specifier is used to declare electronic addresses. The synopsis is:

     %typedef: Email_t email

Sometimes it is useful to make fields to store field names. For that purpose the Field field type specifier is supported. The synopsis is:

     %typedef: Field_t field

Universally Unique Identifiers (also known as UUIDs) are a way to assign a globally unique label to some object. The uuid field type specifier serves that purpose. The synopsis is:

     %typedef: Id_t uuid

The format of the uuids is specified as 32 hexadecimal digits, displayed in five groups separated by hyphens. For example:


There is one other possible field type, viz: a foreign key. The following example defines the type Maintainer_t to be of type “record Hacker”; in other words, a foreign key referring to a record in the Hacker record set.

     %typedef: Maintainer_t rec Hacker

This essentially means that the values to be stored in fields of type Maintainer_t are of whatever type is defined for the primary key of the Hacker record set. Why this is useful is discussed later. See Queries which Join Records.