Enumerations
The following enumerations are available globally.
-
A kind of database event. See the
See moreTransactionObserver
protocol for more information.
-
A date modifier for SQLite date functions such as
julianDay(_:_:)
anddateTime(_:_:)
.For more information, see https://www.sqlite.org/lang_datefunc.html
See more
-
DatabaseDateEncodingStrategy
specifies howEncodableRecord
types that also adopt the standardEncodable
protocol encode theirDate
properties.For example:
See morestruct Player: EncodableRecord, Encodable { static let databaseDateEncodingStrategy = DatabaseDateEncodingStrategy.timeIntervalSince1970 var name: String var registrationDate: Date // encoded as an epoch timestamp }
-
DatabaseUUIDEncodingStrategy
specifies howEncodableRecord
types that also adopt the standardEncodable
protocol encode theirUUID
properties.For example:
See morestruct Player: EncodableProtocol, Encodable { static let databaseUUIDEncodingStrategy = DatabaseUUIDEncodingStrategy.uppercaseString // encoded in a string like "E621E1F8-C36C-495A-93FC-0C247A3E6E5F" var uuid: UUID }
-
DatabaseColumnEncodingStrategy
specifies howEncodableRecord
types that also adopt the standardEncodable
protocol encode their coding keys into database columns.For example:
See morestruct Player: EncodableProtocol, Encodable { static let databaseColumnEncodingStrategy = DatabaseColumnEncodingStrategy.convertToSnakeCase // Encoded in the player_id column var playerID: String }
-
DatabaseDateDecodingStrategy
specifies howFetchableRecord
types that also adopt the standardDecodable
protocol decode theirDate
properties.For example:
See morestruct Player: FetchableRecord, Decodable { static let databaseDateDecodingStrategy = DatabaseDateDecodingStrategy.timeIntervalSince1970 var name: String var registrationDate: Date // decoded from epoch timestamp }
-
DatabaseColumnDecodingStrategy
specifies howFetchableRecord
types that also adopt the standardDecodable
protocol look for the database columns that match their coding keys.For example:
See morestruct Player: FetchableRecord, Decodable { static let databaseColumnDecodingStrategy = DatabaseColumnDecodingStrategy.convertFromSnakeCase // Decoded from the player_id column var playerID: Int }
-
An error thrown by a type that adopts
See moreMutablePersistableRecord
.Declaration
Swift
-
Controls the extent of the shared database observation of
See moreSharedValueObservation
. -
A namespace for types related to the
See moreValueReducer
protocol.