public override void Visit(SqlSelectClause sqlSelectClause) { this.writer.Write("SELECT "); if (sqlSelectClause.HasDistinct) { this.writer.Write("DISTINCT "); } if (sqlSelectClause.TopSpec != null) { sqlSelectClause.TopSpec.Accept(this); this.writer.Write(" "); } sqlSelectClause.SelectSpec.Accept(this); }
public override int Visit(SqlSelectClause sqlSelectClause) { int hashCode = SqlSelectClauseHashCode; if (sqlSelectClause.HasDistinct) { hashCode = CombineHashes(hashCode, SqlSelectClauseDistinctHashCode); } if (sqlSelectClause.TopSpec != null) { hashCode = CombineHashes(hashCode, sqlSelectClause.TopSpec.Accept(this)); } hashCode = CombineHashes(hashCode, sqlSelectClause.SelectSpec.Accept(this)); return(hashCode); }
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; }