Skip to content

Commit f61f402

Browse files
committed
wip
1 parent e27747c commit f61f402

5 files changed

Lines changed: 12 additions & 30 deletions

File tree

Package.resolved

Lines changed: 3 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Tests/SQLiteDataTests/AssertQueryTests.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ struct AssertQueryTests {
2929
@available(iOS 17, macOS 14, tvOS 17, watchOS 10, *)
3030
@Test func assertQueryRecord() throws {
3131
assertQuery(
32-
Record.where { $0.id == 1 }
32+
Record.find(1)
3333
) {
3434
"""
3535
┌────────────────────────────────────────┐
@@ -46,7 +46,7 @@ struct AssertQueryTests {
4646
@Test func assertQueryBasicUpdate() throws {
4747
assertQuery(
4848
Record.all
49-
.update { $0.date = Date(timeIntervalSince1970: 45) }
49+
.update { $0.date = #bind(Date(timeIntervalSince1970: 45)) }
5050
.returning { ($0.id, $0.date) }
5151
) {
5252
"""
@@ -63,8 +63,8 @@ struct AssertQueryTests {
6363
@Test func assertQueryRecordUpdate() throws {
6464
assertQuery(
6565
Record
66-
.where { $0.id == 1 }
67-
.update { $0.date = Date(timeIntervalSince1970: 45) }
66+
.where { $0.id.eq(1) }
67+
.update { $0.date = #bind(Date(timeIntervalSince1970: 45)) }
6868
.returning(\.self)
6969
) {
7070
"""
@@ -81,7 +81,7 @@ struct AssertQueryTests {
8181
@available(iOS 17, macOS 14, tvOS 17, watchOS 10, *)
8282
@Test func assertQueryEmpty() throws {
8383
assertQuery(
84-
Record.all.where { $0.id == -1 }.select(\.id)
84+
Record.all.where { $0.id.eq(-1) }.select(\.id)
8585
) {
8686
"""
8787
(No results)
@@ -131,7 +131,7 @@ struct AssertQueryTests {
131131
@Test func assertQueryRecordIncludeSQL() throws {
132132
assertQuery(
133133
includeSQL: true,
134-
Record.where { $0.id == 1 }
134+
Record.where { $0.id.eq(1) }
135135
) {
136136
"""
137137
SELECT "records"."id", "records"."date"

Tests/SQLiteDataTests/CloudKitTests/AssetsTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
try await userDatabase.userWrite { db in
7373
try RemindersListAsset
7474
.find(1)
75-
.update { $0.coverImage = Data("new-image".utf8) }
75+
.update { $0.coverImage = #bind(Data("new-image".utf8)) }
7676
.execute(db)
7777
}
7878
}

Tests/SQLiteDataTests/CloudKitTests/MergeConflictTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@
666666
$0.currentTime.now += 1
667667
} operation: {
668668
try await userDatabase.userWrite { db in
669-
try Reminder.find(1).update { $0.priority = 3 }.execute(db)
669+
try Reminder.find(1).update { $0.priority = #bind(3) }.execute(db)
670670
}
671671
await modificationsFinished.notify()
672672
try await syncEngine.processPendingRecordZoneChanges(scope: .private)

Tests/SQLiteDataTests/CloudKitTests/ReferenceViolationTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@
266266
$0.currentTime.now += 1
267267
} operation: {
268268
try await userDatabase.userWrite { db in
269-
try ChildWithOnDeleteSetNull.find(1).update { $0.parentID = 2 }.execute(db)
269+
try ChildWithOnDeleteSetNull.find(1).update { $0.parentID = #bind(2) }.execute(db)
270270
}
271271
}
272272
try await withDependencies {

0 commit comments

Comments
 (0)