public virtual DmlSelectUnionStatement AddSelect(DmlSelectStatement select, bool unionAll) { selectStmtList.Add(select); if (!unionAll) { firstDistinctIndex = selectStmtList.Count - 1; } return this; }
public virtual DmlSelectUnionStatement AddSelect(DmlSelectStatement select, bool unionAll) { selectStmtList.Add(select); if (!unionAll) { firstDistinctIndex = selectStmtList.Count - 1; } return(this); }
public DmlSelectUnionStatement(DmlSelectStatement select) { selectStmtList = new List <DmlSelectStatement> { select }; }
public DmlSelectUnionStatement(DmlSelectStatement select) { selectStmtList = new List<DmlSelectStatement> {select}; }
public virtual void Visit(DmlSelectStatement node) { VisitInternal(node.Group); VisitInternal(node.Having); VisitInternal(node.Limit); VisitInternal(node.Order); VisitInternal(node.SelectExprList); VisitInternal(node.Tables); VisitInternal(node.Where); }
/// <returns>argument itself if there is no union</returns> /// <exception cref="System.SqlSyntaxErrorException" /> protected virtual DmlQueryStatement BuildUnionSelect(DmlSelectStatement select) { if (lexer.Token() != MySqlToken.KwUnion) { return select; } var union = new DmlSelectUnionStatement(select); for (; lexer.Token() == MySqlToken.KwUnion;) { lexer.NextToken(); var isAll = false; switch (lexer.Token()) { case MySqlToken.KwAll: { isAll = true; goto case MySqlToken.KwDistinct; } case MySqlToken.KwDistinct: { lexer.NextToken(); break; } } select = SelectPrimary(); union.AddSelect(select, isAll); } union.SetOrderBy(OrderBy()).SetLimit(Limit()); return union; }
public virtual void SetSelect(CreateTableSelectOption option, DmlSelectStatement select) { Select = new Pair<CreateTableSelectOption, DmlSelectStatement>(option, select); }