Example #1
0
        public override SqlObject VisitSelect_clause(AntlrSqlParser.Select_clauseContext context)
        {
            SqlSelectSpec sqlSelectSpec = (SqlSelectSpec)this.Visit(context.selection());
            SqlTopSpec    sqlTopSpec;

            if (context.top_spec() != default)
            {
                sqlTopSpec = (SqlTopSpec)this.Visit(context.top_spec());
            }
            else
            {
                sqlTopSpec = default;
            }

            bool distinct = context.K_DISTINCT() != default;

            return(SqlSelectClause.Create(sqlSelectSpec, sqlTopSpec, distinct));
        }
Example #2
0
 /// <summary>
 /// Visit a parse tree produced by <see cref="AntlrSqlParser.select_clause"/>.
 /// <para>
 /// The default implementation returns the result of calling <see cref="AbstractParseTreeVisitor{Result}.VisitChildren(IRuleNode)"/>
 /// on <paramref name="context"/>.
 /// </para>
 /// </summary>
 /// <param name="context">The parse tree.</param>
 /// <return>The visitor result.</return>
 public virtual Result VisitSelect_clause([NotNull] AntlrSqlParser.Select_clauseContext context)
 {
     return(VisitChildren(context));
 }