ADDataTableKeyType

public enum ADDataTableKeyType

Defines the type of primary key that has been specified for a class conforming to the ADDataTable protocol.

  • Specifies that the given primary key must be unique and not already exist for any other key in the data provider’s data source.

    Declaration

    Swift

    case uniqueValue
  • For an Int type of primary key, automatically assign a key value when a new row is added to the data provider’s data source.

    Remarks

    For SQL based data providers, the ID is typically generated using the AUTOINCREMENT key type.

    Declaration

    Swift

    case autoIncrementingInt
  • For an Int type of primary key, automatically assign a key value when a new row is added to the data provider’s data source by finding the largest used ID number and adding one to it.

    Remarks

    This key type is provided as a workaround to issues with the SQLite database’s AUTOINCREMENT implementation and to provide a valid ID to a record when it is first created (instead of after its been saved) for parent-child table relationships.

    Declaration

    Swift

    case computedInt
  • For a String type of primary key, automatically assign a UUID as the key value when a new class conforming to the ADDataTable protocol is created.

    Declaration

    Swift

    case autoUUIDString