This commit is contained in:
45
server/AyaNova/DataList/DataListFilterComparisonOperator.cs
Normal file
45
server/AyaNova/DataList/DataListFilterComparisonOperator.cs
Normal file
@@ -0,0 +1,45 @@
|
||||
using System.Collections.Generic;
|
||||
namespace AyaNova.DataList
|
||||
{
|
||||
public static class DataListFilterComparisonOperator
|
||||
{
|
||||
//NOTE: no LIKE or NOT LIKE deliberately
|
||||
//StartsWith and EndsWith and Contains and NotContains cover all the most common cases and avoid needing a special set of LIKE characters people have to type and we have to document
|
||||
public const string Equality = "=";
|
||||
public const string GreaterThan = ">";
|
||||
public const string GreaterThanOrEqualTo = ">=";
|
||||
public const string LessThan = "<";
|
||||
public const string LessThanOrEqualTo = "<=";
|
||||
public const string NotEqual = "!=";
|
||||
public const string StartsWith = "%-";
|
||||
public const string EndsWith = "-%";
|
||||
public const string Contains = "-%-";
|
||||
public const string NotContains = "!-%-";
|
||||
|
||||
public static List<string> operators = null;
|
||||
public static List<string> Operators
|
||||
{
|
||||
get
|
||||
{
|
||||
if (operators == null)
|
||||
{
|
||||
operators = new List<string>();
|
||||
operators.Add(Equality);
|
||||
operators.Add(GreaterThan);
|
||||
operators.Add(GreaterThanOrEqualTo);
|
||||
operators.Add(LessThan);
|
||||
operators.Add(LessThanOrEqualTo);
|
||||
operators.Add(NotEqual);
|
||||
operators.Add(StartsWith);
|
||||
operators.Add(EndsWith);
|
||||
operators.Add(Contains);
|
||||
operators.Add(NotContains);
|
||||
|
||||
}
|
||||
return operators;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
69
server/AyaNova/DataList/DataListFilterSpecialTokens.cs
Normal file
69
server/AyaNova/DataList/DataListFilterSpecialTokens.cs
Normal file
@@ -0,0 +1,69 @@
|
||||
namespace AyaNova.DataList
|
||||
{
|
||||
public static class DataListFilterSpecialToken
|
||||
{
|
||||
public const string Null = "{[null]}";
|
||||
public const string Yesterday = "{[yesterday]}";
|
||||
public const string Today = "{[today]}";
|
||||
public const string Tomorrow = "{[tomorrow]}";
|
||||
public const string LastWeek = "{[lastweek]}";
|
||||
public const string ThisWeek = "{[thisweek]}";
|
||||
public const string NextWeek = "{[nextweek]}";
|
||||
public const string LastMonth = "{[lastmonth]}";
|
||||
public const string ThisMonth = "{[thismonth]}";
|
||||
public const string NextMonth = "{[nextmonth]}";
|
||||
public const string FourteenDayWindow = "{[14daywindow]}";
|
||||
public const string Past = "{[past]}";
|
||||
public const string Future = "{[future]}";
|
||||
public const string LastYear = "{[lastyear]}";
|
||||
public const string ThisYear = "{[thisyear]}";
|
||||
public const string InTheLast3Months = "{[last3months]}";
|
||||
public const string InTheLast6Months = "{[last6months]}";
|
||||
public const string InTheLastYear = "{[lastcalendaryear]}";
|
||||
|
||||
//Months THIS year
|
||||
public const string January = "{[january]}";
|
||||
public const string February = "{[february]}";
|
||||
public const string March = "{[march]}";
|
||||
public const string April = "{[april]}";
|
||||
public const string May = "{[may]}";
|
||||
public const string June = "{[june]}";
|
||||
public const string July = "{[july]}";
|
||||
public const string August = "{[august]}";
|
||||
public const string September = "{[september]}";
|
||||
public const string October = "{[october]}";
|
||||
public const string November = "{[november]}";
|
||||
public const string December = "{[december]}";
|
||||
|
||||
//These TEXT filter tokens were more for paging purposes than anything else
|
||||
//however paging is done by numeric range now so will not implement for now
|
||||
// public const string AH = "{[ah]}";
|
||||
// public const string IP = "{[ip]}";
|
||||
// public const string QZ = "{[qz]}";
|
||||
// public const string ZeroToThree = "{[03]}";
|
||||
// public const string FourToSix = "{[46]}";
|
||||
// public const string SevenToNine = "{[79]}";
|
||||
|
||||
|
||||
//Don't think I need these
|
||||
//public const string LessThanZero = "{[<0]}";
|
||||
// public const string Zero = "{[0]}";
|
||||
//public const string GreaterThanZero = "{[>0]}";
|
||||
|
||||
//https://www.klipfolio.com/resources/articles/kpi-timeframe-comparison-metrics
|
||||
|
||||
//More business time frames
|
||||
|
||||
public const string YearToDate = "{[yeartodate]}";
|
||||
|
||||
public const string Past90Days = "{[past90days]}";
|
||||
public const string Past30Days = "{[past30days]}";
|
||||
public const string Past24Hours = "{[past24hours]}";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user