ModelField
public struct ModelFieldWarning
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.
- 
                  
                  DeclarationSwift public let name: ModelFieldName
- 
                  
                  DeclarationSwift public let type: ModelFieldType
- 
                  
                  DeclarationSwift public let isRequired: Bool
- 
                  
                  DeclarationSwift public let isReadOnly: Bool
- 
                  
                  DeclarationSwift public let isArray: Bool
- 
                  
                  DeclarationSwift public let attributes: [ModelFieldAttribute]
- 
                  
                  DeclarationSwift public let association: ModelAssociation?
- 
                  
                  DeclarationSwift public let authRules: AuthRules
- 
                  
                  DeclarationSwift public var isPrimaryKey: Bool { get }
- 
                  
                  DeclarationSwift public init( name: String, type: ModelFieldType, isRequired: Bool = false, isReadOnly: Bool = false, isArray: Bool = false, attributes: [ModelFieldAttribute] = [], association: ModelAssociation? = nil, authRules: AuthRules = [] )
- 
                  
                  Warning Although this haspublicaccess, it is intended for internal & codegen use and should not be used directly by host applications. The behavior of this may change without warning. Though it is not used by host application making any change to thesepublictypes should be backward compatible, otherwise it will be a breaking change.DeclarationSwift var hasAssociation: Bool { get }
- 
                  
                  If the field represents an association returns the Model.Type.Seealso ModelFieldTypeSeealso ModelFieldAssociationWarning Although this haspublicaccess, it is intended for internal & codegen use and should not be used directly by host applications. The behavior of this may change without warning. Though it is not used by host application making any change to thesepublictypes should be backward compatible, otherwise it will be a breaking change.DeclarationSwift @available(*, deprecated, message: "Use of associated model type is deprecated, use `associatedModelName` instead.") var associatedModel: Model.Type? { get }
- 
                  
                  If the field represents an association returns the ModelName.Seealso ModelFieldTypeSeealso ModelFieldAssociationWarning Although this haspublicaccess, it is intended for internal & codegen use and should not be used directly by host applications. The behavior of this may change without warning. Though it is not used by host application making any change to thesepublictypes should be backward compatible, otherwise it will be a breaking change.DeclarationSwift var associatedModelName: ModelName? { get }
- 
                  
                  This calls associatedModelNamebut enforces that the field must represent an association. In case the field type is not aModelit callspreconditionFailure. Consumers should fix their models in order to recover from it, since associations are only possible between twoModel.Note as a maintainer, make sure you use this computed property only when context allows (i.e. the field is a valid relationship, such as foreign keys).Warning Although this haspublicaccess, it is intended for internal & codegen use and should not be used directly by host applications. The behavior of this may change without warning. Though it is not used by host application making any change to thesepublictypes should be backward compatible, otherwise it will be a breaking change.DeclarationSwift @available(*, deprecated, message: "Use of requiredAssociatedModel with Model.Type is deprecated, use `requiredAssociatedModelName`\nthat return ModelName instead.") var requiredAssociatedModel: Model.Type { get }
- 
                  
                  This calls associatedModelNamebut enforces that the field must represent an association. In case the field type is not aModelit callspreconditionFailure. Consumers should fix their models in order to recover from it, since associations are only possible between twoModel.Note as a maintainer, make sure you use this computed property only when context allows (i.e. the field is a valid relationship, such as foreign keys).Warning Although this haspublicaccess, it is intended for internal & codegen use and should not be used directly by host applications. The behavior of this may change without warning. Though it is not used by host application making any change to thesepublictypes should be backward compatible, otherwise it will be a breaking change.DeclarationSwift var requiredAssociatedModelName: ModelName { get }
- 
                  
                  Warning Although this haspublicaccess, it is intended for internal & codegen use and should not be used directly by host applications. The behavior of this may change without warning. Though it is not used by host application making any change to thesepublictypes should be backward compatible, otherwise it will be a breaking change.DeclarationSwift var isAssociationOwner: Bool { get }
- 
                  
                  Warning Although this haspublicaccess, it is intended for internal & codegen use and should not be used directly by host applications. The behavior of this may change without warning. Though it is not used by host application making any change to thesepublictypes should be backward compatible, otherwise it will be a breaking change.DeclarationSwift var _isBelongsToOrHasOne: Bool { get }
- 
                  
                  Warning Although this haspublicaccess, it is intended for internal & codegen use and should not be used directly by host applications. The behavior of this may change without warning. Though it is not used by host application making any change to thesepublictypes should be backward compatible, otherwise it will be a breaking change.DeclarationSwift var associatedField: ModelField? { get }
- 
                  
                  Warning Although this haspublicaccess, it is intended for internal & codegen use and should not be used directly by host applications. The behavior of this may change without warning. Though it is not used by host application making any change to thesepublictypes should be backward compatible, otherwise it will be a breaking change.DeclarationSwift var associatedFieldNames: [String] { get }
- 
                  
                  Warning Although this haspublicaccess, it is intended for internal & codegen use and should not be used directly by host applications. The behavior of this may change without warning. Though it is not used by host application making any change to thesepublictypes should be backward compatible, otherwise it will be a breaking change.DeclarationSwift var isOneToOne: Bool { get }
- 
                  
                  Warning Although this haspublicaccess, it is intended for internal & codegen use and should not be used directly by host applications. The behavior of this may change without warning. Though it is not used by host application making any change to thesepublictypes should be backward compatible, otherwise it will be a breaking change.DeclarationSwift var isOneToMany: Bool { get }
- 
                  
                  Warning Although this haspublicaccess, it is intended for internal & codegen use and should not be used directly by host applications. The behavior of this may change without warning. Though it is not used by host application making any change to thesepublictypes should be backward compatible, otherwise it will be a breaking change.DeclarationSwift var isManyToOne: Bool { get }
- 
                  
                  Warning Although this haspublicaccess, it is intended for internal & codegen use and should not be used directly by host applications. The behavior of this may change without warning. Though it is not used by host application making any change to thesepublictypes should be backward compatible, otherwise it will be a breaking change.DeclarationSwift @available(*, deprecated, message: "Use `embeddedType` is deprecated, use `embeddedTypeSchema` instead.") var embeddedType: Embeddable.Type? { get }
- 
                  
                  Warning Although this haspublicaccess, it is intended for internal & codegen use and should not be used directly by host applications. The behavior of this may change without warning. Though it is not used by host application making any change to thesepublictypes should be backward compatible, otherwise it will be a breaking change.DeclarationSwift var embeddedTypeSchema: ModelSchema? { get }
- 
                  
                  Warning Although this haspublicaccess, it is intended for internal & codegen use and should not be used directly by host applications. The behavior of this may change without warning. Though it is not used by host application making any change to thesepublictypes should be backward compatible, otherwise it will be a breaking change.DeclarationSwift var isEmbeddedType: Bool { get }
 View on GitHub
View on GitHub