Пример #1
0
 public override string GetBooleanSqlQuery()
 {
     return(GetStringComparison() == StringComparison.CurrentCultureIgnoreCase
         ? "LOWER(" + LeftValue.GetStringSqlQuery() + ") LIKE LOWER('%" +
            RightValue.GetStringSqlQuery().Unwrap() + "') escape '\\'"
         : LeftValue.GetStringSqlQuery() + " LIKE '%" + RightValue.GetStringSqlQuery().Unwrap() +
            "' escape '\\'");
 }
Пример #2
0
        public override string GetBooleanSqlQuery()
        {
            if (CompareAsString())
            {
                return(GetStringComparison() == StringComparison.CurrentCultureIgnoreCase
                    ? "LOWER(" + LeftValue.GetStringSqlQuery() + ") LIKE LOWER('%" +
                       RightValue.GetStringSqlQuery().Unwrap() + "%') escape '\\'"
                    : LeftValue.GetStringSqlQuery() + " LIKE '%" + RightValue.GetStringSqlQuery().Unwrap() +
                       "%' escape '\\'");
            }
            var lq = LeftValue.GetSetSqlQuery();

            if (RightValue.SupportedTypes.Contains(FilterExpressionType.Numeric))
            {
                return(RightValue.GetNumericSqlQuery() + " IN " + lq);
            }
            var rq = RightValue.GetSetSqlQuery();

            // check intersection
            return("exists (" + lq.Unparenthesis() + " intersect " + rq.Unparenthesis() + ")");
        }
Пример #3
0
 public override string GetStringSqlQuery()
 {
     return(LeftValue.GetStringSqlQuery() + " || " + RightValue.GetStringSqlQuery());
 }
Пример #4
0
 public override string GetBooleanSqlQuery()
 {
     return(LeftValue.GetStringSqlQuery() + " REGEXP " + RightValue.GetStringSqlQuery());
 }