Beispiel #1
0
        SqlInfo CheckExpression(SqlInfo expression)
        {
            if (expression.Sql is SelectQuery.SearchCondition)
            {
                expression.Sql = Builder.Convert(
                    this,
                    new SqlFunction(typeof(bool), "CASE", expression.Sql, new SqlValue(true), new SqlValue(false)));
            }

            return(expression);
        }
Beispiel #2
0
        void SetInfo(SqlInfo info)
        {
            info.Query = SelectQuery;

            if (info.Sql == SelectQuery)
            {
                info.Index = SelectQuery.Select.Columns.Count - 1;
            }
            else
            {
                info.Index = SelectQuery.Select.Add(info.Sql);
            }
        }
Beispiel #3
0
 public bool CompareLastMember(SqlInfo info)
 {
     return
         (Members.Count > 0 && info.Members.Count > 0 &&
          Members[Members.Count - 1].EqualsTo(info.Members[info.Members.Count - 1]));
 }
Beispiel #4
0
 public bool CompareMembers(SqlInfo info)
 {
     return(Members.Count == info.Members.Count && !Members.Where((t, i) => !t.EqualsTo(info.Members[i])).Any());
 }