Update dependencies
This commit is contained in:
@@ -34,7 +34,7 @@ final class KeyedContainer<Decoder: RowDecoder & KeyCheckingDecoder, Key: Coding
|
||||
switch type {
|
||||
case is Date.Type:
|
||||
try decoder.decodeDate(for: key) as! T
|
||||
case let type as SQLiteRawRepresentable.Type:
|
||||
case let type as SQLiteRepresentable.Type:
|
||||
try decoder.decode(type, for: key) as! T
|
||||
default:
|
||||
try T(from: decoder.decoder(for: key))
|
||||
|
||||
@@ -40,7 +40,7 @@ public final class MultiRowDecoder: RowDecoder {
|
||||
return try decode(Date.self, for: key)
|
||||
}
|
||||
|
||||
public func decode<T: SQLiteRawRepresentable>(
|
||||
public func decode<T: SQLiteRepresentable>(
|
||||
_ type: T.Type,
|
||||
for key: any CodingKey
|
||||
) throws -> T {
|
||||
|
||||
@@ -49,7 +49,7 @@ public final class SingleRowDecoder: RowDecoder, KeyCheckingDecoder {
|
||||
try dateDecoder.decode(from: self, for: key)
|
||||
}
|
||||
|
||||
public func decode<T: SQLiteRawRepresentable>(
|
||||
public func decode<T: SQLiteRepresentable>(
|
||||
_ type: T.Type,
|
||||
for key: any CodingKey
|
||||
) throws -> T {
|
||||
|
||||
@@ -27,7 +27,7 @@ final class SingleValueContainer<Decoder: ValueDecoder>: Container, SingleValueD
|
||||
switch type {
|
||||
case is Date.Type:
|
||||
try decoder.decodeDate() as! T
|
||||
case let type as SQLiteRawRepresentable.Type:
|
||||
case let type as SQLiteRepresentable.Type:
|
||||
try decoder.decode(type) as! T
|
||||
default:
|
||||
try T(from: decoder)
|
||||
|
||||
@@ -5,7 +5,7 @@ final class SingleValueDecoder: ValueDecoder {
|
||||
// MARK: - Properties
|
||||
|
||||
let dateDecoder: any DateDecoder
|
||||
let sqliteData: SQLiteRawValue
|
||||
let sqliteData: SQLiteValue
|
||||
let codingPath: [any CodingKey]
|
||||
let userInfo: [CodingUserInfoKey: Any]
|
||||
|
||||
@@ -13,7 +13,7 @@ final class SingleValueDecoder: ValueDecoder {
|
||||
|
||||
init(
|
||||
dateDecoder: any DateDecoder,
|
||||
sqliteData: SQLiteRawValue,
|
||||
sqliteData: SQLiteValue,
|
||||
codingPath: [any CodingKey],
|
||||
userInfo: [CodingUserInfoKey: Any]
|
||||
) {
|
||||
@@ -33,7 +33,7 @@ final class SingleValueDecoder: ValueDecoder {
|
||||
try dateDecoder.decode(from: self)
|
||||
}
|
||||
|
||||
func decode<T: SQLiteRawRepresentable>(_ type: T.Type) throws -> T {
|
||||
func decode<T: SQLiteRepresentable>(_ type: T.Type) throws -> T {
|
||||
guard sqliteData != .null else {
|
||||
let info = "Cannot get value of type \(T.self), found null value instead."
|
||||
let context = DecodingError.Context(
|
||||
|
||||
@@ -52,7 +52,7 @@ final class UnkeyedContainer<Decoder: RowDecoder>: Container, UnkeyedDecodingCon
|
||||
switch type {
|
||||
case is Date.Type:
|
||||
return try decoder.decodeDate(for: currentKey) as! T
|
||||
case let type as SQLiteRawRepresentable.Type:
|
||||
case let type as SQLiteRepresentable.Type:
|
||||
return try decoder.decode(type, for: currentKey) as! T
|
||||
default:
|
||||
return try T(from: decoder.decoder(for: currentKey))
|
||||
|
||||
Reference in New Issue
Block a user