@@ -63,14 +63,14 @@ public override ResultSetMapping AppendInsertReturningOperation(
6363 AppendInsertCommandHeader ( commandStringBuilder , name , schema , writeOperations ) ;
6464 AppendValuesHeader ( commandStringBuilder , writeOperations ) ;
6565 AppendValues ( commandStringBuilder , name , schema , writeOperations ) ;
66-
66+
6767 // RETURNING is not supported by MySQL. MariaDB supports INSERT/DELETE RETURNING but not UPDATE RETURNING,
6868 // so we disable it for both databases to ensure consistent behavior across all DML operations.
6969 if ( _options . ServerVersion . Supports . Returning && readOperations . Count > 0 )
7070 {
7171 AppendReturningClause ( commandStringBuilder , readOperations ) ;
7272 }
73-
73+
7474 commandStringBuilder . AppendLine ( SqlGenerationHelper . StatementTerminator ) ;
7575
7676 requiresTransaction = false ;
@@ -183,17 +183,17 @@ public override ResultSetMapping AppendUpdateOperation(
183183 int commandPosition ,
184184 out bool requiresTransaction )
185185 {
186- var startLength = commandStringBuilder . Length ;
186+ // var startLength = commandStringBuilder.Length;
187187 var result = _options . ServerVersion . Supports . Returning
188188 ? AppendUpdateReturningOperation ( commandStringBuilder , command , commandPosition , out requiresTransaction )
189189 : base . AppendUpdateOperation ( commandStringBuilder , command , commandPosition , out requiresTransaction ) ;
190-
190+
191191 // Debug: Log the generated SQL
192- var generatedSql = commandStringBuilder . ToString ( startLength , commandStringBuilder . Length - startLength ) ;
193- Console . WriteLine ( $ "[DEBUG SQL Generated] AppendUpdateOperation:") ;
194- Console . WriteLine ( generatedSql ) ;
195- Console . WriteLine ( $ "[DEBUG SQL Generated] Table: { command . TableName } , Columns: { command . ColumnModifications . Count } ") ;
196-
192+ // var generatedSql = commandStringBuilder.ToString(startLength, commandStringBuilder.Length - startLength);
193+ // Console.WriteLine($"[DEBUG SQL Generated] AppendUpdateOperation:");
194+ // Console.WriteLine(generatedSql);
195+ // Console.WriteLine($"[DEBUG SQL Generated] Table: {command.TableName}, Columns: {command.ColumnModifications.Count}");
196+
197197 return result ;
198198 }
199199
@@ -226,14 +226,14 @@ protected override ResultSetMapping AppendUpdateReturningOperation(
226226
227227 AppendUpdateCommandHeader ( commandStringBuilder , name , schema , writeOperations ) ;
228228 AppendWhereClause ( commandStringBuilder , conditionOperations ) ;
229-
229+
230230 // RETURNING is not supported by MySQL. MariaDB supports INSERT/DELETE RETURNING but not UPDATE RETURNING,
231231 // so we disable it for both databases to ensure consistent behavior across all DML operations.
232232 if ( _options . ServerVersion . Supports . Returning )
233233 {
234234 AppendReturningClause ( commandStringBuilder , readOperations , anyReadOperations ? null : "1" ) ;
235235 }
236-
236+
237237 commandStringBuilder . AppendLine ( SqlGenerationHelper . StatementTerminator ) ;
238238
239239 return anyReadOperations
@@ -272,14 +272,14 @@ protected override ResultSetMapping AppendDeleteReturningOperation(
272272
273273 AppendDeleteCommandHeader ( commandStringBuilder , name , schema ) ;
274274 AppendWhereClause ( commandStringBuilder , conditionOperations ) ;
275-
275+
276276 // RETURNING is not supported by MySQL. MariaDB supports INSERT/DELETE RETURNING but not UPDATE RETURNING,
277277 // so we disable it for both databases to ensure consistent behavior across all DML operations.
278278 if ( _options . ServerVersion . Supports . Returning )
279279 {
280280 AppendReturningClause ( commandStringBuilder , [ ] , "1" ) ;
281281 }
282-
282+
283283 commandStringBuilder . AppendLine ( SqlGenerationHelper . StatementTerminator ) ;
284284
285285 return ResultSetMapping . LastInResultSet | ResultSetMapping . ResultSetWithRowsAffectedOnly ;
0 commit comments