Skip to content

Commit c5ba23a

Browse files
Add Constants.Sql.MaxParameterCount
1 parent d02440d commit c5ba23a

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

src/Umbraco.Core/Constants-Sql.cs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
namespace Umbraco.Core
2+
{
3+
public static partial class Constants
4+
{
5+
public static class Sql
6+
{
7+
/// <summary>
8+
/// The maximum amount of parameters that can be used in a query.
9+
/// </summary>
10+
/// <remarks>
11+
/// The actual limit is 2100 (https://docs.microsoft.com/en-us/sql/sql-server/maximum-capacity-specifications-for-sql-server),
12+
/// but we want to ensure there's room for additional parameters if this value is used to create groups/batches.
13+
/// </remarks>
14+
public const int MaxParameterCount = 2000;
15+
}
16+
}
17+
}

src/Umbraco.Core/Umbraco.Core.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@
132132
<Compile Include="Configuration\ICoreDebug.cs" />
133133
<Compile Include="Constants-CharArrays.cs" />
134134
<Compile Include="Collections\EventClearingObservableCollection.cs" />
135+
<Compile Include="Constants-Sql.cs" />
135136
<Compile Include="Constants-SqlTemplates.cs" />
136137
<Compile Include="Events\UnattendedInstallEventArgs.cs" />
137138
<Compile Include="Logging\ILogger2.cs" />
@@ -1665,4 +1666,4 @@
16651666
<Folder Include="Auditing\" />
16661667
</ItemGroup>
16671668
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
1668-
</Project>
1669+
</Project>

0 commit comments

Comments
 (0)