Skip to main content

TdxGeneratorType Enum

Enumerates options for automatic generation of auto-incremented primary key values.

Declaration

TdxGeneratorType = (
    None,
    Identity,
    GUID,
    SequentialGUID,
    Sequence
);

Members

Name
None
Identity
GUID
SequentialGUID
Sequence

Remarks

Options include:

Value Description
None No value generation. Manually assign a unique value to the key field before saving a newly created entity object.
Identity Applies to Integer and Int64 type fields/properties. Depending on the data store type, automatic key generation is implemented using identity/autonumber/auto-increment columns or sequences.
GUID Applies to TGUID type fields/properties. Generates a GUID.
SequentialGUID Applies to TGUID type fields/properties. Generates a sequential GUID.
Sequence Applies to the Firebird, Microsoft SQL Server, and Oracle databases. Generates a sequence value. You can pass the sequence’s name as the GeneratorAttribute‘s parameter. Otherwise, the table name prefixed with the ‘sq_’ string is considered the sequence’s name.

Note

TdxGeneratorType is a scoped enumeration type. Use the type name together with a scope resolution token (. in Delphi or :: in C++Builder) followed by an enumeration value to refer to this value. For example, use TdxGeneratorType.Identity (in Delphi) or TdxGeneratorType::Identity (in C++Builder) to refer to the Identity value in code.

See Also