public SqlStatementKeywordBase(SqlStatementKeywordBase original) { if (original != null) { CopyFrom(original); } }
protected void CopyFrom(SqlStatementKeywordBase b) { _select.AddRange(b._select); _where.AddRange(b._where); _groupBy.AddRange(b._groupBy); _orderBy.AddRange(b._orderBy); _from.AddRange(b._from); _joins.AddRange(b._joins); }
public OrderByClass(SqlStatementKeywordBase parent, OrderByItem[] orderBy) : base(parent) { _orderBy.AddRange(orderBy); }
public GroupByClass(SqlStatementKeywordBase where, SelectItem[] columns) : base(where) { _groupBy.AddRange(columns); }
/// <summary> /// https://www.sqlshack.com/sql-union-overview-usage-and-examples/ /// </summary> /// <param name="select"></param> /// <returns></returns> public static UnionClass UnionIntersect(this CanUnion left, SqlStatementKeywordBase select) { return(new UnionClass(left, " intersect ", select)); }
}/// <summary> /// https://www.sqlshack.com/sql-union-overview-usage-and-examples/ /// </summary> /// <param name="select"></param> /// <returns></returns> public static UnionClass UnionExcept(this CanUnion left, SqlStatementKeywordBase select) { return(new UnionClass(left, " except ", select)); }
/// <summary> /// https://www.sqlshack.com/sql-union-overview-usage-and-examples/ /// </summary> /// <param name="select"></param> /// <returns></returns> public static UnionClass UnionAll(this CanUnion left, SqlStatementKeywordBase select) { return(new UnionClass(left, " union all ", select)); }/// <summary>
public WhereClass(SqlStatementKeywordBase from, WhereItem[] filter) : base(from) { this._where.AddRange(filter); }
public FromClass(SqlStatementKeywordBase s) : base(s) { }
public SqlPart OrderBy(params OrderByItem[] orderBy) { return(new SqlPart(h => h.Translate(this) + " " + SqlStatementKeywordBase.BuildOrderBy(h, orderBy))); }