Pre-release

@tanner0101 tanner0101 released this May 16, 2018 · 48 commits to master since this release

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)
    }
}
Assets 2