GRDB.swift v0.75.0 Release Notes
-
๐ Released July 8, 2016
๐ฅ Breaking change
๐ Row adapters have been refactored (documentation).
// Row "variants" have been renamed row "scopes": struct Row { - func variant(named name: String) -> Row? + func scoped(on name: String) -> Row? } // Scope definition: VariantRowAdapter has been renamed ScopeAdapter: -struct VariantRowAdapter : RowAdapter { - init(variants: [String: RowAdapter]) -} +struct ScopeAdapter : RowAdapter { + init(_ scopes: [String: RowAdapter]) +} // Adding scopes to an existing adapter: extension RowAdapter { - func adapterWithVariants(variants: [String: RowAdapter]) -> RowAdapter + func addingScopes(scopes: [String: RowAdapter]) -> RowAdapter } // Implementing custom adapters protocol ConcreteRowAdapter { - var variants: [String: ConcreteRowAdapter] { get } + var scopes: [String: ConcreteRowAdapter] { get } }