Skip to content

Commit

Permalink
Removing unused BatchCommand.DefaultBuilderCapacity (#584)
Browse files Browse the repository at this point in the history
  • Loading branch information
Piedone authored Aug 20, 2024
1 parent 1ff3fd3 commit aa058f4
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/YesSql.Core/Commands/BatchCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ namespace YesSql.Commands
{
public class BatchCommand : IIndexCommand
{
[Obsolete("The field is not used anymore since the current batching implementation doesn't need it.")]
public static int DefaultBuilderCapacity = 10 * 1024;

public List<string> Queries { get; set; } = new List<string>();
Expand Down Expand Up @@ -54,14 +55,6 @@ public async Task ExecuteAsync(DbConnection connection, DbTransaction transactio
logger.LogTrace(command);
}

if (command.Length > DefaultBuilderCapacity)
{
if (logger.IsEnabled(LogLevel.Warning))
{
logger.LogWarning("The default capacity of the BatchCommand StringBuilder {Default} might not be sufficient. It can be increased with BatchCommand.DefaultBuilderCapacity to at least {Suggested}", DefaultBuilderCapacity, command.Length);
}
}

Command.Transaction = transaction;
Command.CommandText = command;

Expand Down

0 comments on commit aa058f4

Please sign in to comment.