@@ -300,15 +300,14 @@ class QueryTests: XCTestCase {
300
300
let insert = try emails. insert ( value)
301
301
let encodedJSON = try JSONEncoder ( ) . encode ( value1)
302
302
let encodedJSONString = String ( data: encodedJSON, encoding: . utf8) !
303
- // swiftlint:disable line_length
304
303
assertSQL (
305
304
"""
306
305
INSERT INTO \" emails \" ( \" int \" , \" string \" , \" bool \" , \" float \" , \" double \" , \" date \" , \" uuid \" , \" optional \" ,
307
- \" sub \" ) VALUES (1, '2', 1, 3.0, 4.0, '1970-01-01T00:00:00.000', 'E621E1F8-C36C-495A-93FC-0C247A3E6E5F', 'optional', ' \( encodedJSONString) ')
306
+ \" sub \" ) VALUES (1, '2', 1, 3.0, 4.0, '1970-01-01T00:00:00.000', 'E621E1F8-C36C-495A-93FC-0C247A3E6E5F',
307
+ 'optional', ' \( encodedJSONString) ')
308
308
""" . replacingOccurrences ( of: " \n " , with: " " ) ,
309
309
insert
310
310
)
311
- // swiftlint:enable line_length
312
311
}
313
312
#endif
314
313
@@ -354,17 +353,16 @@ class QueryTests: XCTestCase {
354
353
let value = TestCodable ( int: 1 , string: " 2 " , bool: true , float: 3 , double: 4 ,
355
354
date: Date ( timeIntervalSince1970: 0 ) , uuid: testUUIDValue, optional: nil , sub: nil )
356
355
let insert = try emails. upsert ( value, onConflictOf: string)
357
- // swiftlint:disable line_length
358
356
assertSQL (
359
357
"""
360
358
INSERT INTO \" emails \" ( \" int \" , \" string \" , \" bool \" , \" float \" , \" double \" , \" date \" , \" uuid \" )
361
359
VALUES (1, '2', 1, 3.0, 4.0, '1970-01-01T00:00:00.000', 'E621E1F8-C36C-495A-93FC-0C247A3E6E5F') ON CONFLICT ( \" string \" )
362
360
DO UPDATE SET \" int \" = \" excluded \" . \" int \" , \" bool \" = \" excluded \" . \" bool \" ,
363
- \" float \" = \" excluded \" . \" float \" , \" double \" = \" excluded \" . \" double \" , \" date \" = \" excluded \" . \" date \" , \" uuid \" = \" excluded \" . \" uuid \"
361
+ \" float \" = \" excluded \" . \" float \" , \" double \" = \" excluded \" . \" double \" , \" date \" = \" excluded \" . \" date \" ,
362
+ \" uuid \" = \" excluded \" . \" uuid \"
364
363
""" . replacingOccurrences ( of: " \n " , with: " " ) ,
365
364
insert
366
365
)
367
- // swiftlint:enable line_length
368
366
}
369
367
370
368
func test_insert_many_encodable( ) throws {
@@ -376,16 +374,15 @@ class QueryTests: XCTestCase {
376
374
let value3 = TestCodable ( int: 3 , string: " 4 " , bool: true , float: 3 , double: 6 ,
377
375
date: Date ( timeIntervalSince1970: 0 ) , uuid: testUUIDValue, optional: nil , sub: nil )
378
376
let insert = try emails. insertMany ( [ value1, value2, value3] )
379
- // swiftlint:disable line_length
380
377
assertSQL (
381
378
"""
382
379
INSERT INTO \" emails \" ( \" int \" , \" string \" , \" bool \" , \" float \" , \" double \" , \" date \" , \" uuid \" )
383
- VALUES (1, '2', 1, 3.0, 4.0, '1970-01-01T00:00:00.000', 'E621E1F8-C36C-495A-93FC-0C247A3E6E5F'), (2, '3', 1, 3.0, 5.0, '1970-01-01T00:00:00.000', 'E621E1F8-C36C-495A-93FC-0C247A3E6E5F'),
380
+ VALUES (1, '2', 1, 3.0, 4.0, '1970-01-01T00:00:00.000', 'E621E1F8-C36C-495A-93FC-0C247A3E6E5F'),
381
+ (2, '3', 1, 3.0, 5.0, '1970-01-01T00:00:00.000', 'E621E1F8-C36C-495A-93FC-0C247A3E6E5F'),
384
382
(3, '4', 1, 3.0, 6.0, '1970-01-01T00:00:00.000', 'E621E1F8-C36C-495A-93FC-0C247A3E6E5F')
385
383
""" . replacingOccurrences ( of: " \n " , with: " " ) ,
386
384
insert
387
385
)
388
- // swiftlint:enable line_length
389
386
}
390
387
391
388
func test_update_compilesUpdateExpression( ) {
0 commit comments