ColumnType
public struct ColumnType : RawRepresentable, Hashable
An SQL column type.
try db.create(table: "player") { t in
t.autoIncrementedPrimaryKey("id")
t.column("title", .text)
}
-
Creates an SQL column type.
Declaration
Swift
public init(rawValue: String)
-
The
TEXT
SQL column typeDeclaration
Swift
public static let text: Database.ColumnType
-
The
INTEGER
SQL column typeDeclaration
Swift
public static let integer: Database.ColumnType
-
The
DOUBLE
SQL column typeDeclaration
Swift
public static let double: Database.ColumnType
-
The
NUMERIC
SQL column typeDeclaration
Swift
public static let numeric: Database.ColumnType
-
The
BOOLEAN
SQL column typeDeclaration
Swift
public static let boolean: Database.ColumnType
-
The
BLOB
SQL column typeDeclaration
Swift
public static let blob: Database.ColumnType
-
The
DATE
SQL column typeDeclaration
Swift
public static let date: Database.ColumnType
-
The
DATETIME
SQL column typeDeclaration
Swift
public static let datetime: Database.ColumnType