@@ -49,7 +49,7 @@ class QueryIntegrationTests: SQLiteTestCase {
4949 let names = [ " a " , " b " , " c " ]
5050 try insertUsers ( names)
5151
52- let emails = try db. prepare ( " select email from users " , [ ] ) . compactMap { try ? $0. getValue ( 0 ) as String }
52+ let emails = try db. prepare ( " select email from users " , [ ] ) . compactMap { try ? $0. getValue ( 0 ) as String }
5353
5454 XCTAssertEqual ( names. map ( { " \( $0) @example.com " } ) , emails. sorted ( ) )
5555 }
@@ -213,7 +213,7 @@ class QueryIntegrationTests: SQLiteTestCase {
213213 let query1 = users. filter ( email == " alice@example.com " )
214214 let query2 = users. filter ( email == " sally@example.com " )
215215
216- let actualIDs : [ _ ] = try db. prepare ( query1. union ( query2) ) . map { $0 [ self . id] }
216+ let actualIDs : [ _ ] = try db. prepare ( query1. union ( query2) ) . map { $0 [ self . id] }
217217 XCTAssertEqual ( expectedIDs, actualIDs)
218218
219219 let query3 = users. select ( users [ * ] , SQLite . Expression< Int> ( literal: " 1 AS weight " ) ) . filter ( email == " sally@example.com " )
@@ -226,7 +226,7 @@ class QueryIntegrationTests: SQLiteTestCase {
226226 SELECT " users " .*, 2 AS weight FROM " users " WHERE ( " email " = 'alice@example.com') ORDER BY weight
227227 """ )
228228
229- let orderedIDs : [ _ ] = try db. prepare ( query3. union ( query4) . order ( SQLite . Expression< Int> ( literal: " weight " ) , email) ) . map { $0 [ self . id] }
229+ let orderedIDs : [ _ ] = try db. prepare ( query3. union ( query4) . order ( SQLite . Expression< Int> ( literal: " weight " ) , email) ) . map { $0 [ self . id] }
230230 XCTAssertEqual ( expectedIDs. reversed ( ) , orderedIDs)
231231 }
232232
@@ -272,8 +272,8 @@ class QueryIntegrationTests: SQLiteTestCase {
272272 // https://github.com/stephencelis/SQLite.swift/issues/285
273273 func test_order_by_random( ) throws {
274274 try insertUsers ( [ " a " , " b " , " c' " ] )
275- let result : [ _ ] = try db. prepare ( users. select ( email) . order ( SQLite . Expression< Int> . random( ) ) . limit ( 1 ) )
276- XCTAssertEqual ( 1 , result. count)
275+ let result : [ _ ] = try db. prepare ( users. select ( email) . order ( SQLite . Expression< Int> . random( ) ) . limit ( 1 ) )
276+ XCTAssertEqual ( 1 , result. count)
277277 }
278278
279279 func test_with_recursive( ) throws {
@@ -373,7 +373,7 @@ class QueryIntegrationTests: SQLiteTestCase {
373373 try insertUser ( " Billy " )
374374
375375 let cumeDist = cumeDist ( email)
376- let results : [ _ ] = try db. prepare ( users. select ( id, cumeDist) ) . map {
376+ let results : [ _ ] = try db. prepare ( users. select ( id, cumeDist) ) . map {
377377 $0 [ cumeDist]
378378 }
379379 XCTAssertEqual ( [ 0.25 , 0.5 , 0.75 , 1 ] , results)
@@ -445,27 +445,27 @@ class QueryIntegrationTests: SQLiteTestCase {
445445 XCTAssertEqual ( row [ nthValue] , " Billy@example.com " )
446446 }
447447
448- func test_codable_cast( ) throws {
449- let table = Table ( " test_codable_cast " )
450- try db. run (
451- table. create {
452- $0. column ( SQLite . Expression< String?> ( " int " ) )
453- $0. column ( SQLite . Expression< String?> ( " string " ) )
454- $0. column ( SQLite . Expression< String?> ( " bool " ) )
455- $0. column ( SQLite . Expression< String?> ( " float " ) )
456- $0. column ( SQLite . Expression< String?> ( " double " ) )
457- $0. column ( SQLite . Expression< String?> ( " date " ) )
458- $0. column ( SQLite . Expression< String?> ( " uuid " ) )
459- $0. column ( SQLite . Expression< String?> ( " optional " ) )
460- $0. column ( SQLite . Expression< String?> ( " sub " ) )
461- } )
462- let value = TestCodable ( int: 1 , string: " 2 " , bool: true , float: 3 , double: 4 ,
463- date: Date ( timeIntervalSince1970: 0 ) , uuid: testUUIDValue, optional: nil , sub: nil )
464- try db. run ( table. insert ( value) )
465-
466- let fetchValue : TestCodable = try db. prepare ( table) . map { try $0. decode ( ) } [ 0 ]
467- XCTAssertEqual ( fetchValue, value)
468- }
448+ func test_codable_cast( ) throws {
449+ let table = Table ( " test_codable_cast " )
450+ try db. run (
451+ table. create {
452+ $0. column ( SQLite . Expression< String?> ( " int " ) )
453+ $0. column ( SQLite . Expression< String?> ( " string " ) )
454+ $0. column ( SQLite . Expression< String?> ( " bool " ) )
455+ $0. column ( SQLite . Expression< String?> ( " float " ) )
456+ $0. column ( SQLite . Expression< String?> ( " double " ) )
457+ $0. column ( SQLite . Expression< String?> ( " date " ) )
458+ $0. column ( SQLite . Expression< String?> ( " uuid " ) )
459+ $0. column ( SQLite . Expression< String?> ( " optional " ) )
460+ $0. column ( SQLite . Expression< String?> ( " sub " ) )
461+ } )
462+ let value = TestCodable ( int: 1 , string: " 2 " , bool: true , float: 3 , double: 4 ,
463+ date: Date ( timeIntervalSince1970: 0 ) , uuid: testUUIDValue, optional: nil , sub: nil )
464+ try db. run ( table. insert ( value) )
465+
466+ let fetchValue : TestCodable = try db. prepare ( table) . map { try $0. decode ( ) } [ 0 ]
467+ XCTAssertEqual ( fetchValue, value)
468+ }
469469}
470470
471471extension Connection {
0 commit comments