Skip to content

Commit

Permalink
Merge 24.7 to 24.11
Browse files Browse the repository at this point in the history
  • Loading branch information
labkey-teamcity committed Dec 2, 2024
2 parents 0f4b42e + c25ea3b commit fdbe07d
Showing 1 changed file with 2 additions and 31 deletions.
33 changes: 2 additions & 31 deletions api/src/org/labkey/api/data/CompareType.java
Original file line number Diff line number Diff line change
Expand Up @@ -1653,17 +1653,12 @@ private abstract static class DateCompareClause extends CompareClause
@Override
String toWhereClause(SqlDialect dialect, String alias)
{
// See Issue 51472
return dialect.isSqlServer() ?
dialect.getColumnSelectName(alias) + getSqlServerComparison() :
dialect.getColumnSelectName(alias) + _comparison.getSql().replace("?", SS_CAST) :
super.toWhereClause(dialect, alias);
}

// See Issue 51472
protected String getSqlServerComparison()
{
throw new IllegalStateException("Must override either toWhereClause() or getSqlServerComparison()");
}

@Override
protected void appendFilterText(StringBuilder sb, ColumnNameFormatter formatter)
{
Expand Down Expand Up @@ -1776,12 +1771,6 @@ static class DateGtCompareClause extends DateCompareClause
super(fieldKey, DATE_GT, " > ", rawFilterValue, addOneDay(startValue));
}

@Override
protected String getSqlServerComparison()
{
return " > " + SS_CAST;
}

@Override
protected boolean meetsCriteria(ColumnRenderProperties col, Object value)
{
Expand All @@ -1806,12 +1795,6 @@ static class DateGteCompareClause extends DateCompareClause
super(fieldKey, DATE_GTE, " >= ", rawFilterValue, startValue);
}

@Override
protected String getSqlServerComparison()
{
return " >= " + SS_CAST;
}

@Override
protected boolean meetsCriteria(ColumnRenderProperties col, Object value)
{
Expand All @@ -1836,12 +1819,6 @@ static class DateLtCompareClause extends DateCompareClause
super(fieldKey, DATE_LT, " < ", rawFilterValue, startValue);
}

@Override
protected String getSqlServerComparison()
{
return " < " + SS_CAST;
}

@Override
protected boolean meetsCriteria(ColumnRenderProperties col, Object value)
{
Expand All @@ -1866,12 +1843,6 @@ static class DateLteCompareClause extends DateCompareClause
super(fieldKey, DATE_LTE, " <= ", rawFilterValue, addOneDay(startValue));
}

@Override
protected String getSqlServerComparison()
{
return " <= " + SS_CAST;
}

@Override
protected boolean meetsCriteria(ColumnRenderProperties col, Object value)
{
Expand Down

0 comments on commit fdbe07d

Please sign in to comment.