From aa058f436d1655abc411f7f159f8caea554d2b36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Leh=C3=B3czky?= Date: Tue, 20 Aug 2024 21:00:40 +0200 Subject: [PATCH] Removing unused BatchCommand.DefaultBuilderCapacity (#584) --- src/YesSql.Core/Commands/BatchCommand.cs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/YesSql.Core/Commands/BatchCommand.cs b/src/YesSql.Core/Commands/BatchCommand.cs index 53eec3db..0a5b23a9 100644 --- a/src/YesSql.Core/Commands/BatchCommand.cs +++ b/src/YesSql.Core/Commands/BatchCommand.cs @@ -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 Queries { get; set; } = new List(); @@ -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;