Enumerationgrdb 7.3.0GRDB

DatabaseDateDecodingStrategy

DatabaseDateDecodingStrategy specifies how FetchableRecord types that also adopt the standard Decodable protocol decode their Date properties.

FetchableRecord.swift:932
enum DatabaseDateDecodingStrategy

For example:

struct Player: FetchableRecord, Decodable {
    static func databaseDateDecodingStrategy(for column: String) -> DatabaseDateDecodingStrategy {
        .timeIntervalSince1970
    }

    var name: String
    var registrationDate: Date // decoded from epoch timestamp
}