Skip to content

Fluent MySQL 3.0.0 RC 2.5

Pre-release
Pre-release
Compare
Choose a tag to compare
@tanner0101 tanner0101 released this 16 May 18:42
d8880a9

New:

  • Added a MySQLEnum helper type for using nested enums on models. (#99, #103, #112)
// `FixedWidthInteger` backed enums are easiest to conform
enum PetType: Int, MySQLEnumType {
    case cat, dog
}

// Other enums require `reflectDecoded`
enum FavoriteTreat: String, MySQLEnumType {
    case bone = "b"
    case tuna = "t"
    static func reflectDecoded() -> (FavoriteTreat, FavoriteTreat) {
        return (.bone, .tuna)
    }
}