public static WhereClip operator <=(object left, ExpressionClip right)
        {
            WhereClip where = new WhereClip();
            if (left == null || left == DBNull.Value)
            {
                where = ExpressionFactory.AppendWhereAnd(where, right, QueryOperator.GreaterOrEqual, null);
            }
            else
            {
                ExpressionFactory.AppendWhereAnd(where, ExpressionFactory.CreateParameterExpression(right.DbType, left),
                                                 QueryOperator.LessOrEqual, right);
            }

            return(where);
        }
        public static WhereClip operator >=(ExpressionClip left, object right)
        {
            WhereClip where = new WhereClip();
            if (right == null || right == DBNull.Value)
            {
                ExpressionFactory.AppendWhereAnd(where, left, QueryOperator.GreaterOrEqual, null);
            }
            else
            {
                ExpressionFactory.AppendWhereAnd(where, left, QueryOperator.GreaterOrEqual,
                                                 ExpressionFactory.CreateParameterExpression(left.DbType, right));
            }

            return(where);
        }
        public static WhereClip operator <=(ExpressionClip left, ExpressionClip right)
        {
            WhereClip where = new WhereClip();
            if (ExpressionClip.IsNullOrEmpty(right))
            {
                where = ExpressionFactory.AppendWhereAnd(where, left, QueryOperator.LessOrEqual, null);
            }
            else if (ExpressionClip.IsNullOrEmpty(left))
            {
                where = ExpressionFactory.AppendWhereAnd(where, right, QueryOperator.GreaterOrEqual, null);
            }
            else
            {
                ExpressionFactory.AppendWhereAnd(where, left, QueryOperator.LessOrEqual, right);
            }

            return(where);
        }
        public WhereClip EndsWith(string suffix)
        {
            Check.Require(!string.IsNullOrEmpty(suffix), "suffix could not be null or empty!");

            return(ExpressionFactory.AppendWhereAnd(new WhereClip(), this, QueryOperator.Like, ExpressionFactory.CreateParameterExpression(this.dbType, '%' + suffix.Replace("%", "[%]").Replace("_", "[_]"))));
        }
        public WhereClip Like(string right)
        {
            Check.Require(right != null, "right could not be null.");

            return(ExpressionFactory.AppendWhereAnd(new WhereClip(), this, Rock.Orm.Common.QueryOperator.Like, ExpressionFactory.CreateParameterExpression(this.DbType, right)));
        }