public string UnionKeyword(SqlUnionType unionType) { switch (unionType) { case SqlUnionType.Union: return("UNION"); case SqlUnionType.UnionAll: return("UNION ALL"); case SqlUnionType.Intersect: return("INTERSECT"); case SqlUnionType.IntersectAll: return("INTERSECT ALL"); case SqlUnionType.Except: return("EXCEPT"); case SqlUnionType.ExceptAll: return("EXCEPT ALL"); default: throw new NotImplementedException(); } }
/// <summary> /// Gets the union keyword for specified union type. /// </summary> /// <param name="unionType">Type of the union.</param> /// <returns> /// Union keyword /// </returns> /// <exception cref="NotImplementedException"></exception> public string UnionKeyword(SqlUnionType unionType) { return(unionType switch { SqlUnionType.Union => "UNION", SqlUnionType.UnionAll => "UNION ALL", _ => throw new NotImplementedException(), });
/// <summary> /// Gets the union keyword for specified union type. /// </summary> /// <param name="unionType">Type of the union.</param> /// <returns> /// Union keyword /// </returns> /// <exception cref="NotImplementedException"></exception> public string UnionKeyword(SqlUnionType unionType) { return(unionType switch { SqlUnionType.Union => "UNION", SqlUnionType.UnionAll => "UNION ALL", SqlUnionType.Intersect => "INTERSECT", SqlUnionType.Except => "EXCEPT", _ => throw new NotImplementedException(), });
/// <summary> /// Gets the union keyword for specified union type. /// </summary> /// <param name="unionType">Type of the union.</param> /// <returns> /// Union keyword /// </returns> /// <exception cref="System.NotImplementedException"></exception> public string UnionKeyword(SqlUnionType unionType) { switch (unionType) { case SqlUnionType.Union: return("UNION"); case SqlUnionType.UnionAll: return("UNION ALL"); default: throw new NotImplementedException(); } }
public SqlQuery Union(SqlUnionType unionType = SqlUnionType.Union) { this.unionQuery = this.Clone(); this.unionQuery.countRecords = false; this.unionQuery.parent = this; this.unionQuery.parameters = null; this.unionType = unionType; this.columns = new List <Column>(); this.from = new StringBuilder(); this.aliasExpressions = null; this.aliasWithJoins = null; this.distinct = false; this.having = null; this.groupBy = null; this.orderBy = null; this.forXml = null; this.skip = 0; this.take = 0; this.where = null; this.intoIndex = -1; this.into = new List <object>(); return(this); }
public string UnionKeyword(SqlUnionType unionType) { throw new NotImplementedException(); }