From c5ba23a15c360eada010553c39809d8dbf26ba1e Mon Sep 17 00:00:00 2001 From: Ronald Barendse Date: Wed, 13 Oct 2021 13:32:30 +0200 Subject: [PATCH] Add Constants.Sql.MaxParameterCount --- src/Umbraco.Core/Constants-Sql.cs | 17 +++++++++++++++++ src/Umbraco.Core/Umbraco.Core.csproj | 3 ++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 src/Umbraco.Core/Constants-Sql.cs diff --git a/src/Umbraco.Core/Constants-Sql.cs b/src/Umbraco.Core/Constants-Sql.cs new file mode 100644 index 0000000000..366dfbe44a --- /dev/null +++ b/src/Umbraco.Core/Constants-Sql.cs @@ -0,0 +1,17 @@ +namespace Umbraco.Core +{ + public static partial class Constants + { + public static class Sql + { + /// + /// The maximum amount of parameters that can be used in a query. + /// + /// + /// The actual limit is 2100 (https://docs.microsoft.com/en-us/sql/sql-server/maximum-capacity-specifications-for-sql-server), + /// but we want to ensure there's room for additional parameters if this value is used to create groups/batches. + /// + public const int MaxParameterCount = 2000; + } + } +} diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index 77eeaaa853..e2679c2223 100755 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -132,6 +132,7 @@ + @@ -1665,4 +1666,4 @@ - + \ No newline at end of file