ColumnType
public struct ColumnType : RawRepresentable, Hashable
An SQL column type.
try db.create(table: "persons") { t in
t.column("id", .integer).primaryKey()
t.column("title", .text)
}
-
Declaration
Swift
public let rawValue: String
-
Declaration
Swift
public init(rawValue: String)
Parameters
rawValue
-
Undocumented
Declaration
Swift
public struct ColumnType : RawRepresentable, Hashable
-
Declaration
Swift
public var hashValue: Int
-
The
TEXT
SQL column typeDeclaration
Swift
public static let text = ColumnType("TEXT")
-
The
INTEGER
SQL column typeDeclaration
Swift
public static let integer = ColumnType("INTEGER")
-
The
DOUBLE
SQL column typeDeclaration
Swift
public static let double = ColumnType("DOUBLE")
-
The
NUMERIC
SQL column typeDeclaration
Swift
public static let numeric = ColumnType("NUMERIC")
-
The
BOOLEAN
SQL column typeDeclaration
Swift
public static let boolean = ColumnType("BOOLEAN")
-
The
BLOB
SQL column typeDeclaration
Swift
public static let blob = ColumnType("BLOB")
-
The
DATE
SQL column typeDeclaration
Swift
public static let date = ColumnType("DATE")
-
The
DATETIME
SQL column typeDeclaration
Swift
public static let datetime = ColumnType("DATETIME")