Enumerations

The following enumerations are available globally.

  • DatabaseDateEncodingStrategy specifies how EncodableRecord types that also adopt the standard Encodable protocol encode their date properties.

    For example:

    struct Player: EncodableRecord, Encodable {
        static let databaseDateEncodingStrategy: DatabaseDateEncodingStrategy = .timeIntervalSince1970
    
        var name: String
        var registrationDate: Date // encoded as an epoch timestamp
    }
    
    See more

    Declaration

    Swift

    public enum DatabaseDateEncodingStrategy
  • DatabaseUUIDEncodingStrategy specifies how EncodableRecord types that also adopt the standard Encodable protocol encode their UUID properties.

    For example:

    struct Player: EncodableProtocol, Encodable {
        static let databaseUUIDEncodingStrategy: DatabaseUUIDEncodingStrategy = .string
    
        // encoded in a string like "E621E1F8-C36C-495A-93FC-0C247A3E6E5F"
        var uuid: UUID
    }
    
    See more

    Declaration

    Swift

    public enum DatabaseUUIDEncodingStrategy
  • DatabaseDateDecodingStrategy specifies how FetchableRecord types that also adopt the standard Decodable protocol decode their date properties.

    For example:

    struct Player: FetchableRecord, Decodable {
        static let databaseDateDecodingStrategy: DatabaseDateDecodingStrategy = .timeIntervalSince1970
    
        var name: String
        var registrationDate: Date // decoded from epoch timestamp
    }
    
    See more

    Declaration

    Swift

    public enum DatabaseDateDecodingStrategy
  • A record change, given by a FetchedRecordsController to its change callback.

    The move and update events hold a changes dictionary, whose keys are column names, and values the old values that have been changed.

    See more

    Declaration

    Swift

    public enum FetchedRecordChange
  • ValueScheduling controls how ValueObservation schedules the notifications of fresh values to your application.

    See more

    Declaration

    Swift

    public enum ValueScheduling