ColumnType

public struct ColumnType : RawRepresentable, Hashable

An SQL column type.

try db.create(table: "player") { t in
    t.autoIncrementedPrimaryKey("id")
    t.column("title", .text)
}

See https://www.sqlite.org/datatype3.html

  • Undocumented

    Declaration

    Swift

    public init(_ rawValue: String)
  • The TEXT SQL column type

    Declaration

    Swift

    public static let text = ColumnType("TEXT")
  • The INTEGER SQL column type

    Declaration

    Swift

    public static let integer = ColumnType("INTEGER")
  • The DOUBLE SQL column type

    Declaration

    Swift

    public static let double = ColumnType("DOUBLE")
  • The NUMERIC SQL column type

    Declaration

    Swift

    public static let numeric = ColumnType("NUMERIC")
  • The BOOLEAN SQL column type

    Declaration

    Swift

    public static let boolean = ColumnType("BOOLEAN")
  • The BLOB SQL column type

    Declaration

    Swift

    public static let blob = ColumnType("BLOB")
  • The DATE SQL column type

    Declaration

    Swift

    public static let date = ColumnType("DATE")
  • The DATETIME SQL column type

    Declaration

    Swift

    public static let datetime = ColumnType("DATETIME")