ADSQLColumnType

public enum ADSQLColumnType: String

Defines the type of a column stored in a SQL data source. Currently, these support the same data types as SQLite: NULL, INTEGER, FLOAT, TEXT, BLOB, NONE, DATE and BOOLEAN.

  • Database NULL is the same as a Swift nil.

    Declaration

    Swift

    case nullType = "NULL"
  • Holds any type of Swift integer data types (Int, UInt, Int32, etc.)

    Declaration

    Swift

    case integerType = "INTEGER"
  • Holds any Swift Double or Float value.

    Declaration

    Swift

    case floatType = "FLOAT"
  • Holds any Swift String value.

    Declaration

    Swift

    case textType = "TEXT"
  • Holds a color definition as a text string in the form #RRGGBBAA.

    Declaration

    Swift

    case colorType = "COLOR"
  • Holds any Swift Data value. To store images, use the Action Utilities toData() method.

    Declaration

    Swift

    case blobType = "BLOB"
  • The database has an undefined type and can hold any type of Swift data.

    Declaration

    Swift

    case noneType = "NONE"
  • Holds a Swift Date value.

    Declaration

    Swift

    case dateType = "DATE"
  • Holds a Swift Bool value.

    Declaration

    Swift

    case boolType = "BOOLEAN"
  • Attempts to get the type from a string.

    Declaration

    Swift

    public static func get(fromString text: String) -> ADSQLColumnType?

    Parameters

    text

    The name of a column type.

    Return Value

    The column type or nil if not found.

  • Sets the column type from a string value.

    Remark

    The type will default to nullType if the given type is not found.

    Declaration

    Swift

    public mutating func set(fromString text: String)

    Parameters

    text

    The name of the column type.