github.com/rohankumardubey/aresdb@v0.0.2-0.20190517170215-e54e3ca06b9c/query/sql/tree/AstVisitor.go (about)

     1  //  Copyright (c) 2017-2018 Uber Technologies, Inc.
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //     http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  package tree
    16  
    17  // AstVisitor is a visitor
    18  type AstVisitor interface {
    19  	visitNode(node INode, ctx interface{}) interface{}
    20  
    21  	process(node INode, ctx interface{}) interface{}
    22  
    23  	// VisitAliasedRelation visits the node
    24  	VisitAliasedRelation(aliasedRelation *AliasedRelation, ctx interface{}) interface{}
    25  
    26  	// VisitAllColumns visits the node
    27  	VisitAllColumns(allColumns *AllColumns, ctx interface{}) interface{}
    28  
    29  	// VisitExpression visits the node
    30  	VisitExpression(exp IExpression, ctx interface{}) interface{}
    31  
    32  	// VisitGroupBy visits the node
    33  	VisitGroupBy(groupby *GroupBy, ctx interface{}) interface{}
    34  
    35  	// VisitExpression visits the node
    36  	VisitGroupingElement(groupElement IGroupingElement, ctx interface{}) interface{}
    37  
    38  	// VisitIdentifier visits the node
    39  	VisitIdentifier(identifier *Identifier, ctx interface{}) interface{}
    40  
    41  	// VisitJoin visits the node
    42  	VisitJoin(join *Join, ctx interface{}) interface{}
    43  
    44  	// VisitLogicalBinaryExpression visits the node
    45  	VisitLogicalBinaryExpression(logicalBinaryExpr *LogicalBinaryExpression, ctx interface{}) interface{}
    46  
    47  	// VisitOrderBy visits the node
    48  	VisitOrderBy(orderBy *OrderBy, ctx interface{}) interface{}
    49  
    50  	// VisitQuery visits the node
    51  	VisitQuery(query *Query, ctx interface{}) interface{}
    52  
    53  	// VisitQueryBody visits the node
    54  	VisitQueryBody(queryBody IQueryBody, ctx interface{}) interface{}
    55  
    56  	// VisitQuerySpecification visits the node
    57  	VisitQuerySpecification(querySpec *QuerySpecification, ctx interface{}) interface{}
    58  
    59  	// VisitRelation visits the node
    60  	VisitRelation(relation IRelation, ctx interface{}) interface{}
    61  
    62  	// VisitSelect visits the node
    63  	VisitSelect(sel *Select, ctx interface{}) interface{}
    64  
    65  	// VisitSelectItem visits the node
    66  	VisitSelectItem(selectItem ISelectItem, ctx interface{}) interface{}
    67  
    68  	// VisitSimpleGroupBy visits the node
    69  	VisitSimpleGroupBy(simpleGroupBy *SimpleGroupBy, ctx interface{}) interface{}
    70  
    71  	// VisitSingleColumn visits the node
    72  	VisitSingleColumn(singleColumn *SingleColumn, ctx interface{}) interface{}
    73  
    74  	// VisitSortItem visits the node
    75  	VisitSortItem(sortItem *SortItem, ctx interface{}) interface{}
    76  
    77  	// VisitStatement visits the node
    78  	VisitStatement(statement IStatement, ctx interface{}) interface{}
    79  
    80  	// VisitTable visits the node
    81  	VisitTable(table *Table, ctx interface{}) interface{}
    82  
    83  	// VisitTableSubquery visits the node
    84  	VisitTableSubquery(tableSubquery *TableSubquery, ctx interface{}) interface{}
    85  
    86  	// VisitWith visits the node
    87  	VisitWith(with *With, ctx interface{}) interface{}
    88  
    89  	// VisitWithQuery visits the node
    90  	VisitWithQuery(with *WithQuery, ctx interface{}) interface{}
    91  }