ModelSchema
public struct ModelSchema
Warning
Although this haspublic
access, it is intended for internal & codegen use and should not be used
directly by host applications. The behavior of this may change without warning.
-
Declaration
Swift
public let name: String
-
Declaration
Swift
public let pluralName: String?
-
Declaration
Swift
public let listPluralName: String?
-
Declaration
Swift
public let syncPluralName: String?
-
Declaration
Swift
public let authRules: AuthRules
-
Declaration
Swift
public let fields: ModelFields
-
Declaration
Swift
public let attributes: [ModelAttribute]
-
Declaration
Swift
public let indexes: [ModelAttribute]
-
Declaration
Swift
public let sortedFields: [ModelField]
-
Declaration
Swift
public var primaryKey: ModelPrimaryKey { get }
-
init(name:
pluralName: listPluralName: syncPluralName: authRules: attributes: fields: primaryKeyFieldKeys: ) Declaration
Swift
public init(name: String, pluralName: String? = nil, listPluralName: String? = nil, syncPluralName: String? = nil, authRules: AuthRules = [], attributes: [ModelAttribute] = [], fields: ModelFields = [:], primaryKeyFieldKeys: [ModelFieldName] = [])
-
Declaration
Swift
public func field(withName name: String) -> ModelField?
-
Declaration
Swift
var isSyncable: Bool { get }
-
Declaration
Swift
var isSystem: Bool { get }
-
Declaration
Swift
var hasAuthenticationRules: Bool { get }
-
Declaration
Swift
var hasAssociations: Bool { get }
-
Returns the list of fields that make up the primary key for the model. In case of a custom primary key, the model has a
@key
directive without a name and at least 1 fieldDeclaration
Swift
var primaryKeyIndexFields: [ModelFieldName]? { get }