From: <aye...@us...> - 2009-05-13 06:36:50
|
Revision: 4287 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4287&view=rev Author: ayenderahien Date: 2009-05-13 06:36:41 +0000 (Wed, 13 May 2009) Log Message: ----------- fixing whitespace issues Modified Paths: -------------- trunk/nhibernate/src/NHibernate/AdoNet/SqlClientBatchingBatcher.cs Modified: trunk/nhibernate/src/NHibernate/AdoNet/SqlClientBatchingBatcher.cs =================================================================== --- trunk/nhibernate/src/NHibernate/AdoNet/SqlClientBatchingBatcher.cs 2009-05-13 05:58:35 UTC (rev 4286) +++ trunk/nhibernate/src/NHibernate/AdoNet/SqlClientBatchingBatcher.cs 2009-05-13 06:36:41 UTC (rev 4287) @@ -33,22 +33,22 @@ totalExpectedRowsAffected += expectation.ExpectedRowCount; IDbCommand batchUpdate = CurrentCommand; - if (log.IsDebugEnabled || Factory.Settings.SqlStatementLogger.IsDebugEnabled) - { - string lineWithParameters = Factory.Settings.SqlStatementLogger.GetCommandLineWithParameters(batchUpdate); - currentBatchCommandsLog.Append("Batch command: ").AppendLine(lineWithParameters); - if (Factory.Settings.SqlStatementLogger.IsDebugEnabled) - { - Factory.Settings.SqlStatementLogger.LogCommand("Adding to batch:", batchUpdate, FormatStyle.Basic); - } - else if (log.IsDebugEnabled) - { - log.Debug("Adding to batch:" + lineWithParameters); - } - currentBatch.Append((System.Data.SqlClient.SqlCommand) batchUpdate); - } - if (currentBatch.CountOfCommands >= batchSize) + if (log.IsDebugEnabled || Factory.Settings.SqlStatementLogger.IsDebugEnabled) { + string lineWithParameters = Factory.Settings.SqlStatementLogger.GetCommandLineWithParameters(batchUpdate); + currentBatchCommandsLog.Append("Batch command: ").AppendLine(lineWithParameters); + if (Factory.Settings.SqlStatementLogger.IsDebugEnabled) + { + Factory.Settings.SqlStatementLogger.LogCommand("Adding to batch:", batchUpdate, FormatStyle.Basic); + } + else if (log.IsDebugEnabled) + { + log.Debug("Adding to batch:" + lineWithParameters); + } + currentBatch.Append((System.Data.SqlClient.SqlCommand)batchUpdate); + } + if (currentBatch.CountOfCommands >= batchSize) + { DoExecuteBatch(batchUpdate); } } @@ -58,15 +58,15 @@ log.Debug("Executing batch"); CheckReaders(); Prepare(currentBatch.BatchCommand); - if (log.IsDebugEnabled || Factory.Settings.SqlStatementLogger.IsDebugEnabled) - { - if (Factory.Settings.SqlStatementLogger.IsDebugEnabled) - Factory.Settings.SqlStatementLogger.LogBatchCommand(currentBatchCommandsLog.ToString()); - else if (log.IsDebugEnabled) - log.Debug(currentBatchCommandsLog.ToString()); - currentBatchCommandsLog = new StringBuilder(); - } - int rowsAffected = currentBatch.ExecuteNonQuery(); + if (log.IsDebugEnabled || Factory.Settings.SqlStatementLogger.IsDebugEnabled) + { + if (Factory.Settings.SqlStatementLogger.IsDebugEnabled) + Factory.Settings.SqlStatementLogger.LogBatchCommand(currentBatchCommandsLog.ToString()); + else if (log.IsDebugEnabled) + log.Debug(currentBatchCommandsLog.ToString()); + currentBatchCommandsLog = new StringBuilder(); + } + int rowsAffected = currentBatch.ExecuteNonQuery(); Expectations.VerifyOutcomeBatched(totalExpectedRowsAffected, rowsAffected); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |