DatabaseDateComponents
public struct DatabaseDateComponents : DatabaseValueConvertible, StatementColumnConvertible
DatabaseDateComponents reads and stores DateComponents in the database.
-
The available formats for reading and storing date components.
See moreDeclaration
Swift
public enum Format : String
-
The date components
Declaration
Swift
public let dateComponents: DateComponents
-
The database format
Declaration
Swift
public let format: Format
-
Creates a DatabaseDateComponents from a DateComponents and a format.
Declaration
Swift
public init(_ dateComponents: DateComponents, format: Format)
Parameters
dateComponents
An optional DateComponents.
format
The format used for storing the date components in the database.
-
Returns a value initialized from a raw SQLite statement pointer.
Declaration
Swift
public init(sqliteStatement: SQLiteStatement, index: Int32)
Parameters
sqliteStatement
A pointer to an SQLite statement.
index
The column index.
-
Returns a value that can be stored in the database.
Declaration
Swift
public var databaseValue: DatabaseValue { get }
-
Returns a DatabaseDateComponents if dbValue contains a valid date.
Declaration
Swift
public static func fromDatabaseValue(_ dbValue: DatabaseValue) -> DatabaseDateComponents?