public static SqlQuery Create( SqlSelectClause selectClause, SqlFromClause fromClause, SqlWhereClause whereClause, SqlOrderbyClause orderbyClause, SqlOffsetLimitClause offsetLimitClause) { return(new SqlQuery(selectClause, fromClause, whereClause, orderbyClause, offsetLimitClause)); }
public override SqlObject Visit(SqlOrderbyClause sqlOrderByClause) { SqlOrderByItem[] items = new SqlOrderByItem[sqlOrderByClause.OrderbyItems.Count]; for (int i = 0; i < sqlOrderByClause.OrderbyItems.Count; i++) { items[i] = sqlOrderByClause.OrderbyItems[i].Accept(this) as SqlOrderByItem; } return(SqlOrderbyClause.Create(items)); }
public override void Visit(SqlOrderbyClause sqlOrderByClause) { this.writer.Write("ORDER BY "); sqlOrderByClause.OrderbyItems[0].Accept(this); for (int i = 1; i < sqlOrderByClause.OrderbyItems.Count; i++) { this.writer.Write(", "); sqlOrderByClause.OrderbyItems[i].Accept(this); } }
public override int Visit(SqlOrderbyClause sqlOrderByClause) { int hashCode = SqlOrderbyClauseHashCode; for (int i = 0; i < sqlOrderByClause.OrderbyItems.Count; i++) { hashCode = CombineHashes(hashCode, sqlOrderByClause.OrderbyItems[i].Accept(this)); } return(hashCode); }
public static SqlQuery Create( SqlSelectClause selectClause, SqlFromClause fromClause, SqlWhereClause whereClause, SqlGroupByClause groupByClause, SqlOrderbyClause orderByClause, SqlOffsetLimitClause offsetLimitClause) => new SqlQuery( selectClause, fromClause, whereClause, groupByClause, orderByClause, offsetLimitClause);
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; }
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; }