Inheritance: DmlQueryStatement
コード例 #1
0
 public virtual DmlSelectUnionStatement AddSelect(DmlSelectStatement select, bool unionAll)
 {
     selectStmtList.Add(select);
     if (!unionAll)
     {
         firstDistinctIndex = selectStmtList.Count - 1;
     }
     return this;
 }
コード例 #2
0
 public virtual DmlSelectUnionStatement AddSelect(DmlSelectStatement select, bool unionAll)
 {
     selectStmtList.Add(select);
     if (!unionAll)
     {
         firstDistinctIndex = selectStmtList.Count - 1;
     }
     return(this);
 }
コード例 #3
0
 public DmlSelectUnionStatement(DmlSelectStatement select)
 {
     selectStmtList = new List <DmlSelectStatement> {
         select
     };
 }
コード例 #4
0
 public DmlSelectUnionStatement(DmlSelectStatement select)
 {
     selectStmtList = new List<DmlSelectStatement> {select};
 }
コード例 #5
0
 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);
 }
コード例 #6
0
        /// <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;
        }
コード例 #7
0
 public virtual void SetSelect(CreateTableSelectOption option, DmlSelectStatement select)
 {
     Select = new Pair<CreateTableSelectOption, DmlSelectStatement>(option, select);
 }