ModelPrimaryKey
public struct ModelPrimaryKey
-
Declaration
Swift
public var fields: [ModelField]
-
Declaration
Swift
public var isCompositeKey: Bool { get }
-
Convenience method to verify if a field is part of the primary key
Declaration
Swift
public func contains(named name: ModelFieldName) -> Bool
Parameters
name
field name
Return Value
true if the field is part of the primary key
-
Returns the first index in which a model field name of the collection is equal to the provided
name
Returnsnil
if no element was found.Declaration
Swift
public func indexOfField(named name: ModelFieldName) -> Int?