PersistenceContainer
public struct PersistenceContainer
Use persistence containers in the encode(to:)
method of your
persistable records:
struct Person : MutablePersistable {
var id: Int64?
var name: String?
func encode(to container: inout PersistenceContainer) {
container["id"] = id
container["name"] = name
}
}
-
Accesses the value associated with the given column.
Declaration
Swift
public subscript(_ column: String) -> DatabaseValueConvertible?
-
Accesses the value associated with the given column.
Declaration
Swift
public subscript(_ column: Column) -> DatabaseValueConvertible?
-
Accesses the value associated with the given column, in a case-insensitive fashion.
Declaration
Swift
subscript(caseInsensitive column: String) -> DatabaseValueConvertible?