@@ -35,7 +35,7 @@ final class _StatementDecoder: Decoder {
3535 self . codingPath = codingPath
3636 }
3737
38- func container< Key> ( keyedBy type: Key . Type ) throws -> KeyedDecodingContainer < Key > where Key : CodingKey {
38+ func container< Key> ( keyedBy type: Key . Type ) throws -> KeyedDecodingContainer < Key > where Key: CodingKey {
3939 let container = KeyedContainer < Key > ( context: context, codingPath: codingPath)
4040 return KeyedDecodingContainer ( container)
4141 }
@@ -95,7 +95,7 @@ extension _StatementDecoder {
9595 throw DecodingError . valueNotFound ( type, codingPath: codingPath + [ key] )
9696 }
9797 guard let number = Float ( exactly: value) else {
98- throw DecodingError . numberNotFit ( type, value: value. description, codingPath : codingPath + [ key] )
98+ throw DecodingError . numberNotFit ( type, value: value. description, path : codingPath + [ key] )
9999 }
100100 return number
101101 }
@@ -140,7 +140,7 @@ extension _StatementDecoder {
140140 try integer ( type, forKey: key)
141141 }
142142
143- func decode< T> ( _ type: T . Type , forKey key: Key ) throws -> T where T : Decodable {
143+ func decode< T> ( _ type: T . Type , forKey key: Key ) throws -> T where T: Decodable {
144144 // TODO: Data
145145 let decoder = _StatementDecoder ( context: context, codingPath: codingPath + [ key] )
146146 return try type. init ( from: decoder)
@@ -149,7 +149,7 @@ extension _StatementDecoder {
149149 func nestedContainer< NestedKey> (
150150 keyedBy type: NestedKey . Type ,
151151 forKey key: Key
152- ) throws -> KeyedDecodingContainer < NestedKey > where NestedKey : CodingKey {
152+ ) throws -> KeyedDecodingContainer < NestedKey > where NestedKey: CodingKey {
153153 fatalError ( )
154154 }
155155
@@ -171,7 +171,7 @@ extension _StatementDecoder {
171171 throw DecodingError . valueNotFound ( type, codingPath: codingPath + [ key] )
172172 }
173173 guard let number = type. init ( exactly: value) else {
174- throw DecodingError . numberNotFit ( type, value: value. description, codingPath : codingPath + [ key] )
174+ throw DecodingError . numberNotFit ( type, value: value. description, path : codingPath + [ key] )
175175 }
176176 return number
177177 }
@@ -187,7 +187,7 @@ extension _StatementDecoder {
187187 func decodeNil( ) -> Bool {
188188 context. statement. null ( for: key)
189189 }
190-
190+
191191 func decode( _ type: Bool . Type ) throws -> Bool {
192192 guard let value = context. statement. int64 ( for: key) else {
193193 throw DecodingError . valueNotFound ( type, codingPath: codingPath)
@@ -201,64 +201,64 @@ extension _StatementDecoder {
201201 }
202202 return value
203203 }
204-
204+
205205 func decode( _ type: Double . Type ) throws -> Double {
206206 guard let value = context. statement. double ( for: key) else {
207207 throw DecodingError . valueNotFound ( type, codingPath: codingPath)
208208 }
209209 return value
210210 }
211-
211+
212212 func decode( _ type: Float . Type ) throws -> Float {
213213 guard let value = context. statement. double ( for: key) else {
214214 throw DecodingError . valueNotFound ( type, codingPath: codingPath)
215215 }
216216 guard let number = Float ( exactly: value) else {
217- throw DecodingError . numberNotFit ( type, value: value. description, codingPath : codingPath)
217+ throw DecodingError . numberNotFit ( type, value: value. description, path : codingPath)
218218 }
219219 return number
220220 }
221-
221+
222222 func decode( _ type: Int . Type ) throws -> Int {
223223 try integer ( type)
224224 }
225-
225+
226226 func decode( _ type: Int8 . Type ) throws -> Int8 {
227227 try integer ( type)
228228 }
229-
229+
230230 func decode( _ type: Int16 . Type ) throws -> Int16 {
231231 try integer ( type)
232232 }
233-
233+
234234 func decode( _ type: Int32 . Type ) throws -> Int32 {
235235 try integer ( type)
236236 }
237-
237+
238238 func decode( _ type: Int64 . Type ) throws -> Int64 {
239239 try integer ( type)
240240 }
241-
241+
242242 func decode( _ type: UInt . Type ) throws -> UInt {
243243 try integer ( type)
244244 }
245-
245+
246246 func decode( _ type: UInt8 . Type ) throws -> UInt8 {
247247 try integer ( type)
248248 }
249-
249+
250250 func decode( _ type: UInt16 . Type ) throws -> UInt16 {
251251 try integer ( type)
252252 }
253-
253+
254254 func decode( _ type: UInt32 . Type ) throws -> UInt32 {
255255 try integer ( type)
256256 }
257257
258258 func decode( _ type: UInt64 . Type ) throws -> UInt64 {
259259 try integer ( type)
260260 }
261-
261+
262262 func decode< T> ( _ type: T . Type ) throws -> T where T: Decodable {
263263 // TODO: Data
264264 let decoder = _StatementDecoder ( context: context, codingPath: codingPath)
@@ -271,7 +271,7 @@ extension _StatementDecoder {
271271 throw DecodingError . valueNotFound ( type, codingPath: codingPath)
272272 }
273273 guard let number = type. init ( exactly: value) else {
274- throw DecodingError . numberNotFit ( type, value: value. description, codingPath : codingPath)
274+ throw DecodingError . numberNotFit ( type, value: value. description, path : codingPath)
275275 }
276276 return number
277277 }
@@ -284,8 +284,8 @@ extension DecodingError {
284284 return DecodingError . valueNotFound ( type, context)
285285 }
286286
287- fileprivate static func numberNotFit( _ type: Any . Type , value: String , codingPath : [ any CodingKey ] ) -> DecodingError {
288- dataCorrupted ( codingPath: codingPath , " Parsed JSON number < \( value) > does not fit in \( type) . " )
287+ fileprivate static func numberNotFit( _ type: Any . Type , value: String , path : [ any CodingKey ] ) -> DecodingError {
288+ dataCorrupted ( codingPath: path , " Parsed JSON number < \( value) > does not fit in \( type) . " )
289289 }
290290
291291 fileprivate static func dataCorrupted( codingPath: [ any CodingKey ] , _ message: String ) -> DecodingError {
0 commit comments