Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

@Structure, @Fields, @Indexes

Only apply to table files (@Properties/Type : "Table").

@Structure

KeyDescription
NameTable name. Must start with a letter, letters/digits only, max 10 characters (DDS object name limit).
DescriptionTable description.

Also contains, nested: @Fields, @Indexes and optionally @Documentation (see @Documentation).

@Fields

One Name type(...) line per column:

@Fields {
    CustCode char(6)   Description("Customer code")
    Name     char(20)  Description("Name")
    Balance  number(9,2) Default(0)
    RegDate  date
}

Allowed types: only char, number, date (not field/list/matrix — those are exclusive to @Variables, see Data types).

Modifiers:

ModifierDescription
Description("text")Field description. Requires a quoted string.
Default(value)Default value: a quoted string or a bare number, depending on the field’s type. Not allowed on date fields.
AllowNullAllows NULL on this field. A PrimaryKey field can’t carry this modifier.

@Indexes

One Kind(Name, [Fields...], "optional description") entry per access path:

@Indexes {
    PrimaryKey ( GRIDDEMOPK, [CustCode] )
    Unique     ( GRIDDEMOEMAIL, [Email], "Unique email" )
    Index      ( GRIDDMNOM, [Name] )
}
KindDescription
PrimaryKeyThe table’s primary access path. Only one per table; its fields can’t be AllowNull.
UniqueUnique secondary access path.
IndexNon-unique secondary access path.

Full example

@Properties {
    Type : "Table"
}
@Structure {
    Name        : "GRIDDEMO"
    Description : "Sample customers"
    @Fields {
        CustCode char(6)   Description("Customer code")
        Name     char(20)  Description("Name")
        City     char(15)  Description("City")
    }
    @Indexes {
        PrimaryKey ( GRIDDEMOPK, [CustCode] )
        Index ( GRIDDMNOM, [Name] )
    }
}