DatabaseColumnDecodingStrategy
DatabaseColumnDecodingStrategy
specifies how FetchableRecord
types that also adopt the standard Decodable
protocol look for the database columns that match their coding keys.
enum DatabaseColumnDecodingStrategy
For example:
struct Player: FetchableRecord, Decodable {
static let databaseColumnDecodingStrategy = DatabaseColumnDecodingStrategy.convertFromSnakeCase
// Decoded from the player_id column
var playerID: Int
}