@@ -37,7 +37,7 @@ extension Table {
3737 or conflictResolution: ConflictResolution ? = nil ,
3838 set updates: ( inout Updates < Self > ) -> Void
3939 ) -> UpdateOf < Self > {
40- Update ( conflictResolution: conflictResolution, updates: Updates ( updates) )
40+ Update ( isEmpty : false , conflictResolution: conflictResolution, updates: Updates ( updates) )
4141 }
4242}
4343
@@ -91,11 +91,11 @@ extension PrimaryKeyedTable {
9191///
9292/// To learn more, see <doc:UpdateStatements>.
9393public struct Update < From: Table , Returning> {
94+ var isEmpty : Bool
9495 var conflictResolution : ConflictResolution ?
9596 var updates : Updates < From >
9697 var `where` : [ QueryFragment ] = [ ]
9798 var returning : [ QueryFragment ] = [ ]
98- var isEmpty = false
9999
100100 /// Adds a condition to an update statement.
101101 ///
@@ -160,6 +160,7 @@ public struct Update<From: Table, Returning> {
160160 returning. append ( " \( quote: resultColumn. name) " )
161161 }
162162 return Update < From , ( repeat each QueryValue ) > (
163+ isEmpty: false ,
163164 conflictResolution: conflictResolution,
164165 updates: updates,
165166 where: `where`,
@@ -181,6 +182,7 @@ public struct Update<From: Table, Returning> {
181182 returning. append ( " \( quote: resultColumn. name) " )
182183 }
183184 return Update < From , From > (
185+ isEmpty: isEmpty,
184186 conflictResolution: conflictResolution,
185187 updates: updates,
186188 where: `where`,
0 commit comments