using System.Collections.Generic;
namespace Sockeye.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;
            }
        }
    }
}
