Attribute

public struct Attribute
extension Attribute: Hashable
extension Attribute: Codable
extension Attribute: JSONDecodable

An attribute of Table.

  • Attribute name.

    Declaration

    Swift

    public var name: String
  • Attribute type (storage, calculated, relatedEntity, and alias)

    Declaration

    Swift

    public var kind: AttributeKind
  • Scope of the attribute (only those attributes whose scope is Public will appear).

    Declaration

    Swift

    public var scope: AttributeScope
  • Attribute type (bool, blob, byte, date, duration, image, long, long64, number, string, uuid, or word) or the table class for a N->1 relation attribute.

    Declaration

    Swift

    public var type: AttributeType
  • his property returns True if the Identifying property was checked. Otherwise, this property does not appear.

    Declaration

    Swift

    public var identifying: Bool
  • If any Index Kind was selected, this property will return true. Otherwise, this property does not appear.

    Declaration

    Swift

    public var indexed: Bool
  • Undocumented

    Declaration

    Swift

    public var simpleDate: Bool
  • Boolean This property is True if the attribute is of type calculated or alias.

    Declaration

    Swift

    public var readOnly: Bool
  • This property returns the value entered for the Min Length property, if one was entered.

    Declaration

    Swift

    public var minLength: Int?
  • This property returns the value entered for the Max Length property, if one was entered.

    Declaration

    Swift

    public var maxLength: Int?
  • This property returns True if the Autocomplete property was checked. Otherwise, this property does not appear.

    Declaration

    Swift

    public var autoComplete: Bool
  • If you define a format for the attribute in the Default Format property, it will appear in the “format” property.

    Declaration

    Swift

    public var defaultFormat: Bool
  • Foreign key for link.

    Declaration

    Swift

    public var foreignKey: String?
  • String For an alias attribute, the type is a path (e.g., employer.name) else path could be used for relation

    Declaration

    Swift

    public var path: String?
  • If true, the path is the inverse link name

    Declaration

    Swift

    public var reversePath: Bool
  • Undocumented

    Declaration

    Swift

    public var nameTransformer: AttributeNameTransformer
  • Undocumented

    Declaration

    Swift

    public init(name: String, kind: AttributeKind, scope: AttributeScope, type: AttributeType)

Hashable

  • Declaration

    Swift

    public func hash(into hasher: inout Hasher)
  • Declaration

    Swift

    public static func == (lhs: Attribute, rhs: Attribute) -> Bool

Codable

  • Declaration

    Swift

    public init(from decoder: Decoder) throws
  • Declaration

    Swift

    public func encode(to encoder: Encoder) throws

JSON

Expression

  • Undocumented

    Declaration

    Swift

    public typealias ValueType = Any
  • Undocumented

    Declaration

    Swift

    public var expression: Attribute.Filter.Expression { get }
  • Encode attribute name to be safe for iOS.

    Declaration

    Swift

    public var safeName: String { get }

casting