Format
The SQLite formats for date components.
enum Format
The SQLite formats for date components.
enum Format
import GRDB
A toolkit for SQLite databases, with a focus on application development
struct DatabaseDateComponents
A database value that holds date components.
case YMD
The format “yyyy-MM-dd”.
case YMD_HM
The format “yyyy-MM-dd HH:mm”.
case YMD_HMS
The format “yyyy-MM-dd HH:mm:ss”.
case YMD_HMSS
The format “yyyy-MM-dd HH:mm:ss.SSS”.
case HM
The format “HH:mm”.
case HMS
The format “HH:mm:ss”.
case HMSS
The format “HH:mm:ss.SSS”.
init(_ dateComponents: DateComponents, format: Format)
Creates a DatabaseDateComponents from a DateComponents and a format.
init(from decoder: Decoder) throws
init?(sqliteStatement: SQLiteStatement, index: CInt)
Returns a value initialized from a raw SQLite statement pointer.
static func fromDatabaseValue(_ dbValue: DatabaseValue) -> DatabaseDateComponents?
Creates a DatabaseDateComponents
from the specified database value.
var databaseValue: DatabaseValue { get }
Returns a TEXT database value.
let dateComponents: DateComponents
The date components
let format: Format
The database format
func encode(to encoder: Encoder) throws
protocol Equatable
A type that can be compared for value equality.
protocol Hashable : Equatable
A type that can be hashed into a Hasher
to produce an integer hash value.
protocol RawRepresentable<RawValue>
A type that can be converted to and from an associated raw value.
protocol Sendable
init?(rawValue: String)
var hashValue: Int { get }
static func != (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether two values are not equal.
func hash(into hasher: inout Hasher)