Пример #1
0
        public override int Visit(SqlWhereClause sqlWhereClause)
        {
            int hashCode = SqlWhereClauseHashCode;

            hashCode = CombineHashes(hashCode, sqlWhereClause.FilterExpression.Accept(this));
            return(hashCode);
        }
Пример #2
0
 public static SqlQuery Create(
     SqlSelectClause selectClause,
     SqlFromClause fromClause,
     SqlWhereClause whereClause,
     SqlOrderbyClause orderbyClause,
     SqlOffsetLimitClause offsetLimitClause)
 {
     return(new SqlQuery(selectClause, fromClause, whereClause, orderbyClause, offsetLimitClause));
 }
Пример #3
0
 public static SqlQuery Create(
     SqlSelectClause selectClause,
     SqlFromClause fromClause,
     SqlWhereClause whereClause,
     SqlGroupByClause groupByClause,
     SqlOrderbyClause orderByClause,
     SqlOffsetLimitClause offsetLimitClause) => new SqlQuery(
     selectClause,
     fromClause,
     whereClause,
     groupByClause,
     orderByClause,
     offsetLimitClause);
Пример #4
0
 private SqlQuery(
     SqlSelectClause selectClause,
     SqlFromClause fromClause,
     SqlWhereClause whereClause,
     SqlGroupByClause groupByClause,
     SqlOrderbyClause orderbyClause,
     SqlOffsetLimitClause offsetLimitClause)
 {
     this.SelectClause      = selectClause ?? throw new ArgumentNullException(nameof(selectClause));
     this.FromClause        = fromClause;
     this.WhereClause       = whereClause;
     this.GroupByClause     = groupByClause;
     this.OrderbyClause     = orderbyClause;
     this.OffsetLimitClause = offsetLimitClause;
 }
Пример #5
0
        protected SqlQuery(
            SqlSelectClause selectClause,
            SqlFromClause fromClause,
            SqlWhereClause whereClause,
            SqlOrderbyClause orderbyClause,
            SqlOffsetLimitClause offsetLimitClause)
            : base(SqlObjectKind.Query)
        {
            if (selectClause == null)
            {
                throw new ArgumentNullException($"{nameof(selectClause)} must not be null.");
            }

            this.SelectClause      = selectClause;
            this.FromClause        = fromClause;
            this.WhereClause       = whereClause;
            this.OrderbyClause     = orderbyClause;
            this.OffsetLimitClause = offsetLimitClause;
        }
 public override SqlObject Visit(SqlWhereClause sqlWhereClause)
 {
     return(SqlWhereClause.Create(sqlWhereClause.FilterExpression.Accept(this) as SqlScalarExpression));
 }
 public override void Visit(SqlWhereClause sqlWhereClause)
 {
     this.writer.Write("WHERE ");
     sqlWhereClause.FilterExpression.Accept(this);
 }