Skip to content

Commit 0d7de6c

Browse files
committed
1 parent c519843 commit 0d7de6c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/SQLite/Typed/Coding.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ fileprivate class SQLiteEncoder: Encoder {
201201
}
202202

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

207207
func encode(_ value: UInt, forKey key: Key) throws {
@@ -298,7 +298,7 @@ fileprivate class SQLiteDecoder : Decoder {
298298
}
299299

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

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

0 commit comments

Comments
 (0)