Skip to content

Commit

Permalink
Remove unused method
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Johnson committed Nov 19, 2024
1 parent 9c68393 commit 2ec303a
Showing 1 changed file with 0 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1132,27 +1132,6 @@ private void HandleTableKindSortWithFilter(SearchParamTableExpression searchPara
_sortVisited = true;
}

private void WriteIncludeLimitCte(string cteToLimit, SearchOptions context)
{
StringBuilder.Append(TableExpressionName(++_tableExpressionCounter)).AppendLine(" AS").AppendLine("(");

// the related cte is a reverse include, limit the number of returned items and count to
// see if we are over the threshold (to produce a warning to the client)
StringBuilder.Append("SELECT DISTINCT ");
StringBuilder.Append("TOP (").Append(Parameters.AddParameter(context.IncludeCount, true)).Append(") ");

StringBuilder.Append("T1, Sid1, IsMatch, ");
StringBuilder.Append("CASE WHEN count_big(*) over() > ")
.Append(Parameters.AddParameter(context.IncludeCount, true))
.AppendLine(" THEN 1 ELSE 0 END AS IsPartial ");

StringBuilder.Append("FROM ").AppendLine(cteToLimit);
StringBuilder.AppendLine(")").Append(",");

// the 'original' include cte is not in the union, but this new layer is instead
_includeCteIds.Add(TableExpressionName(_tableExpressionCounter));
}

private SearchParameterQueryGeneratorContext GetContext(string tableAlias = null)
{
return new SearchParameterQueryGeneratorContext(StringBuilder, Parameters, Model, _schemaInfo, tableAlias);
Expand Down

0 comments on commit 2ec303a

Please sign in to comment.