Update dependencies

This commit is contained in:
2025-10-24 20:16:30 +03:00
parent 4fa72e8065
commit 9c6a81437c
33 changed files with 122 additions and 122 deletions

View File

@@ -29,7 +29,7 @@ final class KeyedContainer<Encoder: RowEncoder, Key: CodingKey>: Container, Keye
switch value {
case let value as Date:
try encoder.encodeDate(value, for: key)
case let value as SQLiteRawBindable:
case let value as SQLiteBindable:
try encoder.encode(value, for: key)
default:
let valueEncoder = try encoder.encoder(for: key)

View File

@@ -59,7 +59,7 @@ public final class MultiRowEncoder: RowEncoder {
throw EncodingError.invalidValue(date, context)
}
public func encode<T: SQLiteRawBindable>(_ value: T, for key: any CodingKey) throws {
public func encode<T: SQLiteBindable>(_ value: T, for key: any CodingKey) throws {
let info = "Attempted to encode \(T.self), but it's not supported."
let context = EncodingError.Context(
codingPath: codingPath + [key],

View File

@@ -29,8 +29,8 @@ public final class SingleRowEncoder: RowEncoder {
// MARK: - Methods
public func set(_ value: Any, for key: any CodingKey) throws {
guard let value = value as? SQLiteRawValue else {
let info = "The value does not match \(SQLiteRawValue.self)"
guard let value = value as? SQLiteValue else {
let info = "The value does not match \(SQLiteValue.self)"
let context = EncodingError.Context(
codingPath: codingPath + [key],
debugDescription: info
@@ -48,8 +48,8 @@ public final class SingleRowEncoder: RowEncoder {
try dateEncoder.encode(date, for: key, to: self)
}
public func encode<T: SQLiteRawBindable>(_ value: T, for key: any CodingKey) throws {
sqliteData[key] = value.sqliteRawValue
public func encode<T: SQLiteBindable>(_ value: T, for key: any CodingKey) throws {
sqliteData[key] = value.sqliteValue
}
public func encoder(for key: any CodingKey) throws -> any Encoder {

View File

@@ -27,7 +27,7 @@ final class SingleValueContainer<Encoder: ValueEncoder>: Container, SingleValueE
switch value {
case let value as Date:
try encoder.encodeDate(value)
case let value as SQLiteRawBindable:
case let value as SQLiteBindable:
try encoder.encode(value)
default:
try value.encode(to: encoder)

View File

@@ -10,7 +10,7 @@ final class SingleValueEncoder: ValueEncoder {
let codingPath: [any CodingKey]
let userInfo: [CodingUserInfoKey: Any]
private(set) var sqliteData: SQLiteRawValue?
private(set) var sqliteData: SQLiteValue?
// MARK: - Inits
@@ -34,8 +34,8 @@ final class SingleValueEncoder: ValueEncoder {
try dateEncoder.encode(date, to: self)
}
func encode<T: SQLiteRawBindable>(_ value: T) throws {
sqliteData = value.sqliteRawValue
func encode<T: SQLiteBindable>(_ value: T) throws {
sqliteData = value.sqliteValue
}
func container<Key: CodingKey>(

View File

@@ -7,6 +7,6 @@ public protocol RowEncoder: Encoder {
func set(_ value: Any, for key: CodingKey) throws
func encodeNil(for key: CodingKey) throws
func encodeDate(_ date: Date, for key: CodingKey) throws
func encode<T: SQLiteRawBindable>(_ value: T, for key: CodingKey) throws
func encode<T: SQLiteBindable>(_ value: T, for key: CodingKey) throws
func encoder(for key: CodingKey) throws -> any Encoder
}

View File

@@ -4,5 +4,5 @@ import DataLiteCore
public protocol ValueEncoder: Encoder {
func encodeNil() throws
func encodeDate(_ date: Date) throws
func encode<T: SQLiteRawBindable>(_ value: T) throws
func encode<T: SQLiteBindable>(_ value: T) throws
}