Skip to content

Commit

Permalink
Adjustments after rebase.
Browse files Browse the repository at this point in the history
  • Loading branch information
gmcelhanon committed Nov 7, 2024
1 parent a9fd754 commit 2f1389c
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@
// The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0.
// See the LICENSE and NOTICES files in the project root for more information.

using EdFi.Ods.Common.Database;
using EdFi.Ods.Common.Database.Querying;
using EdFi.Ods.Common.Models.Queries;

namespace EdFi.Ods.Common.Providers.Queries;

public static class QueryBuilderExtensions
{
private const string ChangeVersion = "ChangeVersion";

public static void ApplyChangeVersionCriteria(this QueryBuilder queryBuilder, IQueryParameters queryParameters)
{
if (queryParameters == null)
Expand All @@ -21,12 +20,12 @@ public static void ApplyChangeVersionCriteria(this QueryBuilder queryBuilder, IQ

if (queryParameters.MinChangeVersion.HasValue)
{
queryBuilder.Where(ChangeVersion, ">=", queryParameters.MinChangeVersion.Value);
queryBuilder.Where(ColumnNames.ChangeVersion, ">=", queryParameters.MinChangeVersion.Value);
}

if (queryParameters.MaxChangeVersion.HasValue)
{
queryBuilder.Where(ChangeVersion, "<=", queryParameters.MaxChangeVersion.Value);
queryBuilder.Where(ColumnNames.ChangeVersion, "<=", queryParameters.MaxChangeVersion.Value);
}
}

Expand Down

0 comments on commit 2f1389c

Please sign in to comment.