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

            return(expression);
        }
示例#2
0
        private void SetInfo(SqlInfo info)
        {
            info.Query = Select;

            if (info.Sql == Select)
            {
                info.Index = Select.Select.Columns.Count - 1;
            }
            else
            {
                info.Index = Select.Select.Add(info.Sql);
            }
        }
示例#3
0
文件: SqlInfo.cs 项目: forki/bars2db
 public bool CompareLastMember(SqlInfo info)
 {
     return
         (Members.Count > 0 && info.Members.Count > 0 &&
          Members[Members.Count - 1].EqualsTo(info.Members[info.Members.Count - 1]));
 }
示例#4
0
文件: SqlInfo.cs 项目: forki/bars2db
 public bool CompareMembers(SqlInfo info)
 {
     return(Members.Count == info.Members.Count && !Members.Where((t, i) => !t.EqualsTo(info.Members[i])).Any());
 }