Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Sources/SQLite/Typed/Coding.swift
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ fileprivate class SQLiteEncoder: Encoder {
}

func encode(_ value: Int64, forKey key: Key) throws {
throw EncodingError.invalidValue(value, EncodingError.Context(codingPath: self.codingPath, debugDescription: "encoding an Int64 is not supported"))
self.encoder.setters.append(Expression(key.stringValue) <- value)
}

func encode(_ value: UInt, forKey key: Key) throws {
Expand Down Expand Up @@ -249,7 +249,7 @@ fileprivate class SQLiteDecoder : Decoder {
}

func decode(_ type: Int64.Type, forKey key: Key) throws -> Int64 {
throw DecodingError.typeMismatch(type, DecodingError.Context(codingPath: self.codingPath, debugDescription: "decoding an UInt64 is not supported"))
return try self.row.get(Expression(key.stringValue))
}

func decode(_ type: UInt.Type, forKey key: Key) throws -> UInt {
Expand Down