Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 791fc7e

Browse files
committed
Add optional includeParams in ComputeHash
1 parent c2257fc commit 791fc7e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ServiceStack.OrmLite/Expressions/SqlExpression.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ protected virtual SqlExpression<T> CopyTo(SqlExpression<T> to)
121121
/// <summary>
122122
/// Generate a unique SHA1 hash of expression with param values for caching
123123
/// </summary>
124-
public string ComputeHash()
124+
public string ComputeHash(bool includeParams=true)
125125
{
126126
var sb = StringBuilderCache.Allocate();
127127

@@ -169,7 +169,7 @@ public string ComputeHash()
169169
sb.Append(UseSelectPropertiesAsAliases ? "1" : "0");
170170
sb.Append(hasEnsureConditions ? "1" : "0");
171171

172-
if (Params.Count > 0)
172+
if (includeParams && Params.Count > 0)
173173
{
174174
sb.AppendLine("PARAMS=");
175175
for (var i = 0; i < Params.Count; i++)

0 commit comments

Comments
 (0)