@@ -166,9 +166,7 @@ public string CreateFunction(
166
166
}
167
167
168
168
private string ? _succeedFunctionSql ;
169
- public string SucceedFunction (
170
- StoredId storedId , byte [ ] ? result , long timestamp , int expectedEpoch ,
171
- SqlCommand command , string paramPrefix )
169
+ public StoreCommand SucceedFunction ( StoredId storedId , byte [ ] ? result , long timestamp , int expectedEpoch , string paramPrefix )
172
170
{
173
171
_succeedFunctionSql ??= @$ "
174
172
UPDATE { tablePrefix }
@@ -178,14 +176,15 @@ public string SucceedFunction(
178
176
var sql = paramPrefix == ""
179
177
? _succeedFunctionSql
180
178
: _succeedFunctionSql . Replace ( "@" , $ "@{ paramPrefix } ") ;
181
-
182
- command . Parameters . AddWithValue ( $ "@{ paramPrefix } ResultJson", result ?? SqlBinary . Null ) ;
183
- command . Parameters . AddWithValue ( $ "@{ paramPrefix } Timestamp", timestamp ) ;
184
- command . Parameters . AddWithValue ( $ "@{ paramPrefix } FlowInstance", storedId . Instance . Value ) ;
185
- command . Parameters . AddWithValue ( $ "@{ paramPrefix } FlowType", storedId . Type . Value ) ;
186
- command . Parameters . AddWithValue ( $ "@{ paramPrefix } ExpectedEpoch", expectedEpoch ) ;
187
179
188
- return sql ;
180
+ var command = new StoreCommand ( sql ) ;
181
+ command . AddParameter ( $ "@{ paramPrefix } ResultJson", result ?? SqlBinary . Null ) ;
182
+ command . AddParameter ( $ "@{ paramPrefix } Timestamp", timestamp ) ;
183
+ command . AddParameter ( $ "@{ paramPrefix } FlowInstance", storedId . Instance . Value ) ;
184
+ command . AddParameter ( $ "@{ paramPrefix } FlowType", storedId . Type . Value ) ;
185
+ command . AddParameter ( $ "@{ paramPrefix } ExpectedEpoch", expectedEpoch ) ;
186
+
187
+ return command ;
189
188
}
190
189
191
190
private string ? _postponedFunctionSql ;
0 commit comments