github.com/team-ide/go-dialect@v1.9.20/vitess/sqlparser/ast_visit.go (about)

     1  /*
     2  Copyright 2021 The Vitess Authors.
     3  
     4  Licensed under the Apache License, Version 2.0 (the "License");
     5  you may not use this file except in compliance with the License.
     6  You may obtain a copy of the License at
     7  
     8      http://www.apache.org/licenses/LICENSE-2.0
     9  
    10  Unless required by applicable law or agreed to in writing, software
    11  distributed under the License is distributed on an "AS IS" BASIS,
    12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13  See the License for the specific language governing permissions and
    14  limitations under the License.
    15  */
    16  // Code generated by ASTHelperGen. DO NOT EDIT.
    17  
    18  package sqlparser
    19  
    20  func VisitSQLNode(in SQLNode, f Visit) error {
    21  	if in == nil {
    22  		return nil
    23  	}
    24  	switch in := in.(type) {
    25  	case AccessMode:
    26  		return VisitAccessMode(in, f)
    27  	case *AddColumns:
    28  		return VisitRefOfAddColumns(in, f)
    29  	case *AddConstraintDefinition:
    30  		return VisitRefOfAddConstraintDefinition(in, f)
    31  	case *AddIndexDefinition:
    32  		return VisitRefOfAddIndexDefinition(in, f)
    33  	case AlgorithmValue:
    34  		return VisitAlgorithmValue(in, f)
    35  	case *AliasedExpr:
    36  		return VisitRefOfAliasedExpr(in, f)
    37  	case *AliasedTableExpr:
    38  		return VisitRefOfAliasedTableExpr(in, f)
    39  	case *AlterCharset:
    40  		return VisitRefOfAlterCharset(in, f)
    41  	case *AlterColumn:
    42  		return VisitRefOfAlterColumn(in, f)
    43  	case *AlterDatabase:
    44  		return VisitRefOfAlterDatabase(in, f)
    45  	case *AlterMigration:
    46  		return VisitRefOfAlterMigration(in, f)
    47  	case *AlterTable:
    48  		return VisitRefOfAlterTable(in, f)
    49  	case *AlterView:
    50  		return VisitRefOfAlterView(in, f)
    51  	case *AlterVschema:
    52  		return VisitRefOfAlterVschema(in, f)
    53  	case *AndExpr:
    54  		return VisitRefOfAndExpr(in, f)
    55  	case Argument:
    56  		return VisitArgument(in, f)
    57  	case *AutoIncSpec:
    58  		return VisitRefOfAutoIncSpec(in, f)
    59  	case *Begin:
    60  		return VisitRefOfBegin(in, f)
    61  	case *BetweenExpr:
    62  		return VisitRefOfBetweenExpr(in, f)
    63  	case *BinaryExpr:
    64  		return VisitRefOfBinaryExpr(in, f)
    65  	case BoolVal:
    66  		return VisitBoolVal(in, f)
    67  	case *CallProc:
    68  		return VisitRefOfCallProc(in, f)
    69  	case *CaseExpr:
    70  		return VisitRefOfCaseExpr(in, f)
    71  	case *ChangeColumn:
    72  		return VisitRefOfChangeColumn(in, f)
    73  	case *CheckConstraintDefinition:
    74  		return VisitRefOfCheckConstraintDefinition(in, f)
    75  	case ColIdent:
    76  		return VisitColIdent(in, f)
    77  	case *ColName:
    78  		return VisitRefOfColName(in, f)
    79  	case *CollateExpr:
    80  		return VisitRefOfCollateExpr(in, f)
    81  	case *ColumnDefinition:
    82  		return VisitRefOfColumnDefinition(in, f)
    83  	case *ColumnType:
    84  		return VisitRefOfColumnType(in, f)
    85  	case Columns:
    86  		return VisitColumns(in, f)
    87  	case Comments:
    88  		return VisitComments(in, f)
    89  	case *Commit:
    90  		return VisitRefOfCommit(in, f)
    91  	case *CommonTableExpr:
    92  		return VisitRefOfCommonTableExpr(in, f)
    93  	case *ComparisonExpr:
    94  		return VisitRefOfComparisonExpr(in, f)
    95  	case *ConstraintDefinition:
    96  		return VisitRefOfConstraintDefinition(in, f)
    97  	case *ConvertExpr:
    98  		return VisitRefOfConvertExpr(in, f)
    99  	case *ConvertType:
   100  		return VisitRefOfConvertType(in, f)
   101  	case *ConvertUsingExpr:
   102  		return VisitRefOfConvertUsingExpr(in, f)
   103  	case *CreateDatabase:
   104  		return VisitRefOfCreateDatabase(in, f)
   105  	case *CreateTable:
   106  		return VisitRefOfCreateTable(in, f)
   107  	case *CreateView:
   108  		return VisitRefOfCreateView(in, f)
   109  	case *CurTimeFuncExpr:
   110  		return VisitRefOfCurTimeFuncExpr(in, f)
   111  	case *Default:
   112  		return VisitRefOfDefault(in, f)
   113  	case *Delete:
   114  		return VisitRefOfDelete(in, f)
   115  	case *DerivedTable:
   116  		return VisitRefOfDerivedTable(in, f)
   117  	case *DropColumn:
   118  		return VisitRefOfDropColumn(in, f)
   119  	case *DropDatabase:
   120  		return VisitRefOfDropDatabase(in, f)
   121  	case *DropKey:
   122  		return VisitRefOfDropKey(in, f)
   123  	case *DropTable:
   124  		return VisitRefOfDropTable(in, f)
   125  	case *DropView:
   126  		return VisitRefOfDropView(in, f)
   127  	case *ExistsExpr:
   128  		return VisitRefOfExistsExpr(in, f)
   129  	case *ExplainStmt:
   130  		return VisitRefOfExplainStmt(in, f)
   131  	case *ExplainTab:
   132  		return VisitRefOfExplainTab(in, f)
   133  	case *ExprOrColumns:
   134  		return VisitRefOfExprOrColumns(in, f)
   135  	case Exprs:
   136  		return VisitExprs(in, f)
   137  	case *ExtractFuncExpr:
   138  		return VisitRefOfExtractFuncExpr(in, f)
   139  	case *ExtractedSubquery:
   140  		return VisitRefOfExtractedSubquery(in, f)
   141  	case *Flush:
   142  		return VisitRefOfFlush(in, f)
   143  	case *Force:
   144  		return VisitRefOfForce(in, f)
   145  	case *ForeignKeyDefinition:
   146  		return VisitRefOfForeignKeyDefinition(in, f)
   147  	case *FuncExpr:
   148  		return VisitRefOfFuncExpr(in, f)
   149  	case GroupBy:
   150  		return VisitGroupBy(in, f)
   151  	case *GroupConcatExpr:
   152  		return VisitRefOfGroupConcatExpr(in, f)
   153  	case *IndexDefinition:
   154  		return VisitRefOfIndexDefinition(in, f)
   155  	case *IndexHints:
   156  		return VisitRefOfIndexHints(in, f)
   157  	case *IndexInfo:
   158  		return VisitRefOfIndexInfo(in, f)
   159  	case *Insert:
   160  		return VisitRefOfInsert(in, f)
   161  	case *IntervalExpr:
   162  		return VisitRefOfIntervalExpr(in, f)
   163  	case *IntroducerExpr:
   164  		return VisitRefOfIntroducerExpr(in, f)
   165  	case *IsExpr:
   166  		return VisitRefOfIsExpr(in, f)
   167  	case IsolationLevel:
   168  		return VisitIsolationLevel(in, f)
   169  	case *JoinCondition:
   170  		return VisitRefOfJoinCondition(in, f)
   171  	case *JoinTableExpr:
   172  		return VisitRefOfJoinTableExpr(in, f)
   173  	case *KeyState:
   174  		return VisitRefOfKeyState(in, f)
   175  	case *Limit:
   176  		return VisitRefOfLimit(in, f)
   177  	case ListArg:
   178  		return VisitListArg(in, f)
   179  	case *Literal:
   180  		return VisitRefOfLiteral(in, f)
   181  	case *Load:
   182  		return VisitRefOfLoad(in, f)
   183  	case *LockOption:
   184  		return VisitRefOfLockOption(in, f)
   185  	case *LockTables:
   186  		return VisitRefOfLockTables(in, f)
   187  	case *MatchExpr:
   188  		return VisitRefOfMatchExpr(in, f)
   189  	case *ModifyColumn:
   190  		return VisitRefOfModifyColumn(in, f)
   191  	case *Nextval:
   192  		return VisitRefOfNextval(in, f)
   193  	case *NotExpr:
   194  		return VisitRefOfNotExpr(in, f)
   195  	case *NullVal:
   196  		return VisitRefOfNullVal(in, f)
   197  	case OnDup:
   198  		return VisitOnDup(in, f)
   199  	case *OptLike:
   200  		return VisitRefOfOptLike(in, f)
   201  	case *OrExpr:
   202  		return VisitRefOfOrExpr(in, f)
   203  	case *Order:
   204  		return VisitRefOfOrder(in, f)
   205  	case OrderBy:
   206  		return VisitOrderBy(in, f)
   207  	case *OrderByOption:
   208  		return VisitRefOfOrderByOption(in, f)
   209  	case *OtherAdmin:
   210  		return VisitRefOfOtherAdmin(in, f)
   211  	case *OtherRead:
   212  		return VisitRefOfOtherRead(in, f)
   213  	case *ParenTableExpr:
   214  		return VisitRefOfParenTableExpr(in, f)
   215  	case *PartitionDefinition:
   216  		return VisitRefOfPartitionDefinition(in, f)
   217  	case *PartitionOption:
   218  		return VisitRefOfPartitionOption(in, f)
   219  	case *PartitionSpec:
   220  		return VisitRefOfPartitionSpec(in, f)
   221  	case Partitions:
   222  		return VisitPartitions(in, f)
   223  	case ReferenceAction:
   224  		return VisitReferenceAction(in, f)
   225  	case *ReferenceDefinition:
   226  		return VisitRefOfReferenceDefinition(in, f)
   227  	case *Release:
   228  		return VisitRefOfRelease(in, f)
   229  	case *RenameIndex:
   230  		return VisitRefOfRenameIndex(in, f)
   231  	case *RenameTable:
   232  		return VisitRefOfRenameTable(in, f)
   233  	case *RenameTableName:
   234  		return VisitRefOfRenameTableName(in, f)
   235  	case *RevertMigration:
   236  		return VisitRefOfRevertMigration(in, f)
   237  	case *Rollback:
   238  		return VisitRefOfRollback(in, f)
   239  	case RootNode:
   240  		return VisitRootNode(in, f)
   241  	case *SRollback:
   242  		return VisitRefOfSRollback(in, f)
   243  	case *Savepoint:
   244  		return VisitRefOfSavepoint(in, f)
   245  	case *Select:
   246  		return VisitRefOfSelect(in, f)
   247  	case SelectExprs:
   248  		return VisitSelectExprs(in, f)
   249  	case *SelectInto:
   250  		return VisitRefOfSelectInto(in, f)
   251  	case *Set:
   252  		return VisitRefOfSet(in, f)
   253  	case *SetExpr:
   254  		return VisitRefOfSetExpr(in, f)
   255  	case SetExprs:
   256  		return VisitSetExprs(in, f)
   257  	case *SetTransaction:
   258  		return VisitRefOfSetTransaction(in, f)
   259  	case *Show:
   260  		return VisitRefOfShow(in, f)
   261  	case *ShowBasic:
   262  		return VisitRefOfShowBasic(in, f)
   263  	case *ShowCreate:
   264  		return VisitRefOfShowCreate(in, f)
   265  	case *ShowFilter:
   266  		return VisitRefOfShowFilter(in, f)
   267  	case *ShowLegacy:
   268  		return VisitRefOfShowLegacy(in, f)
   269  	case *ShowMigrationLogs:
   270  		return VisitRefOfShowMigrationLogs(in, f)
   271  	case *StarExpr:
   272  		return VisitRefOfStarExpr(in, f)
   273  	case *Stream:
   274  		return VisitRefOfStream(in, f)
   275  	case *SubPartition:
   276  		return VisitRefOfSubPartition(in, f)
   277  	case *Subquery:
   278  		return VisitRefOfSubquery(in, f)
   279  	case *SubstrExpr:
   280  		return VisitRefOfSubstrExpr(in, f)
   281  	case TableExprs:
   282  		return VisitTableExprs(in, f)
   283  	case TableIdent:
   284  		return VisitTableIdent(in, f)
   285  	case TableName:
   286  		return VisitTableName(in, f)
   287  	case TableNames:
   288  		return VisitTableNames(in, f)
   289  	case TableOptions:
   290  		return VisitTableOptions(in, f)
   291  	case *TableSpec:
   292  		return VisitRefOfTableSpec(in, f)
   293  	case *TablespaceOperation:
   294  		return VisitRefOfTablespaceOperation(in, f)
   295  	case *TimestampFuncExpr:
   296  		return VisitRefOfTimestampFuncExpr(in, f)
   297  	case *TruncateTable:
   298  		return VisitRefOfTruncateTable(in, f)
   299  	case *UnaryExpr:
   300  		return VisitRefOfUnaryExpr(in, f)
   301  	case *Union:
   302  		return VisitRefOfUnion(in, f)
   303  	case *UnlockTables:
   304  		return VisitRefOfUnlockTables(in, f)
   305  	case *Update:
   306  		return VisitRefOfUpdate(in, f)
   307  	case *UpdateExpr:
   308  		return VisitRefOfUpdateExpr(in, f)
   309  	case UpdateExprs:
   310  		return VisitUpdateExprs(in, f)
   311  	case *Use:
   312  		return VisitRefOfUse(in, f)
   313  	case *VStream:
   314  		return VisitRefOfVStream(in, f)
   315  	case ValTuple:
   316  		return VisitValTuple(in, f)
   317  	case *Validation:
   318  		return VisitRefOfValidation(in, f)
   319  	case Values:
   320  		return VisitValues(in, f)
   321  	case *ValuesFuncExpr:
   322  		return VisitRefOfValuesFuncExpr(in, f)
   323  	case VindexParam:
   324  		return VisitVindexParam(in, f)
   325  	case *VindexSpec:
   326  		return VisitRefOfVindexSpec(in, f)
   327  	case *When:
   328  		return VisitRefOfWhen(in, f)
   329  	case *Where:
   330  		return VisitRefOfWhere(in, f)
   331  	case *With:
   332  		return VisitRefOfWith(in, f)
   333  	case *XorExpr:
   334  		return VisitRefOfXorExpr(in, f)
   335  	default:
   336  		// this should never happen
   337  		return nil
   338  	}
   339  }
   340  func VisitRefOfAddColumns(in *AddColumns, f Visit) error {
   341  	if in == nil {
   342  		return nil
   343  	}
   344  	if cont, err := f(in); err != nil || !cont {
   345  		return err
   346  	}
   347  	for _, el := range in.Columns {
   348  		if err := VisitRefOfColumnDefinition(el, f); err != nil {
   349  			return err
   350  		}
   351  	}
   352  	if err := VisitRefOfColName(in.After, f); err != nil {
   353  		return err
   354  	}
   355  	return nil
   356  }
   357  func VisitRefOfAddConstraintDefinition(in *AddConstraintDefinition, f Visit) error {
   358  	if in == nil {
   359  		return nil
   360  	}
   361  	if cont, err := f(in); err != nil || !cont {
   362  		return err
   363  	}
   364  	if err := VisitRefOfConstraintDefinition(in.ConstraintDefinition, f); err != nil {
   365  		return err
   366  	}
   367  	return nil
   368  }
   369  func VisitRefOfAddIndexDefinition(in *AddIndexDefinition, f Visit) error {
   370  	if in == nil {
   371  		return nil
   372  	}
   373  	if cont, err := f(in); err != nil || !cont {
   374  		return err
   375  	}
   376  	if err := VisitRefOfIndexDefinition(in.IndexDefinition, f); err != nil {
   377  		return err
   378  	}
   379  	return nil
   380  }
   381  func VisitRefOfAliasedExpr(in *AliasedExpr, f Visit) error {
   382  	if in == nil {
   383  		return nil
   384  	}
   385  	if cont, err := f(in); err != nil || !cont {
   386  		return err
   387  	}
   388  	if err := VisitExpr(in.Expr, f); err != nil {
   389  		return err
   390  	}
   391  	if err := VisitColIdent(in.As, f); err != nil {
   392  		return err
   393  	}
   394  	return nil
   395  }
   396  func VisitRefOfAliasedTableExpr(in *AliasedTableExpr, f Visit) error {
   397  	if in == nil {
   398  		return nil
   399  	}
   400  	if cont, err := f(in); err != nil || !cont {
   401  		return err
   402  	}
   403  	if err := VisitSimpleTableExpr(in.Expr, f); err != nil {
   404  		return err
   405  	}
   406  	if err := VisitPartitions(in.Partitions, f); err != nil {
   407  		return err
   408  	}
   409  	if err := VisitTableIdent(in.As, f); err != nil {
   410  		return err
   411  	}
   412  	if err := VisitRefOfIndexHints(in.Hints, f); err != nil {
   413  		return err
   414  	}
   415  	if err := VisitColumns(in.Columns, f); err != nil {
   416  		return err
   417  	}
   418  	return nil
   419  }
   420  func VisitRefOfAlterCharset(in *AlterCharset, f Visit) error {
   421  	if in == nil {
   422  		return nil
   423  	}
   424  	if cont, err := f(in); err != nil || !cont {
   425  		return err
   426  	}
   427  	return nil
   428  }
   429  func VisitRefOfAlterColumn(in *AlterColumn, f Visit) error {
   430  	if in == nil {
   431  		return nil
   432  	}
   433  	if cont, err := f(in); err != nil || !cont {
   434  		return err
   435  	}
   436  	if err := VisitRefOfColName(in.Column, f); err != nil {
   437  		return err
   438  	}
   439  	if err := VisitExpr(in.DefaultVal, f); err != nil {
   440  		return err
   441  	}
   442  	return nil
   443  }
   444  func VisitRefOfAlterDatabase(in *AlterDatabase, f Visit) error {
   445  	if in == nil {
   446  		return nil
   447  	}
   448  	if cont, err := f(in); err != nil || !cont {
   449  		return err
   450  	}
   451  	if err := VisitTableIdent(in.DBName, f); err != nil {
   452  		return err
   453  	}
   454  	return nil
   455  }
   456  func VisitRefOfAlterMigration(in *AlterMigration, f Visit) error {
   457  	if in == nil {
   458  		return nil
   459  	}
   460  	if cont, err := f(in); err != nil || !cont {
   461  		return err
   462  	}
   463  	return nil
   464  }
   465  func VisitRefOfAlterTable(in *AlterTable, f Visit) error {
   466  	if in == nil {
   467  		return nil
   468  	}
   469  	if cont, err := f(in); err != nil || !cont {
   470  		return err
   471  	}
   472  	if err := VisitTableName(in.Table, f); err != nil {
   473  		return err
   474  	}
   475  	for _, el := range in.AlterOptions {
   476  		if err := VisitAlterOption(el, f); err != nil {
   477  			return err
   478  		}
   479  	}
   480  	if err := VisitRefOfPartitionSpec(in.PartitionSpec, f); err != nil {
   481  		return err
   482  	}
   483  	if err := VisitComments(in.Comments, f); err != nil {
   484  		return err
   485  	}
   486  	return nil
   487  }
   488  func VisitRefOfAlterView(in *AlterView, f Visit) error {
   489  	if in == nil {
   490  		return nil
   491  	}
   492  	if cont, err := f(in); err != nil || !cont {
   493  		return err
   494  	}
   495  	if err := VisitTableName(in.ViewName, f); err != nil {
   496  		return err
   497  	}
   498  	if err := VisitColumns(in.Columns, f); err != nil {
   499  		return err
   500  	}
   501  	if err := VisitSelectStatement(in.Select, f); err != nil {
   502  		return err
   503  	}
   504  	return nil
   505  }
   506  func VisitRefOfAlterVschema(in *AlterVschema, f Visit) error {
   507  	if in == nil {
   508  		return nil
   509  	}
   510  	if cont, err := f(in); err != nil || !cont {
   511  		return err
   512  	}
   513  	if err := VisitTableName(in.Table, f); err != nil {
   514  		return err
   515  	}
   516  	if err := VisitRefOfVindexSpec(in.VindexSpec, f); err != nil {
   517  		return err
   518  	}
   519  	for _, el := range in.VindexCols {
   520  		if err := VisitColIdent(el, f); err != nil {
   521  			return err
   522  		}
   523  	}
   524  	if err := VisitRefOfAutoIncSpec(in.AutoIncSpec, f); err != nil {
   525  		return err
   526  	}
   527  	return nil
   528  }
   529  func VisitRefOfAndExpr(in *AndExpr, f Visit) error {
   530  	if in == nil {
   531  		return nil
   532  	}
   533  	if cont, err := f(in); err != nil || !cont {
   534  		return err
   535  	}
   536  	if err := VisitExpr(in.Left, f); err != nil {
   537  		return err
   538  	}
   539  	if err := VisitExpr(in.Right, f); err != nil {
   540  		return err
   541  	}
   542  	return nil
   543  }
   544  func VisitRefOfAutoIncSpec(in *AutoIncSpec, f Visit) error {
   545  	if in == nil {
   546  		return nil
   547  	}
   548  	if cont, err := f(in); err != nil || !cont {
   549  		return err
   550  	}
   551  	if err := VisitColIdent(in.Column, f); err != nil {
   552  		return err
   553  	}
   554  	if err := VisitTableName(in.Sequence, f); err != nil {
   555  		return err
   556  	}
   557  	return nil
   558  }
   559  func VisitRefOfBegin(in *Begin, f Visit) error {
   560  	if in == nil {
   561  		return nil
   562  	}
   563  	if cont, err := f(in); err != nil || !cont {
   564  		return err
   565  	}
   566  	return nil
   567  }
   568  func VisitRefOfBetweenExpr(in *BetweenExpr, f Visit) error {
   569  	if in == nil {
   570  		return nil
   571  	}
   572  	if cont, err := f(in); err != nil || !cont {
   573  		return err
   574  	}
   575  	if err := VisitExpr(in.Left, f); err != nil {
   576  		return err
   577  	}
   578  	if err := VisitExpr(in.From, f); err != nil {
   579  		return err
   580  	}
   581  	if err := VisitExpr(in.To, f); err != nil {
   582  		return err
   583  	}
   584  	return nil
   585  }
   586  func VisitRefOfBinaryExpr(in *BinaryExpr, f Visit) error {
   587  	if in == nil {
   588  		return nil
   589  	}
   590  	if cont, err := f(in); err != nil || !cont {
   591  		return err
   592  	}
   593  	if err := VisitExpr(in.Left, f); err != nil {
   594  		return err
   595  	}
   596  	if err := VisitExpr(in.Right, f); err != nil {
   597  		return err
   598  	}
   599  	return nil
   600  }
   601  func VisitRefOfCallProc(in *CallProc, f Visit) error {
   602  	if in == nil {
   603  		return nil
   604  	}
   605  	if cont, err := f(in); err != nil || !cont {
   606  		return err
   607  	}
   608  	if err := VisitTableName(in.Name, f); err != nil {
   609  		return err
   610  	}
   611  	if err := VisitExprs(in.Params, f); err != nil {
   612  		return err
   613  	}
   614  	return nil
   615  }
   616  func VisitRefOfCaseExpr(in *CaseExpr, f Visit) error {
   617  	if in == nil {
   618  		return nil
   619  	}
   620  	if cont, err := f(in); err != nil || !cont {
   621  		return err
   622  	}
   623  	if err := VisitExpr(in.Expr, f); err != nil {
   624  		return err
   625  	}
   626  	for _, el := range in.Whens {
   627  		if err := VisitRefOfWhen(el, f); err != nil {
   628  			return err
   629  		}
   630  	}
   631  	if err := VisitExpr(in.Else, f); err != nil {
   632  		return err
   633  	}
   634  	return nil
   635  }
   636  func VisitRefOfChangeColumn(in *ChangeColumn, f Visit) error {
   637  	if in == nil {
   638  		return nil
   639  	}
   640  	if cont, err := f(in); err != nil || !cont {
   641  		return err
   642  	}
   643  	if err := VisitRefOfColName(in.OldColumn, f); err != nil {
   644  		return err
   645  	}
   646  	if err := VisitRefOfColumnDefinition(in.NewColDefinition, f); err != nil {
   647  		return err
   648  	}
   649  	if err := VisitRefOfColName(in.After, f); err != nil {
   650  		return err
   651  	}
   652  	return nil
   653  }
   654  func VisitRefOfCheckConstraintDefinition(in *CheckConstraintDefinition, f Visit) error {
   655  	if in == nil {
   656  		return nil
   657  	}
   658  	if cont, err := f(in); err != nil || !cont {
   659  		return err
   660  	}
   661  	if err := VisitExpr(in.Expr, f); err != nil {
   662  		return err
   663  	}
   664  	return nil
   665  }
   666  func VisitColIdent(in ColIdent, f Visit) error {
   667  	if cont, err := f(in); err != nil || !cont {
   668  		return err
   669  	}
   670  	return nil
   671  }
   672  func VisitRefOfColName(in *ColName, f Visit) error {
   673  	if in == nil {
   674  		return nil
   675  	}
   676  	if cont, err := f(in); err != nil || !cont {
   677  		return err
   678  	}
   679  	if err := VisitColIdent(in.Name, f); err != nil {
   680  		return err
   681  	}
   682  	if err := VisitTableName(in.Qualifier, f); err != nil {
   683  		return err
   684  	}
   685  	return nil
   686  }
   687  func VisitRefOfCollateExpr(in *CollateExpr, f Visit) error {
   688  	if in == nil {
   689  		return nil
   690  	}
   691  	if cont, err := f(in); err != nil || !cont {
   692  		return err
   693  	}
   694  	if err := VisitExpr(in.Expr, f); err != nil {
   695  		return err
   696  	}
   697  	return nil
   698  }
   699  func VisitRefOfColumnDefinition(in *ColumnDefinition, f Visit) error {
   700  	if in == nil {
   701  		return nil
   702  	}
   703  	if cont, err := f(in); err != nil || !cont {
   704  		return err
   705  	}
   706  	if err := VisitColIdent(in.Name, f); err != nil {
   707  		return err
   708  	}
   709  	return nil
   710  }
   711  func VisitRefOfColumnType(in *ColumnType, f Visit) error {
   712  	if in == nil {
   713  		return nil
   714  	}
   715  	if cont, err := f(in); err != nil || !cont {
   716  		return err
   717  	}
   718  	if err := VisitRefOfLiteral(in.Length, f); err != nil {
   719  		return err
   720  	}
   721  	if err := VisitRefOfLiteral(in.Scale, f); err != nil {
   722  		return err
   723  	}
   724  	return nil
   725  }
   726  func VisitColumns(in Columns, f Visit) error {
   727  	if in == nil {
   728  		return nil
   729  	}
   730  	if cont, err := f(in); err != nil || !cont {
   731  		return err
   732  	}
   733  	for _, el := range in {
   734  		if err := VisitColIdent(el, f); err != nil {
   735  			return err
   736  		}
   737  	}
   738  	return nil
   739  }
   740  func VisitComments(in Comments, f Visit) error {
   741  	_, err := f(in)
   742  	return err
   743  }
   744  func VisitRefOfCommit(in *Commit, f Visit) error {
   745  	if in == nil {
   746  		return nil
   747  	}
   748  	if cont, err := f(in); err != nil || !cont {
   749  		return err
   750  	}
   751  	return nil
   752  }
   753  func VisitRefOfCommonTableExpr(in *CommonTableExpr, f Visit) error {
   754  	if in == nil {
   755  		return nil
   756  	}
   757  	if cont, err := f(in); err != nil || !cont {
   758  		return err
   759  	}
   760  	if err := VisitTableIdent(in.TableID, f); err != nil {
   761  		return err
   762  	}
   763  	if err := VisitColumns(in.Columns, f); err != nil {
   764  		return err
   765  	}
   766  	if err := VisitRefOfSubquery(in.Subquery, f); err != nil {
   767  		return err
   768  	}
   769  	return nil
   770  }
   771  func VisitRefOfComparisonExpr(in *ComparisonExpr, f Visit) error {
   772  	if in == nil {
   773  		return nil
   774  	}
   775  	if cont, err := f(in); err != nil || !cont {
   776  		return err
   777  	}
   778  	if err := VisitExpr(in.Left, f); err != nil {
   779  		return err
   780  	}
   781  	if err := VisitExpr(in.Right, f); err != nil {
   782  		return err
   783  	}
   784  	if err := VisitExpr(in.Escape, f); err != nil {
   785  		return err
   786  	}
   787  	return nil
   788  }
   789  func VisitRefOfConstraintDefinition(in *ConstraintDefinition, f Visit) error {
   790  	if in == nil {
   791  		return nil
   792  	}
   793  	if cont, err := f(in); err != nil || !cont {
   794  		return err
   795  	}
   796  	if err := VisitColIdent(in.Name, f); err != nil {
   797  		return err
   798  	}
   799  	if err := VisitConstraintInfo(in.Details, f); err != nil {
   800  		return err
   801  	}
   802  	return nil
   803  }
   804  func VisitRefOfConvertExpr(in *ConvertExpr, f Visit) error {
   805  	if in == nil {
   806  		return nil
   807  	}
   808  	if cont, err := f(in); err != nil || !cont {
   809  		return err
   810  	}
   811  	if err := VisitExpr(in.Expr, f); err != nil {
   812  		return err
   813  	}
   814  	if err := VisitRefOfConvertType(in.Type, f); err != nil {
   815  		return err
   816  	}
   817  	return nil
   818  }
   819  func VisitRefOfConvertType(in *ConvertType, f Visit) error {
   820  	if in == nil {
   821  		return nil
   822  	}
   823  	if cont, err := f(in); err != nil || !cont {
   824  		return err
   825  	}
   826  	if err := VisitRefOfLiteral(in.Length, f); err != nil {
   827  		return err
   828  	}
   829  	if err := VisitRefOfLiteral(in.Scale, f); err != nil {
   830  		return err
   831  	}
   832  	return nil
   833  }
   834  func VisitRefOfConvertUsingExpr(in *ConvertUsingExpr, f Visit) error {
   835  	if in == nil {
   836  		return nil
   837  	}
   838  	if cont, err := f(in); err != nil || !cont {
   839  		return err
   840  	}
   841  	if err := VisitExpr(in.Expr, f); err != nil {
   842  		return err
   843  	}
   844  	return nil
   845  }
   846  func VisitRefOfCreateDatabase(in *CreateDatabase, f Visit) error {
   847  	if in == nil {
   848  		return nil
   849  	}
   850  	if cont, err := f(in); err != nil || !cont {
   851  		return err
   852  	}
   853  	if err := VisitComments(in.Comments, f); err != nil {
   854  		return err
   855  	}
   856  	if err := VisitTableIdent(in.DBName, f); err != nil {
   857  		return err
   858  	}
   859  	return nil
   860  }
   861  func VisitRefOfCreateTable(in *CreateTable, f Visit) error {
   862  	if in == nil {
   863  		return nil
   864  	}
   865  	if cont, err := f(in); err != nil || !cont {
   866  		return err
   867  	}
   868  	if err := VisitTableName(in.Table, f); err != nil {
   869  		return err
   870  	}
   871  	if err := VisitRefOfTableSpec(in.TableSpec, f); err != nil {
   872  		return err
   873  	}
   874  	if err := VisitRefOfOptLike(in.OptLike, f); err != nil {
   875  		return err
   876  	}
   877  	if err := VisitComments(in.Comments, f); err != nil {
   878  		return err
   879  	}
   880  	return nil
   881  }
   882  func VisitRefOfCreateView(in *CreateView, f Visit) error {
   883  	if in == nil {
   884  		return nil
   885  	}
   886  	if cont, err := f(in); err != nil || !cont {
   887  		return err
   888  	}
   889  	if err := VisitTableName(in.ViewName, f); err != nil {
   890  		return err
   891  	}
   892  	if err := VisitColumns(in.Columns, f); err != nil {
   893  		return err
   894  	}
   895  	if err := VisitSelectStatement(in.Select, f); err != nil {
   896  		return err
   897  	}
   898  	return nil
   899  }
   900  func VisitRefOfCurTimeFuncExpr(in *CurTimeFuncExpr, f Visit) error {
   901  	if in == nil {
   902  		return nil
   903  	}
   904  	if cont, err := f(in); err != nil || !cont {
   905  		return err
   906  	}
   907  	if err := VisitColIdent(in.Name, f); err != nil {
   908  		return err
   909  	}
   910  	if err := VisitExpr(in.Fsp, f); err != nil {
   911  		return err
   912  	}
   913  	return nil
   914  }
   915  func VisitRefOfDefault(in *Default, f Visit) error {
   916  	if in == nil {
   917  		return nil
   918  	}
   919  	if cont, err := f(in); err != nil || !cont {
   920  		return err
   921  	}
   922  	return nil
   923  }
   924  func VisitRefOfDelete(in *Delete, f Visit) error {
   925  	if in == nil {
   926  		return nil
   927  	}
   928  	if cont, err := f(in); err != nil || !cont {
   929  		return err
   930  	}
   931  	if err := VisitRefOfWith(in.With, f); err != nil {
   932  		return err
   933  	}
   934  	if err := VisitComments(in.Comments, f); err != nil {
   935  		return err
   936  	}
   937  	if err := VisitTableNames(in.Targets, f); err != nil {
   938  		return err
   939  	}
   940  	if err := VisitTableExprs(in.TableExprs, f); err != nil {
   941  		return err
   942  	}
   943  	if err := VisitPartitions(in.Partitions, f); err != nil {
   944  		return err
   945  	}
   946  	if err := VisitRefOfWhere(in.Where, f); err != nil {
   947  		return err
   948  	}
   949  	if err := VisitOrderBy(in.OrderBy, f); err != nil {
   950  		return err
   951  	}
   952  	if err := VisitRefOfLimit(in.Limit, f); err != nil {
   953  		return err
   954  	}
   955  	return nil
   956  }
   957  func VisitRefOfDerivedTable(in *DerivedTable, f Visit) error {
   958  	if in == nil {
   959  		return nil
   960  	}
   961  	if cont, err := f(in); err != nil || !cont {
   962  		return err
   963  	}
   964  	if err := VisitSelectStatement(in.Select, f); err != nil {
   965  		return err
   966  	}
   967  	return nil
   968  }
   969  func VisitRefOfDropColumn(in *DropColumn, f Visit) error {
   970  	if in == nil {
   971  		return nil
   972  	}
   973  	if cont, err := f(in); err != nil || !cont {
   974  		return err
   975  	}
   976  	if err := VisitRefOfColName(in.Name, f); err != nil {
   977  		return err
   978  	}
   979  	return nil
   980  }
   981  func VisitRefOfDropDatabase(in *DropDatabase, f Visit) error {
   982  	if in == nil {
   983  		return nil
   984  	}
   985  	if cont, err := f(in); err != nil || !cont {
   986  		return err
   987  	}
   988  	if err := VisitComments(in.Comments, f); err != nil {
   989  		return err
   990  	}
   991  	if err := VisitTableIdent(in.DBName, f); err != nil {
   992  		return err
   993  	}
   994  	return nil
   995  }
   996  func VisitRefOfDropKey(in *DropKey, f Visit) error {
   997  	if in == nil {
   998  		return nil
   999  	}
  1000  	if cont, err := f(in); err != nil || !cont {
  1001  		return err
  1002  	}
  1003  	if err := VisitColIdent(in.Name, f); err != nil {
  1004  		return err
  1005  	}
  1006  	return nil
  1007  }
  1008  func VisitRefOfDropTable(in *DropTable, f Visit) error {
  1009  	if in == nil {
  1010  		return nil
  1011  	}
  1012  	if cont, err := f(in); err != nil || !cont {
  1013  		return err
  1014  	}
  1015  	if err := VisitTableNames(in.FromTables, f); err != nil {
  1016  		return err
  1017  	}
  1018  	if err := VisitComments(in.Comments, f); err != nil {
  1019  		return err
  1020  	}
  1021  	return nil
  1022  }
  1023  func VisitRefOfDropView(in *DropView, f Visit) error {
  1024  	if in == nil {
  1025  		return nil
  1026  	}
  1027  	if cont, err := f(in); err != nil || !cont {
  1028  		return err
  1029  	}
  1030  	if err := VisitTableNames(in.FromTables, f); err != nil {
  1031  		return err
  1032  	}
  1033  	return nil
  1034  }
  1035  func VisitRefOfExistsExpr(in *ExistsExpr, f Visit) error {
  1036  	if in == nil {
  1037  		return nil
  1038  	}
  1039  	if cont, err := f(in); err != nil || !cont {
  1040  		return err
  1041  	}
  1042  	if err := VisitRefOfSubquery(in.Subquery, f); err != nil {
  1043  		return err
  1044  	}
  1045  	return nil
  1046  }
  1047  func VisitRefOfExplainStmt(in *ExplainStmt, f Visit) error {
  1048  	if in == nil {
  1049  		return nil
  1050  	}
  1051  	if cont, err := f(in); err != nil || !cont {
  1052  		return err
  1053  	}
  1054  	if err := VisitStatement(in.Statement, f); err != nil {
  1055  		return err
  1056  	}
  1057  	return nil
  1058  }
  1059  func VisitRefOfExplainTab(in *ExplainTab, f Visit) error {
  1060  	if in == nil {
  1061  		return nil
  1062  	}
  1063  	if cont, err := f(in); err != nil || !cont {
  1064  		return err
  1065  	}
  1066  	if err := VisitTableName(in.Table, f); err != nil {
  1067  		return err
  1068  	}
  1069  	return nil
  1070  }
  1071  func VisitRefOfExprOrColumns(in *ExprOrColumns, f Visit) error {
  1072  	if in == nil {
  1073  		return nil
  1074  	}
  1075  	if cont, err := f(in); err != nil || !cont {
  1076  		return err
  1077  	}
  1078  	if err := VisitExpr(in.Expr, f); err != nil {
  1079  		return err
  1080  	}
  1081  	if err := VisitColumns(in.ColumnList, f); err != nil {
  1082  		return err
  1083  	}
  1084  	return nil
  1085  }
  1086  func VisitExprs(in Exprs, f Visit) error {
  1087  	if in == nil {
  1088  		return nil
  1089  	}
  1090  	if cont, err := f(in); err != nil || !cont {
  1091  		return err
  1092  	}
  1093  	for _, el := range in {
  1094  		if err := VisitExpr(el, f); err != nil {
  1095  			return err
  1096  		}
  1097  	}
  1098  	return nil
  1099  }
  1100  func VisitRefOfExtractFuncExpr(in *ExtractFuncExpr, f Visit) error {
  1101  	if in == nil {
  1102  		return nil
  1103  	}
  1104  	if cont, err := f(in); err != nil || !cont {
  1105  		return err
  1106  	}
  1107  	if err := VisitExpr(in.Expr, f); err != nil {
  1108  		return err
  1109  	}
  1110  	return nil
  1111  }
  1112  func VisitRefOfExtractedSubquery(in *ExtractedSubquery, f Visit) error {
  1113  	if in == nil {
  1114  		return nil
  1115  	}
  1116  	if cont, err := f(in); err != nil || !cont {
  1117  		return err
  1118  	}
  1119  	if err := VisitExpr(in.Original, f); err != nil {
  1120  		return err
  1121  	}
  1122  	if err := VisitRefOfSubquery(in.Subquery, f); err != nil {
  1123  		return err
  1124  	}
  1125  	if err := VisitExpr(in.OtherSide, f); err != nil {
  1126  		return err
  1127  	}
  1128  	if err := VisitExpr(in.alternative, f); err != nil {
  1129  		return err
  1130  	}
  1131  	return nil
  1132  }
  1133  func VisitRefOfFlush(in *Flush, f Visit) error {
  1134  	if in == nil {
  1135  		return nil
  1136  	}
  1137  	if cont, err := f(in); err != nil || !cont {
  1138  		return err
  1139  	}
  1140  	if err := VisitTableNames(in.TableNames, f); err != nil {
  1141  		return err
  1142  	}
  1143  	return nil
  1144  }
  1145  func VisitRefOfForce(in *Force, f Visit) error {
  1146  	if in == nil {
  1147  		return nil
  1148  	}
  1149  	if cont, err := f(in); err != nil || !cont {
  1150  		return err
  1151  	}
  1152  	return nil
  1153  }
  1154  func VisitRefOfForeignKeyDefinition(in *ForeignKeyDefinition, f Visit) error {
  1155  	if in == nil {
  1156  		return nil
  1157  	}
  1158  	if cont, err := f(in); err != nil || !cont {
  1159  		return err
  1160  	}
  1161  	if err := VisitColumns(in.Source, f); err != nil {
  1162  		return err
  1163  	}
  1164  	if err := VisitColIdent(in.IndexName, f); err != nil {
  1165  		return err
  1166  	}
  1167  	if err := VisitRefOfReferenceDefinition(in.ReferenceDefinition, f); err != nil {
  1168  		return err
  1169  	}
  1170  	return nil
  1171  }
  1172  func VisitRefOfFuncExpr(in *FuncExpr, f Visit) error {
  1173  	if in == nil {
  1174  		return nil
  1175  	}
  1176  	if cont, err := f(in); err != nil || !cont {
  1177  		return err
  1178  	}
  1179  	if err := VisitTableIdent(in.Qualifier, f); err != nil {
  1180  		return err
  1181  	}
  1182  	if err := VisitColIdent(in.Name, f); err != nil {
  1183  		return err
  1184  	}
  1185  	if err := VisitSelectExprs(in.Exprs, f); err != nil {
  1186  		return err
  1187  	}
  1188  	return nil
  1189  }
  1190  func VisitGroupBy(in GroupBy, f Visit) error {
  1191  	if in == nil {
  1192  		return nil
  1193  	}
  1194  	if cont, err := f(in); err != nil || !cont {
  1195  		return err
  1196  	}
  1197  	for _, el := range in {
  1198  		if err := VisitExpr(el, f); err != nil {
  1199  			return err
  1200  		}
  1201  	}
  1202  	return nil
  1203  }
  1204  func VisitRefOfGroupConcatExpr(in *GroupConcatExpr, f Visit) error {
  1205  	if in == nil {
  1206  		return nil
  1207  	}
  1208  	if cont, err := f(in); err != nil || !cont {
  1209  		return err
  1210  	}
  1211  	if err := VisitSelectExprs(in.Exprs, f); err != nil {
  1212  		return err
  1213  	}
  1214  	if err := VisitOrderBy(in.OrderBy, f); err != nil {
  1215  		return err
  1216  	}
  1217  	if err := VisitRefOfLimit(in.Limit, f); err != nil {
  1218  		return err
  1219  	}
  1220  	return nil
  1221  }
  1222  func VisitRefOfIndexDefinition(in *IndexDefinition, f Visit) error {
  1223  	if in == nil {
  1224  		return nil
  1225  	}
  1226  	if cont, err := f(in); err != nil || !cont {
  1227  		return err
  1228  	}
  1229  	if err := VisitRefOfIndexInfo(in.Info, f); err != nil {
  1230  		return err
  1231  	}
  1232  	return nil
  1233  }
  1234  func VisitRefOfIndexHints(in *IndexHints, f Visit) error {
  1235  	if in == nil {
  1236  		return nil
  1237  	}
  1238  	if cont, err := f(in); err != nil || !cont {
  1239  		return err
  1240  	}
  1241  	for _, el := range in.Indexes {
  1242  		if err := VisitColIdent(el, f); err != nil {
  1243  			return err
  1244  		}
  1245  	}
  1246  	return nil
  1247  }
  1248  func VisitRefOfIndexInfo(in *IndexInfo, f Visit) error {
  1249  	if in == nil {
  1250  		return nil
  1251  	}
  1252  	if cont, err := f(in); err != nil || !cont {
  1253  		return err
  1254  	}
  1255  	if err := VisitColIdent(in.Name, f); err != nil {
  1256  		return err
  1257  	}
  1258  	if err := VisitColIdent(in.ConstraintName, f); err != nil {
  1259  		return err
  1260  	}
  1261  	return nil
  1262  }
  1263  func VisitRefOfInsert(in *Insert, f Visit) error {
  1264  	if in == nil {
  1265  		return nil
  1266  	}
  1267  	if cont, err := f(in); err != nil || !cont {
  1268  		return err
  1269  	}
  1270  	if err := VisitComments(in.Comments, f); err != nil {
  1271  		return err
  1272  	}
  1273  	if err := VisitTableName(in.Table, f); err != nil {
  1274  		return err
  1275  	}
  1276  	if err := VisitPartitions(in.Partitions, f); err != nil {
  1277  		return err
  1278  	}
  1279  	if err := VisitColumns(in.Columns, f); err != nil {
  1280  		return err
  1281  	}
  1282  	if err := VisitInsertRows(in.Rows, f); err != nil {
  1283  		return err
  1284  	}
  1285  	if err := VisitOnDup(in.OnDup, f); err != nil {
  1286  		return err
  1287  	}
  1288  	return nil
  1289  }
  1290  func VisitRefOfIntervalExpr(in *IntervalExpr, f Visit) error {
  1291  	if in == nil {
  1292  		return nil
  1293  	}
  1294  	if cont, err := f(in); err != nil || !cont {
  1295  		return err
  1296  	}
  1297  	if err := VisitExpr(in.Expr, f); err != nil {
  1298  		return err
  1299  	}
  1300  	return nil
  1301  }
  1302  func VisitRefOfIntroducerExpr(in *IntroducerExpr, f Visit) error {
  1303  	if in == nil {
  1304  		return nil
  1305  	}
  1306  	if cont, err := f(in); err != nil || !cont {
  1307  		return err
  1308  	}
  1309  	if err := VisitExpr(in.Expr, f); err != nil {
  1310  		return err
  1311  	}
  1312  	return nil
  1313  }
  1314  func VisitRefOfIsExpr(in *IsExpr, f Visit) error {
  1315  	if in == nil {
  1316  		return nil
  1317  	}
  1318  	if cont, err := f(in); err != nil || !cont {
  1319  		return err
  1320  	}
  1321  	if err := VisitExpr(in.Left, f); err != nil {
  1322  		return err
  1323  	}
  1324  	return nil
  1325  }
  1326  func VisitRefOfJoinCondition(in *JoinCondition, f Visit) error {
  1327  	if in == nil {
  1328  		return nil
  1329  	}
  1330  	if cont, err := f(in); err != nil || !cont {
  1331  		return err
  1332  	}
  1333  	if err := VisitExpr(in.On, f); err != nil {
  1334  		return err
  1335  	}
  1336  	if err := VisitColumns(in.Using, f); err != nil {
  1337  		return err
  1338  	}
  1339  	return nil
  1340  }
  1341  func VisitRefOfJoinTableExpr(in *JoinTableExpr, f Visit) error {
  1342  	if in == nil {
  1343  		return nil
  1344  	}
  1345  	if cont, err := f(in); err != nil || !cont {
  1346  		return err
  1347  	}
  1348  	if err := VisitTableExpr(in.LeftExpr, f); err != nil {
  1349  		return err
  1350  	}
  1351  	if err := VisitTableExpr(in.RightExpr, f); err != nil {
  1352  		return err
  1353  	}
  1354  	if err := VisitRefOfJoinCondition(in.Condition, f); err != nil {
  1355  		return err
  1356  	}
  1357  	return nil
  1358  }
  1359  func VisitRefOfKeyState(in *KeyState, f Visit) error {
  1360  	if in == nil {
  1361  		return nil
  1362  	}
  1363  	if cont, err := f(in); err != nil || !cont {
  1364  		return err
  1365  	}
  1366  	return nil
  1367  }
  1368  func VisitRefOfLimit(in *Limit, f Visit) error {
  1369  	if in == nil {
  1370  		return nil
  1371  	}
  1372  	if cont, err := f(in); err != nil || !cont {
  1373  		return err
  1374  	}
  1375  	if err := VisitExpr(in.Offset, f); err != nil {
  1376  		return err
  1377  	}
  1378  	if err := VisitExpr(in.Rowcount, f); err != nil {
  1379  		return err
  1380  	}
  1381  	return nil
  1382  }
  1383  func VisitRefOfLiteral(in *Literal, f Visit) error {
  1384  	if in == nil {
  1385  		return nil
  1386  	}
  1387  	if cont, err := f(in); err != nil || !cont {
  1388  		return err
  1389  	}
  1390  	return nil
  1391  }
  1392  func VisitRefOfLoad(in *Load, f Visit) error {
  1393  	if in == nil {
  1394  		return nil
  1395  	}
  1396  	if cont, err := f(in); err != nil || !cont {
  1397  		return err
  1398  	}
  1399  	return nil
  1400  }
  1401  func VisitRefOfLockOption(in *LockOption, f Visit) error {
  1402  	if in == nil {
  1403  		return nil
  1404  	}
  1405  	if cont, err := f(in); err != nil || !cont {
  1406  		return err
  1407  	}
  1408  	return nil
  1409  }
  1410  func VisitRefOfLockTables(in *LockTables, f Visit) error {
  1411  	if in == nil {
  1412  		return nil
  1413  	}
  1414  	if cont, err := f(in); err != nil || !cont {
  1415  		return err
  1416  	}
  1417  	return nil
  1418  }
  1419  func VisitRefOfMatchExpr(in *MatchExpr, f Visit) error {
  1420  	if in == nil {
  1421  		return nil
  1422  	}
  1423  	if cont, err := f(in); err != nil || !cont {
  1424  		return err
  1425  	}
  1426  	if err := VisitSelectExprs(in.Columns, f); err != nil {
  1427  		return err
  1428  	}
  1429  	if err := VisitExpr(in.Expr, f); err != nil {
  1430  		return err
  1431  	}
  1432  	return nil
  1433  }
  1434  func VisitRefOfModifyColumn(in *ModifyColumn, f Visit) error {
  1435  	if in == nil {
  1436  		return nil
  1437  	}
  1438  	if cont, err := f(in); err != nil || !cont {
  1439  		return err
  1440  	}
  1441  	if err := VisitRefOfColumnDefinition(in.NewColDefinition, f); err != nil {
  1442  		return err
  1443  	}
  1444  	if err := VisitRefOfColName(in.After, f); err != nil {
  1445  		return err
  1446  	}
  1447  	return nil
  1448  }
  1449  func VisitRefOfNextval(in *Nextval, f Visit) error {
  1450  	if in == nil {
  1451  		return nil
  1452  	}
  1453  	if cont, err := f(in); err != nil || !cont {
  1454  		return err
  1455  	}
  1456  	if err := VisitExpr(in.Expr, f); err != nil {
  1457  		return err
  1458  	}
  1459  	return nil
  1460  }
  1461  func VisitRefOfNotExpr(in *NotExpr, f Visit) error {
  1462  	if in == nil {
  1463  		return nil
  1464  	}
  1465  	if cont, err := f(in); err != nil || !cont {
  1466  		return err
  1467  	}
  1468  	if err := VisitExpr(in.Expr, f); err != nil {
  1469  		return err
  1470  	}
  1471  	return nil
  1472  }
  1473  func VisitRefOfNullVal(in *NullVal, f Visit) error {
  1474  	if in == nil {
  1475  		return nil
  1476  	}
  1477  	if cont, err := f(in); err != nil || !cont {
  1478  		return err
  1479  	}
  1480  	return nil
  1481  }
  1482  func VisitOnDup(in OnDup, f Visit) error {
  1483  	if in == nil {
  1484  		return nil
  1485  	}
  1486  	if cont, err := f(in); err != nil || !cont {
  1487  		return err
  1488  	}
  1489  	for _, el := range in {
  1490  		if err := VisitRefOfUpdateExpr(el, f); err != nil {
  1491  			return err
  1492  		}
  1493  	}
  1494  	return nil
  1495  }
  1496  func VisitRefOfOptLike(in *OptLike, f Visit) error {
  1497  	if in == nil {
  1498  		return nil
  1499  	}
  1500  	if cont, err := f(in); err != nil || !cont {
  1501  		return err
  1502  	}
  1503  	if err := VisitTableName(in.LikeTable, f); err != nil {
  1504  		return err
  1505  	}
  1506  	return nil
  1507  }
  1508  func VisitRefOfOrExpr(in *OrExpr, f Visit) error {
  1509  	if in == nil {
  1510  		return nil
  1511  	}
  1512  	if cont, err := f(in); err != nil || !cont {
  1513  		return err
  1514  	}
  1515  	if err := VisitExpr(in.Left, f); err != nil {
  1516  		return err
  1517  	}
  1518  	if err := VisitExpr(in.Right, f); err != nil {
  1519  		return err
  1520  	}
  1521  	return nil
  1522  }
  1523  func VisitRefOfOrder(in *Order, f Visit) error {
  1524  	if in == nil {
  1525  		return nil
  1526  	}
  1527  	if cont, err := f(in); err != nil || !cont {
  1528  		return err
  1529  	}
  1530  	if err := VisitExpr(in.Expr, f); err != nil {
  1531  		return err
  1532  	}
  1533  	return nil
  1534  }
  1535  func VisitOrderBy(in OrderBy, f Visit) error {
  1536  	if in == nil {
  1537  		return nil
  1538  	}
  1539  	if cont, err := f(in); err != nil || !cont {
  1540  		return err
  1541  	}
  1542  	for _, el := range in {
  1543  		if err := VisitRefOfOrder(el, f); err != nil {
  1544  			return err
  1545  		}
  1546  	}
  1547  	return nil
  1548  }
  1549  func VisitRefOfOrderByOption(in *OrderByOption, f Visit) error {
  1550  	if in == nil {
  1551  		return nil
  1552  	}
  1553  	if cont, err := f(in); err != nil || !cont {
  1554  		return err
  1555  	}
  1556  	if err := VisitColumns(in.Cols, f); err != nil {
  1557  		return err
  1558  	}
  1559  	return nil
  1560  }
  1561  func VisitRefOfOtherAdmin(in *OtherAdmin, f Visit) error {
  1562  	if in == nil {
  1563  		return nil
  1564  	}
  1565  	if cont, err := f(in); err != nil || !cont {
  1566  		return err
  1567  	}
  1568  	return nil
  1569  }
  1570  func VisitRefOfOtherRead(in *OtherRead, f Visit) error {
  1571  	if in == nil {
  1572  		return nil
  1573  	}
  1574  	if cont, err := f(in); err != nil || !cont {
  1575  		return err
  1576  	}
  1577  	return nil
  1578  }
  1579  func VisitRefOfParenTableExpr(in *ParenTableExpr, f Visit) error {
  1580  	if in == nil {
  1581  		return nil
  1582  	}
  1583  	if cont, err := f(in); err != nil || !cont {
  1584  		return err
  1585  	}
  1586  	if err := VisitTableExprs(in.Exprs, f); err != nil {
  1587  		return err
  1588  	}
  1589  	return nil
  1590  }
  1591  func VisitRefOfPartitionDefinition(in *PartitionDefinition, f Visit) error {
  1592  	if in == nil {
  1593  		return nil
  1594  	}
  1595  	if cont, err := f(in); err != nil || !cont {
  1596  		return err
  1597  	}
  1598  	if err := VisitColIdent(in.Name, f); err != nil {
  1599  		return err
  1600  	}
  1601  	if err := VisitExpr(in.Limit, f); err != nil {
  1602  		return err
  1603  	}
  1604  	return nil
  1605  }
  1606  func VisitRefOfPartitionOption(in *PartitionOption, f Visit) error {
  1607  	if in == nil {
  1608  		return nil
  1609  	}
  1610  	if cont, err := f(in); err != nil || !cont {
  1611  		return err
  1612  	}
  1613  	if err := VisitColumns(in.KeyColList, f); err != nil {
  1614  		return err
  1615  	}
  1616  	if err := VisitRefOfExprOrColumns(in.ExprOrCol, f); err != nil {
  1617  		return err
  1618  	}
  1619  	if err := VisitExpr(in.Expr, f); err != nil {
  1620  		return err
  1621  	}
  1622  	if err := VisitRefOfSubPartition(in.SubPartition, f); err != nil {
  1623  		return err
  1624  	}
  1625  	for _, el := range in.Definitions {
  1626  		if err := VisitRefOfPartitionDefinition(el, f); err != nil {
  1627  			return err
  1628  		}
  1629  	}
  1630  	return nil
  1631  }
  1632  func VisitRefOfPartitionSpec(in *PartitionSpec, f Visit) error {
  1633  	if in == nil {
  1634  		return nil
  1635  	}
  1636  	if cont, err := f(in); err != nil || !cont {
  1637  		return err
  1638  	}
  1639  	if err := VisitPartitions(in.Names, f); err != nil {
  1640  		return err
  1641  	}
  1642  	if err := VisitRefOfLiteral(in.Number, f); err != nil {
  1643  		return err
  1644  	}
  1645  	if err := VisitTableName(in.TableName, f); err != nil {
  1646  		return err
  1647  	}
  1648  	for _, el := range in.Definitions {
  1649  		if err := VisitRefOfPartitionDefinition(el, f); err != nil {
  1650  			return err
  1651  		}
  1652  	}
  1653  	return nil
  1654  }
  1655  func VisitPartitions(in Partitions, f Visit) error {
  1656  	if in == nil {
  1657  		return nil
  1658  	}
  1659  	if cont, err := f(in); err != nil || !cont {
  1660  		return err
  1661  	}
  1662  	for _, el := range in {
  1663  		if err := VisitColIdent(el, f); err != nil {
  1664  			return err
  1665  		}
  1666  	}
  1667  	return nil
  1668  }
  1669  func VisitRefOfReferenceDefinition(in *ReferenceDefinition, f Visit) error {
  1670  	if in == nil {
  1671  		return nil
  1672  	}
  1673  	if cont, err := f(in); err != nil || !cont {
  1674  		return err
  1675  	}
  1676  	if err := VisitTableName(in.ReferencedTable, f); err != nil {
  1677  		return err
  1678  	}
  1679  	if err := VisitColumns(in.ReferencedColumns, f); err != nil {
  1680  		return err
  1681  	}
  1682  	if err := VisitReferenceAction(in.OnDelete, f); err != nil {
  1683  		return err
  1684  	}
  1685  	if err := VisitReferenceAction(in.OnUpdate, f); err != nil {
  1686  		return err
  1687  	}
  1688  	return nil
  1689  }
  1690  func VisitRefOfRelease(in *Release, f Visit) error {
  1691  	if in == nil {
  1692  		return nil
  1693  	}
  1694  	if cont, err := f(in); err != nil || !cont {
  1695  		return err
  1696  	}
  1697  	if err := VisitColIdent(in.Name, f); err != nil {
  1698  		return err
  1699  	}
  1700  	return nil
  1701  }
  1702  func VisitRefOfRenameIndex(in *RenameIndex, f Visit) error {
  1703  	if in == nil {
  1704  		return nil
  1705  	}
  1706  	if cont, err := f(in); err != nil || !cont {
  1707  		return err
  1708  	}
  1709  	if err := VisitColIdent(in.OldName, f); err != nil {
  1710  		return err
  1711  	}
  1712  	if err := VisitColIdent(in.NewName, f); err != nil {
  1713  		return err
  1714  	}
  1715  	return nil
  1716  }
  1717  func VisitRefOfRenameTable(in *RenameTable, f Visit) error {
  1718  	if in == nil {
  1719  		return nil
  1720  	}
  1721  	if cont, err := f(in); err != nil || !cont {
  1722  		return err
  1723  	}
  1724  	return nil
  1725  }
  1726  func VisitRefOfRenameTableName(in *RenameTableName, f Visit) error {
  1727  	if in == nil {
  1728  		return nil
  1729  	}
  1730  	if cont, err := f(in); err != nil || !cont {
  1731  		return err
  1732  	}
  1733  	if err := VisitTableName(in.Table, f); err != nil {
  1734  		return err
  1735  	}
  1736  	return nil
  1737  }
  1738  func VisitRefOfRevertMigration(in *RevertMigration, f Visit) error {
  1739  	if in == nil {
  1740  		return nil
  1741  	}
  1742  	if cont, err := f(in); err != nil || !cont {
  1743  		return err
  1744  	}
  1745  	if err := VisitComments(in.Comments, f); err != nil {
  1746  		return err
  1747  	}
  1748  	return nil
  1749  }
  1750  func VisitRefOfRollback(in *Rollback, f Visit) error {
  1751  	if in == nil {
  1752  		return nil
  1753  	}
  1754  	if cont, err := f(in); err != nil || !cont {
  1755  		return err
  1756  	}
  1757  	return nil
  1758  }
  1759  func VisitRootNode(in RootNode, f Visit) error {
  1760  	if cont, err := f(in); err != nil || !cont {
  1761  		return err
  1762  	}
  1763  	if err := VisitSQLNode(in.SQLNode, f); err != nil {
  1764  		return err
  1765  	}
  1766  	return nil
  1767  }
  1768  func VisitRefOfSRollback(in *SRollback, f Visit) error {
  1769  	if in == nil {
  1770  		return nil
  1771  	}
  1772  	if cont, err := f(in); err != nil || !cont {
  1773  		return err
  1774  	}
  1775  	if err := VisitColIdent(in.Name, f); err != nil {
  1776  		return err
  1777  	}
  1778  	return nil
  1779  }
  1780  func VisitRefOfSavepoint(in *Savepoint, f Visit) error {
  1781  	if in == nil {
  1782  		return nil
  1783  	}
  1784  	if cont, err := f(in); err != nil || !cont {
  1785  		return err
  1786  	}
  1787  	if err := VisitColIdent(in.Name, f); err != nil {
  1788  		return err
  1789  	}
  1790  	return nil
  1791  }
  1792  func VisitRefOfSelect(in *Select, f Visit) error {
  1793  	if in == nil {
  1794  		return nil
  1795  	}
  1796  	if cont, err := f(in); err != nil || !cont {
  1797  		return err
  1798  	}
  1799  	for _, el := range in.From {
  1800  		if err := VisitTableExpr(el, f); err != nil {
  1801  			return err
  1802  		}
  1803  	}
  1804  	if err := VisitComments(in.Comments, f); err != nil {
  1805  		return err
  1806  	}
  1807  	if err := VisitSelectExprs(in.SelectExprs, f); err != nil {
  1808  		return err
  1809  	}
  1810  	if err := VisitRefOfWhere(in.Where, f); err != nil {
  1811  		return err
  1812  	}
  1813  	if err := VisitRefOfWith(in.With, f); err != nil {
  1814  		return err
  1815  	}
  1816  	if err := VisitGroupBy(in.GroupBy, f); err != nil {
  1817  		return err
  1818  	}
  1819  	if err := VisitRefOfWhere(in.Having, f); err != nil {
  1820  		return err
  1821  	}
  1822  	if err := VisitOrderBy(in.OrderBy, f); err != nil {
  1823  		return err
  1824  	}
  1825  	if err := VisitRefOfLimit(in.Limit, f); err != nil {
  1826  		return err
  1827  	}
  1828  	if err := VisitRefOfSelectInto(in.Into, f); err != nil {
  1829  		return err
  1830  	}
  1831  	return nil
  1832  }
  1833  func VisitSelectExprs(in SelectExprs, f Visit) error {
  1834  	if in == nil {
  1835  		return nil
  1836  	}
  1837  	if cont, err := f(in); err != nil || !cont {
  1838  		return err
  1839  	}
  1840  	for _, el := range in {
  1841  		if err := VisitSelectExpr(el, f); err != nil {
  1842  			return err
  1843  		}
  1844  	}
  1845  	return nil
  1846  }
  1847  func VisitRefOfSelectInto(in *SelectInto, f Visit) error {
  1848  	if in == nil {
  1849  		return nil
  1850  	}
  1851  	if cont, err := f(in); err != nil || !cont {
  1852  		return err
  1853  	}
  1854  	return nil
  1855  }
  1856  func VisitRefOfSet(in *Set, f Visit) error {
  1857  	if in == nil {
  1858  		return nil
  1859  	}
  1860  	if cont, err := f(in); err != nil || !cont {
  1861  		return err
  1862  	}
  1863  	if err := VisitComments(in.Comments, f); err != nil {
  1864  		return err
  1865  	}
  1866  	if err := VisitSetExprs(in.Exprs, f); err != nil {
  1867  		return err
  1868  	}
  1869  	return nil
  1870  }
  1871  func VisitRefOfSetExpr(in *SetExpr, f Visit) error {
  1872  	if in == nil {
  1873  		return nil
  1874  	}
  1875  	if cont, err := f(in); err != nil || !cont {
  1876  		return err
  1877  	}
  1878  	if err := VisitColIdent(in.Name, f); err != nil {
  1879  		return err
  1880  	}
  1881  	if err := VisitExpr(in.Expr, f); err != nil {
  1882  		return err
  1883  	}
  1884  	return nil
  1885  }
  1886  func VisitSetExprs(in SetExprs, f Visit) error {
  1887  	if in == nil {
  1888  		return nil
  1889  	}
  1890  	if cont, err := f(in); err != nil || !cont {
  1891  		return err
  1892  	}
  1893  	for _, el := range in {
  1894  		if err := VisitRefOfSetExpr(el, f); err != nil {
  1895  			return err
  1896  		}
  1897  	}
  1898  	return nil
  1899  }
  1900  func VisitRefOfSetTransaction(in *SetTransaction, f Visit) error {
  1901  	if in == nil {
  1902  		return nil
  1903  	}
  1904  	if cont, err := f(in); err != nil || !cont {
  1905  		return err
  1906  	}
  1907  	if err := VisitSQLNode(in.SQLNode, f); err != nil {
  1908  		return err
  1909  	}
  1910  	if err := VisitComments(in.Comments, f); err != nil {
  1911  		return err
  1912  	}
  1913  	for _, el := range in.Characteristics {
  1914  		if err := VisitCharacteristic(el, f); err != nil {
  1915  			return err
  1916  		}
  1917  	}
  1918  	return nil
  1919  }
  1920  func VisitRefOfShow(in *Show, f Visit) error {
  1921  	if in == nil {
  1922  		return nil
  1923  	}
  1924  	if cont, err := f(in); err != nil || !cont {
  1925  		return err
  1926  	}
  1927  	if err := VisitShowInternal(in.Internal, f); err != nil {
  1928  		return err
  1929  	}
  1930  	return nil
  1931  }
  1932  func VisitRefOfShowBasic(in *ShowBasic, f Visit) error {
  1933  	if in == nil {
  1934  		return nil
  1935  	}
  1936  	if cont, err := f(in); err != nil || !cont {
  1937  		return err
  1938  	}
  1939  	if err := VisitTableName(in.Tbl, f); err != nil {
  1940  		return err
  1941  	}
  1942  	if err := VisitTableIdent(in.DbName, f); err != nil {
  1943  		return err
  1944  	}
  1945  	if err := VisitRefOfShowFilter(in.Filter, f); err != nil {
  1946  		return err
  1947  	}
  1948  	return nil
  1949  }
  1950  func VisitRefOfShowCreate(in *ShowCreate, f Visit) error {
  1951  	if in == nil {
  1952  		return nil
  1953  	}
  1954  	if cont, err := f(in); err != nil || !cont {
  1955  		return err
  1956  	}
  1957  	if err := VisitTableName(in.Op, f); err != nil {
  1958  		return err
  1959  	}
  1960  	return nil
  1961  }
  1962  func VisitRefOfShowFilter(in *ShowFilter, f Visit) error {
  1963  	if in == nil {
  1964  		return nil
  1965  	}
  1966  	if cont, err := f(in); err != nil || !cont {
  1967  		return err
  1968  	}
  1969  	if err := VisitExpr(in.Filter, f); err != nil {
  1970  		return err
  1971  	}
  1972  	return nil
  1973  }
  1974  func VisitRefOfShowLegacy(in *ShowLegacy, f Visit) error {
  1975  	if in == nil {
  1976  		return nil
  1977  	}
  1978  	if cont, err := f(in); err != nil || !cont {
  1979  		return err
  1980  	}
  1981  	if err := VisitTableName(in.OnTable, f); err != nil {
  1982  		return err
  1983  	}
  1984  	if err := VisitTableName(in.Table, f); err != nil {
  1985  		return err
  1986  	}
  1987  	if err := VisitExpr(in.ShowCollationFilterOpt, f); err != nil {
  1988  		return err
  1989  	}
  1990  	return nil
  1991  }
  1992  func VisitRefOfShowMigrationLogs(in *ShowMigrationLogs, f Visit) error {
  1993  	if in == nil {
  1994  		return nil
  1995  	}
  1996  	if cont, err := f(in); err != nil || !cont {
  1997  		return err
  1998  	}
  1999  	if err := VisitComments(in.Comments, f); err != nil {
  2000  		return err
  2001  	}
  2002  	return nil
  2003  }
  2004  func VisitRefOfStarExpr(in *StarExpr, f Visit) error {
  2005  	if in == nil {
  2006  		return nil
  2007  	}
  2008  	if cont, err := f(in); err != nil || !cont {
  2009  		return err
  2010  	}
  2011  	if err := VisitTableName(in.TableName, f); err != nil {
  2012  		return err
  2013  	}
  2014  	return nil
  2015  }
  2016  func VisitRefOfStream(in *Stream, f Visit) error {
  2017  	if in == nil {
  2018  		return nil
  2019  	}
  2020  	if cont, err := f(in); err != nil || !cont {
  2021  		return err
  2022  	}
  2023  	if err := VisitComments(in.Comments, f); err != nil {
  2024  		return err
  2025  	}
  2026  	if err := VisitSelectExpr(in.SelectExpr, f); err != nil {
  2027  		return err
  2028  	}
  2029  	if err := VisitTableName(in.Table, f); err != nil {
  2030  		return err
  2031  	}
  2032  	return nil
  2033  }
  2034  func VisitRefOfSubPartition(in *SubPartition, f Visit) error {
  2035  	if in == nil {
  2036  		return nil
  2037  	}
  2038  	if cont, err := f(in); err != nil || !cont {
  2039  		return err
  2040  	}
  2041  	if err := VisitColumns(in.KeyColList, f); err != nil {
  2042  		return err
  2043  	}
  2044  	if err := VisitExpr(in.Expr, f); err != nil {
  2045  		return err
  2046  	}
  2047  	return nil
  2048  }
  2049  func VisitRefOfSubquery(in *Subquery, f Visit) error {
  2050  	if in == nil {
  2051  		return nil
  2052  	}
  2053  	if cont, err := f(in); err != nil || !cont {
  2054  		return err
  2055  	}
  2056  	if err := VisitSelectStatement(in.Select, f); err != nil {
  2057  		return err
  2058  	}
  2059  	return nil
  2060  }
  2061  func VisitRefOfSubstrExpr(in *SubstrExpr, f Visit) error {
  2062  	if in == nil {
  2063  		return nil
  2064  	}
  2065  	if cont, err := f(in); err != nil || !cont {
  2066  		return err
  2067  	}
  2068  	if err := VisitExpr(in.Name, f); err != nil {
  2069  		return err
  2070  	}
  2071  	if err := VisitExpr(in.From, f); err != nil {
  2072  		return err
  2073  	}
  2074  	if err := VisitExpr(in.To, f); err != nil {
  2075  		return err
  2076  	}
  2077  	return nil
  2078  }
  2079  func VisitTableExprs(in TableExprs, f Visit) error {
  2080  	if in == nil {
  2081  		return nil
  2082  	}
  2083  	if cont, err := f(in); err != nil || !cont {
  2084  		return err
  2085  	}
  2086  	for _, el := range in {
  2087  		if err := VisitTableExpr(el, f); err != nil {
  2088  			return err
  2089  		}
  2090  	}
  2091  	return nil
  2092  }
  2093  func VisitTableIdent(in TableIdent, f Visit) error {
  2094  	if cont, err := f(in); err != nil || !cont {
  2095  		return err
  2096  	}
  2097  	return nil
  2098  }
  2099  func VisitTableName(in TableName, f Visit) error {
  2100  	if cont, err := f(in); err != nil || !cont {
  2101  		return err
  2102  	}
  2103  	if err := VisitTableIdent(in.Name, f); err != nil {
  2104  		return err
  2105  	}
  2106  	if err := VisitTableIdent(in.Qualifier, f); err != nil {
  2107  		return err
  2108  	}
  2109  	return nil
  2110  }
  2111  func VisitTableNames(in TableNames, f Visit) error {
  2112  	if in == nil {
  2113  		return nil
  2114  	}
  2115  	if cont, err := f(in); err != nil || !cont {
  2116  		return err
  2117  	}
  2118  	for _, el := range in {
  2119  		if err := VisitTableName(el, f); err != nil {
  2120  			return err
  2121  		}
  2122  	}
  2123  	return nil
  2124  }
  2125  func VisitTableOptions(in TableOptions, f Visit) error {
  2126  	_, err := f(in)
  2127  	return err
  2128  }
  2129  func VisitRefOfTableSpec(in *TableSpec, f Visit) error {
  2130  	if in == nil {
  2131  		return nil
  2132  	}
  2133  	if cont, err := f(in); err != nil || !cont {
  2134  		return err
  2135  	}
  2136  	for _, el := range in.Columns {
  2137  		if err := VisitRefOfColumnDefinition(el, f); err != nil {
  2138  			return err
  2139  		}
  2140  	}
  2141  	for _, el := range in.Indexes {
  2142  		if err := VisitRefOfIndexDefinition(el, f); err != nil {
  2143  			return err
  2144  		}
  2145  	}
  2146  	for _, el := range in.Constraints {
  2147  		if err := VisitRefOfConstraintDefinition(el, f); err != nil {
  2148  			return err
  2149  		}
  2150  	}
  2151  	if err := VisitTableOptions(in.Options, f); err != nil {
  2152  		return err
  2153  	}
  2154  	if err := VisitRefOfPartitionOption(in.PartitionOption, f); err != nil {
  2155  		return err
  2156  	}
  2157  	return nil
  2158  }
  2159  func VisitRefOfTablespaceOperation(in *TablespaceOperation, f Visit) error {
  2160  	if in == nil {
  2161  		return nil
  2162  	}
  2163  	if cont, err := f(in); err != nil || !cont {
  2164  		return err
  2165  	}
  2166  	return nil
  2167  }
  2168  func VisitRefOfTimestampFuncExpr(in *TimestampFuncExpr, f Visit) error {
  2169  	if in == nil {
  2170  		return nil
  2171  	}
  2172  	if cont, err := f(in); err != nil || !cont {
  2173  		return err
  2174  	}
  2175  	if err := VisitExpr(in.Expr1, f); err != nil {
  2176  		return err
  2177  	}
  2178  	if err := VisitExpr(in.Expr2, f); err != nil {
  2179  		return err
  2180  	}
  2181  	return nil
  2182  }
  2183  func VisitRefOfTruncateTable(in *TruncateTable, f Visit) error {
  2184  	if in == nil {
  2185  		return nil
  2186  	}
  2187  	if cont, err := f(in); err != nil || !cont {
  2188  		return err
  2189  	}
  2190  	if err := VisitTableName(in.Table, f); err != nil {
  2191  		return err
  2192  	}
  2193  	return nil
  2194  }
  2195  func VisitRefOfUnaryExpr(in *UnaryExpr, f Visit) error {
  2196  	if in == nil {
  2197  		return nil
  2198  	}
  2199  	if cont, err := f(in); err != nil || !cont {
  2200  		return err
  2201  	}
  2202  	if err := VisitExpr(in.Expr, f); err != nil {
  2203  		return err
  2204  	}
  2205  	return nil
  2206  }
  2207  func VisitRefOfUnion(in *Union, f Visit) error {
  2208  	if in == nil {
  2209  		return nil
  2210  	}
  2211  	if cont, err := f(in); err != nil || !cont {
  2212  		return err
  2213  	}
  2214  	if err := VisitSelectStatement(in.Left, f); err != nil {
  2215  		return err
  2216  	}
  2217  	if err := VisitSelectStatement(in.Right, f); err != nil {
  2218  		return err
  2219  	}
  2220  	if err := VisitOrderBy(in.OrderBy, f); err != nil {
  2221  		return err
  2222  	}
  2223  	if err := VisitRefOfWith(in.With, f); err != nil {
  2224  		return err
  2225  	}
  2226  	if err := VisitRefOfLimit(in.Limit, f); err != nil {
  2227  		return err
  2228  	}
  2229  	if err := VisitRefOfSelectInto(in.Into, f); err != nil {
  2230  		return err
  2231  	}
  2232  	return nil
  2233  }
  2234  func VisitRefOfUnlockTables(in *UnlockTables, f Visit) error {
  2235  	if in == nil {
  2236  		return nil
  2237  	}
  2238  	if cont, err := f(in); err != nil || !cont {
  2239  		return err
  2240  	}
  2241  	return nil
  2242  }
  2243  func VisitRefOfUpdate(in *Update, f Visit) error {
  2244  	if in == nil {
  2245  		return nil
  2246  	}
  2247  	if cont, err := f(in); err != nil || !cont {
  2248  		return err
  2249  	}
  2250  	if err := VisitRefOfWith(in.With, f); err != nil {
  2251  		return err
  2252  	}
  2253  	if err := VisitComments(in.Comments, f); err != nil {
  2254  		return err
  2255  	}
  2256  	if err := VisitTableExprs(in.TableExprs, f); err != nil {
  2257  		return err
  2258  	}
  2259  	if err := VisitUpdateExprs(in.Exprs, f); err != nil {
  2260  		return err
  2261  	}
  2262  	if err := VisitRefOfWhere(in.Where, f); err != nil {
  2263  		return err
  2264  	}
  2265  	if err := VisitOrderBy(in.OrderBy, f); err != nil {
  2266  		return err
  2267  	}
  2268  	if err := VisitRefOfLimit(in.Limit, f); err != nil {
  2269  		return err
  2270  	}
  2271  	return nil
  2272  }
  2273  func VisitRefOfUpdateExpr(in *UpdateExpr, f Visit) error {
  2274  	if in == nil {
  2275  		return nil
  2276  	}
  2277  	if cont, err := f(in); err != nil || !cont {
  2278  		return err
  2279  	}
  2280  	if err := VisitRefOfColName(in.Name, f); err != nil {
  2281  		return err
  2282  	}
  2283  	if err := VisitExpr(in.Expr, f); err != nil {
  2284  		return err
  2285  	}
  2286  	return nil
  2287  }
  2288  func VisitUpdateExprs(in UpdateExprs, f Visit) error {
  2289  	if in == nil {
  2290  		return nil
  2291  	}
  2292  	if cont, err := f(in); err != nil || !cont {
  2293  		return err
  2294  	}
  2295  	for _, el := range in {
  2296  		if err := VisitRefOfUpdateExpr(el, f); err != nil {
  2297  			return err
  2298  		}
  2299  	}
  2300  	return nil
  2301  }
  2302  func VisitRefOfUse(in *Use, f Visit) error {
  2303  	if in == nil {
  2304  		return nil
  2305  	}
  2306  	if cont, err := f(in); err != nil || !cont {
  2307  		return err
  2308  	}
  2309  	if err := VisitTableIdent(in.DBName, f); err != nil {
  2310  		return err
  2311  	}
  2312  	return nil
  2313  }
  2314  func VisitRefOfVStream(in *VStream, f Visit) error {
  2315  	if in == nil {
  2316  		return nil
  2317  	}
  2318  	if cont, err := f(in); err != nil || !cont {
  2319  		return err
  2320  	}
  2321  	if err := VisitComments(in.Comments, f); err != nil {
  2322  		return err
  2323  	}
  2324  	if err := VisitSelectExpr(in.SelectExpr, f); err != nil {
  2325  		return err
  2326  	}
  2327  	if err := VisitTableName(in.Table, f); err != nil {
  2328  		return err
  2329  	}
  2330  	if err := VisitRefOfWhere(in.Where, f); err != nil {
  2331  		return err
  2332  	}
  2333  	if err := VisitRefOfLimit(in.Limit, f); err != nil {
  2334  		return err
  2335  	}
  2336  	return nil
  2337  }
  2338  func VisitValTuple(in ValTuple, f Visit) error {
  2339  	if in == nil {
  2340  		return nil
  2341  	}
  2342  	if cont, err := f(in); err != nil || !cont {
  2343  		return err
  2344  	}
  2345  	for _, el := range in {
  2346  		if err := VisitExpr(el, f); err != nil {
  2347  			return err
  2348  		}
  2349  	}
  2350  	return nil
  2351  }
  2352  func VisitRefOfValidation(in *Validation, f Visit) error {
  2353  	if in == nil {
  2354  		return nil
  2355  	}
  2356  	if cont, err := f(in); err != nil || !cont {
  2357  		return err
  2358  	}
  2359  	return nil
  2360  }
  2361  func VisitValues(in Values, f Visit) error {
  2362  	if in == nil {
  2363  		return nil
  2364  	}
  2365  	if cont, err := f(in); err != nil || !cont {
  2366  		return err
  2367  	}
  2368  	for _, el := range in {
  2369  		if err := VisitValTuple(el, f); err != nil {
  2370  			return err
  2371  		}
  2372  	}
  2373  	return nil
  2374  }
  2375  func VisitRefOfValuesFuncExpr(in *ValuesFuncExpr, f Visit) error {
  2376  	if in == nil {
  2377  		return nil
  2378  	}
  2379  	if cont, err := f(in); err != nil || !cont {
  2380  		return err
  2381  	}
  2382  	if err := VisitRefOfColName(in.Name, f); err != nil {
  2383  		return err
  2384  	}
  2385  	return nil
  2386  }
  2387  func VisitVindexParam(in VindexParam, f Visit) error {
  2388  	if cont, err := f(in); err != nil || !cont {
  2389  		return err
  2390  	}
  2391  	if err := VisitColIdent(in.Key, f); err != nil {
  2392  		return err
  2393  	}
  2394  	return nil
  2395  }
  2396  func VisitRefOfVindexSpec(in *VindexSpec, f Visit) error {
  2397  	if in == nil {
  2398  		return nil
  2399  	}
  2400  	if cont, err := f(in); err != nil || !cont {
  2401  		return err
  2402  	}
  2403  	if err := VisitColIdent(in.Name, f); err != nil {
  2404  		return err
  2405  	}
  2406  	if err := VisitColIdent(in.Type, f); err != nil {
  2407  		return err
  2408  	}
  2409  	for _, el := range in.Params {
  2410  		if err := VisitVindexParam(el, f); err != nil {
  2411  			return err
  2412  		}
  2413  	}
  2414  	return nil
  2415  }
  2416  func VisitRefOfWhen(in *When, f Visit) error {
  2417  	if in == nil {
  2418  		return nil
  2419  	}
  2420  	if cont, err := f(in); err != nil || !cont {
  2421  		return err
  2422  	}
  2423  	if err := VisitExpr(in.Cond, f); err != nil {
  2424  		return err
  2425  	}
  2426  	if err := VisitExpr(in.Val, f); err != nil {
  2427  		return err
  2428  	}
  2429  	return nil
  2430  }
  2431  func VisitRefOfWhere(in *Where, f Visit) error {
  2432  	if in == nil {
  2433  		return nil
  2434  	}
  2435  	if cont, err := f(in); err != nil || !cont {
  2436  		return err
  2437  	}
  2438  	if err := VisitExpr(in.Expr, f); err != nil {
  2439  		return err
  2440  	}
  2441  	return nil
  2442  }
  2443  func VisitRefOfWith(in *With, f Visit) error {
  2444  	if in == nil {
  2445  		return nil
  2446  	}
  2447  	if cont, err := f(in); err != nil || !cont {
  2448  		return err
  2449  	}
  2450  	for _, el := range in.ctes {
  2451  		if err := VisitRefOfCommonTableExpr(el, f); err != nil {
  2452  			return err
  2453  		}
  2454  	}
  2455  	return nil
  2456  }
  2457  func VisitRefOfXorExpr(in *XorExpr, f Visit) error {
  2458  	if in == nil {
  2459  		return nil
  2460  	}
  2461  	if cont, err := f(in); err != nil || !cont {
  2462  		return err
  2463  	}
  2464  	if err := VisitExpr(in.Left, f); err != nil {
  2465  		return err
  2466  	}
  2467  	if err := VisitExpr(in.Right, f); err != nil {
  2468  		return err
  2469  	}
  2470  	return nil
  2471  }
  2472  func VisitAlterOption(in AlterOption, f Visit) error {
  2473  	if in == nil {
  2474  		return nil
  2475  	}
  2476  	switch in := in.(type) {
  2477  	case *AddColumns:
  2478  		return VisitRefOfAddColumns(in, f)
  2479  	case *AddConstraintDefinition:
  2480  		return VisitRefOfAddConstraintDefinition(in, f)
  2481  	case *AddIndexDefinition:
  2482  		return VisitRefOfAddIndexDefinition(in, f)
  2483  	case AlgorithmValue:
  2484  		return VisitAlgorithmValue(in, f)
  2485  	case *AlterCharset:
  2486  		return VisitRefOfAlterCharset(in, f)
  2487  	case *AlterColumn:
  2488  		return VisitRefOfAlterColumn(in, f)
  2489  	case *ChangeColumn:
  2490  		return VisitRefOfChangeColumn(in, f)
  2491  	case *DropColumn:
  2492  		return VisitRefOfDropColumn(in, f)
  2493  	case *DropKey:
  2494  		return VisitRefOfDropKey(in, f)
  2495  	case *Force:
  2496  		return VisitRefOfForce(in, f)
  2497  	case *KeyState:
  2498  		return VisitRefOfKeyState(in, f)
  2499  	case *LockOption:
  2500  		return VisitRefOfLockOption(in, f)
  2501  	case *ModifyColumn:
  2502  		return VisitRefOfModifyColumn(in, f)
  2503  	case *OrderByOption:
  2504  		return VisitRefOfOrderByOption(in, f)
  2505  	case *RenameIndex:
  2506  		return VisitRefOfRenameIndex(in, f)
  2507  	case *RenameTableName:
  2508  		return VisitRefOfRenameTableName(in, f)
  2509  	case TableOptions:
  2510  		return VisitTableOptions(in, f)
  2511  	case *TablespaceOperation:
  2512  		return VisitRefOfTablespaceOperation(in, f)
  2513  	case *Validation:
  2514  		return VisitRefOfValidation(in, f)
  2515  	default:
  2516  		// this should never happen
  2517  		return nil
  2518  	}
  2519  }
  2520  func VisitCharacteristic(in Characteristic, f Visit) error {
  2521  	if in == nil {
  2522  		return nil
  2523  	}
  2524  	switch in := in.(type) {
  2525  	case AccessMode:
  2526  		return VisitAccessMode(in, f)
  2527  	case IsolationLevel:
  2528  		return VisitIsolationLevel(in, f)
  2529  	default:
  2530  		// this should never happen
  2531  		return nil
  2532  	}
  2533  }
  2534  func VisitColTuple(in ColTuple, f Visit) error {
  2535  	if in == nil {
  2536  		return nil
  2537  	}
  2538  	switch in := in.(type) {
  2539  	case ListArg:
  2540  		return VisitListArg(in, f)
  2541  	case *Subquery:
  2542  		return VisitRefOfSubquery(in, f)
  2543  	case ValTuple:
  2544  		return VisitValTuple(in, f)
  2545  	default:
  2546  		// this should never happen
  2547  		return nil
  2548  	}
  2549  }
  2550  func VisitConstraintInfo(in ConstraintInfo, f Visit) error {
  2551  	if in == nil {
  2552  		return nil
  2553  	}
  2554  	switch in := in.(type) {
  2555  	case *CheckConstraintDefinition:
  2556  		return VisitRefOfCheckConstraintDefinition(in, f)
  2557  	case *ForeignKeyDefinition:
  2558  		return VisitRefOfForeignKeyDefinition(in, f)
  2559  	default:
  2560  		// this should never happen
  2561  		return nil
  2562  	}
  2563  }
  2564  func VisitDBDDLStatement(in DBDDLStatement, f Visit) error {
  2565  	if in == nil {
  2566  		return nil
  2567  	}
  2568  	switch in := in.(type) {
  2569  	case *AlterDatabase:
  2570  		return VisitRefOfAlterDatabase(in, f)
  2571  	case *CreateDatabase:
  2572  		return VisitRefOfCreateDatabase(in, f)
  2573  	case *DropDatabase:
  2574  		return VisitRefOfDropDatabase(in, f)
  2575  	default:
  2576  		// this should never happen
  2577  		return nil
  2578  	}
  2579  }
  2580  func VisitDDLStatement(in DDLStatement, f Visit) error {
  2581  	if in == nil {
  2582  		return nil
  2583  	}
  2584  	switch in := in.(type) {
  2585  	case *AlterTable:
  2586  		return VisitRefOfAlterTable(in, f)
  2587  	case *AlterView:
  2588  		return VisitRefOfAlterView(in, f)
  2589  	case *CreateTable:
  2590  		return VisitRefOfCreateTable(in, f)
  2591  	case *CreateView:
  2592  		return VisitRefOfCreateView(in, f)
  2593  	case *DropTable:
  2594  		return VisitRefOfDropTable(in, f)
  2595  	case *DropView:
  2596  		return VisitRefOfDropView(in, f)
  2597  	case *RenameTable:
  2598  		return VisitRefOfRenameTable(in, f)
  2599  	case *TruncateTable:
  2600  		return VisitRefOfTruncateTable(in, f)
  2601  	default:
  2602  		// this should never happen
  2603  		return nil
  2604  	}
  2605  }
  2606  func VisitExplain(in Explain, f Visit) error {
  2607  	if in == nil {
  2608  		return nil
  2609  	}
  2610  	switch in := in.(type) {
  2611  	case *ExplainStmt:
  2612  		return VisitRefOfExplainStmt(in, f)
  2613  	case *ExplainTab:
  2614  		return VisitRefOfExplainTab(in, f)
  2615  	default:
  2616  		// this should never happen
  2617  		return nil
  2618  	}
  2619  }
  2620  func VisitExpr(in Expr, f Visit) error {
  2621  	if in == nil {
  2622  		return nil
  2623  	}
  2624  	switch in := in.(type) {
  2625  	case *AndExpr:
  2626  		return VisitRefOfAndExpr(in, f)
  2627  	case Argument:
  2628  		return VisitArgument(in, f)
  2629  	case *BetweenExpr:
  2630  		return VisitRefOfBetweenExpr(in, f)
  2631  	case *BinaryExpr:
  2632  		return VisitRefOfBinaryExpr(in, f)
  2633  	case BoolVal:
  2634  		return VisitBoolVal(in, f)
  2635  	case *CaseExpr:
  2636  		return VisitRefOfCaseExpr(in, f)
  2637  	case *ColName:
  2638  		return VisitRefOfColName(in, f)
  2639  	case *CollateExpr:
  2640  		return VisitRefOfCollateExpr(in, f)
  2641  	case *ComparisonExpr:
  2642  		return VisitRefOfComparisonExpr(in, f)
  2643  	case *ConvertExpr:
  2644  		return VisitRefOfConvertExpr(in, f)
  2645  	case *ConvertUsingExpr:
  2646  		return VisitRefOfConvertUsingExpr(in, f)
  2647  	case *CurTimeFuncExpr:
  2648  		return VisitRefOfCurTimeFuncExpr(in, f)
  2649  	case *Default:
  2650  		return VisitRefOfDefault(in, f)
  2651  	case *ExistsExpr:
  2652  		return VisitRefOfExistsExpr(in, f)
  2653  	case *ExtractFuncExpr:
  2654  		return VisitRefOfExtractFuncExpr(in, f)
  2655  	case *ExtractedSubquery:
  2656  		return VisitRefOfExtractedSubquery(in, f)
  2657  	case *FuncExpr:
  2658  		return VisitRefOfFuncExpr(in, f)
  2659  	case *GroupConcatExpr:
  2660  		return VisitRefOfGroupConcatExpr(in, f)
  2661  	case *IntervalExpr:
  2662  		return VisitRefOfIntervalExpr(in, f)
  2663  	case *IntroducerExpr:
  2664  		return VisitRefOfIntroducerExpr(in, f)
  2665  	case *IsExpr:
  2666  		return VisitRefOfIsExpr(in, f)
  2667  	case ListArg:
  2668  		return VisitListArg(in, f)
  2669  	case *Literal:
  2670  		return VisitRefOfLiteral(in, f)
  2671  	case *MatchExpr:
  2672  		return VisitRefOfMatchExpr(in, f)
  2673  	case *NotExpr:
  2674  		return VisitRefOfNotExpr(in, f)
  2675  	case *NullVal:
  2676  		return VisitRefOfNullVal(in, f)
  2677  	case *OrExpr:
  2678  		return VisitRefOfOrExpr(in, f)
  2679  	case *Subquery:
  2680  		return VisitRefOfSubquery(in, f)
  2681  	case *SubstrExpr:
  2682  		return VisitRefOfSubstrExpr(in, f)
  2683  	case *TimestampFuncExpr:
  2684  		return VisitRefOfTimestampFuncExpr(in, f)
  2685  	case *UnaryExpr:
  2686  		return VisitRefOfUnaryExpr(in, f)
  2687  	case ValTuple:
  2688  		return VisitValTuple(in, f)
  2689  	case *ValuesFuncExpr:
  2690  		return VisitRefOfValuesFuncExpr(in, f)
  2691  	case *XorExpr:
  2692  		return VisitRefOfXorExpr(in, f)
  2693  	default:
  2694  		// this should never happen
  2695  		return nil
  2696  	}
  2697  }
  2698  func VisitInsertRows(in InsertRows, f Visit) error {
  2699  	if in == nil {
  2700  		return nil
  2701  	}
  2702  	switch in := in.(type) {
  2703  	case *Select:
  2704  		return VisitRefOfSelect(in, f)
  2705  	case *Union:
  2706  		return VisitRefOfUnion(in, f)
  2707  	case Values:
  2708  		return VisitValues(in, f)
  2709  	default:
  2710  		// this should never happen
  2711  		return nil
  2712  	}
  2713  }
  2714  func VisitSelectExpr(in SelectExpr, f Visit) error {
  2715  	if in == nil {
  2716  		return nil
  2717  	}
  2718  	switch in := in.(type) {
  2719  	case *AliasedExpr:
  2720  		return VisitRefOfAliasedExpr(in, f)
  2721  	case *Nextval:
  2722  		return VisitRefOfNextval(in, f)
  2723  	case *StarExpr:
  2724  		return VisitRefOfStarExpr(in, f)
  2725  	default:
  2726  		// this should never happen
  2727  		return nil
  2728  	}
  2729  }
  2730  func VisitSelectStatement(in SelectStatement, f Visit) error {
  2731  	if in == nil {
  2732  		return nil
  2733  	}
  2734  	switch in := in.(type) {
  2735  	case *Select:
  2736  		return VisitRefOfSelect(in, f)
  2737  	case *Union:
  2738  		return VisitRefOfUnion(in, f)
  2739  	default:
  2740  		// this should never happen
  2741  		return nil
  2742  	}
  2743  }
  2744  func VisitShowInternal(in ShowInternal, f Visit) error {
  2745  	if in == nil {
  2746  		return nil
  2747  	}
  2748  	switch in := in.(type) {
  2749  	case *ShowBasic:
  2750  		return VisitRefOfShowBasic(in, f)
  2751  	case *ShowCreate:
  2752  		return VisitRefOfShowCreate(in, f)
  2753  	case *ShowLegacy:
  2754  		return VisitRefOfShowLegacy(in, f)
  2755  	default:
  2756  		// this should never happen
  2757  		return nil
  2758  	}
  2759  }
  2760  func VisitSimpleTableExpr(in SimpleTableExpr, f Visit) error {
  2761  	if in == nil {
  2762  		return nil
  2763  	}
  2764  	switch in := in.(type) {
  2765  	case *DerivedTable:
  2766  		return VisitRefOfDerivedTable(in, f)
  2767  	case TableName:
  2768  		return VisitTableName(in, f)
  2769  	default:
  2770  		// this should never happen
  2771  		return nil
  2772  	}
  2773  }
  2774  func VisitStatement(in Statement, f Visit) error {
  2775  	if in == nil {
  2776  		return nil
  2777  	}
  2778  	switch in := in.(type) {
  2779  	case *AlterDatabase:
  2780  		return VisitRefOfAlterDatabase(in, f)
  2781  	case *AlterMigration:
  2782  		return VisitRefOfAlterMigration(in, f)
  2783  	case *AlterTable:
  2784  		return VisitRefOfAlterTable(in, f)
  2785  	case *AlterView:
  2786  		return VisitRefOfAlterView(in, f)
  2787  	case *AlterVschema:
  2788  		return VisitRefOfAlterVschema(in, f)
  2789  	case *Begin:
  2790  		return VisitRefOfBegin(in, f)
  2791  	case *CallProc:
  2792  		return VisitRefOfCallProc(in, f)
  2793  	case *Commit:
  2794  		return VisitRefOfCommit(in, f)
  2795  	case *CreateDatabase:
  2796  		return VisitRefOfCreateDatabase(in, f)
  2797  	case *CreateTable:
  2798  		return VisitRefOfCreateTable(in, f)
  2799  	case *CreateView:
  2800  		return VisitRefOfCreateView(in, f)
  2801  	case *Delete:
  2802  		return VisitRefOfDelete(in, f)
  2803  	case *DropDatabase:
  2804  		return VisitRefOfDropDatabase(in, f)
  2805  	case *DropTable:
  2806  		return VisitRefOfDropTable(in, f)
  2807  	case *DropView:
  2808  		return VisitRefOfDropView(in, f)
  2809  	case *ExplainStmt:
  2810  		return VisitRefOfExplainStmt(in, f)
  2811  	case *ExplainTab:
  2812  		return VisitRefOfExplainTab(in, f)
  2813  	case *Flush:
  2814  		return VisitRefOfFlush(in, f)
  2815  	case *Insert:
  2816  		return VisitRefOfInsert(in, f)
  2817  	case *Load:
  2818  		return VisitRefOfLoad(in, f)
  2819  	case *LockTables:
  2820  		return VisitRefOfLockTables(in, f)
  2821  	case *OtherAdmin:
  2822  		return VisitRefOfOtherAdmin(in, f)
  2823  	case *OtherRead:
  2824  		return VisitRefOfOtherRead(in, f)
  2825  	case *Release:
  2826  		return VisitRefOfRelease(in, f)
  2827  	case *RenameTable:
  2828  		return VisitRefOfRenameTable(in, f)
  2829  	case *RevertMigration:
  2830  		return VisitRefOfRevertMigration(in, f)
  2831  	case *Rollback:
  2832  		return VisitRefOfRollback(in, f)
  2833  	case *SRollback:
  2834  		return VisitRefOfSRollback(in, f)
  2835  	case *Savepoint:
  2836  		return VisitRefOfSavepoint(in, f)
  2837  	case *Select:
  2838  		return VisitRefOfSelect(in, f)
  2839  	case *Set:
  2840  		return VisitRefOfSet(in, f)
  2841  	case *SetTransaction:
  2842  		return VisitRefOfSetTransaction(in, f)
  2843  	case *Show:
  2844  		return VisitRefOfShow(in, f)
  2845  	case *ShowMigrationLogs:
  2846  		return VisitRefOfShowMigrationLogs(in, f)
  2847  	case *Stream:
  2848  		return VisitRefOfStream(in, f)
  2849  	case *TruncateTable:
  2850  		return VisitRefOfTruncateTable(in, f)
  2851  	case *Union:
  2852  		return VisitRefOfUnion(in, f)
  2853  	case *UnlockTables:
  2854  		return VisitRefOfUnlockTables(in, f)
  2855  	case *Update:
  2856  		return VisitRefOfUpdate(in, f)
  2857  	case *Use:
  2858  		return VisitRefOfUse(in, f)
  2859  	case *VStream:
  2860  		return VisitRefOfVStream(in, f)
  2861  	default:
  2862  		// this should never happen
  2863  		return nil
  2864  	}
  2865  }
  2866  func VisitTableExpr(in TableExpr, f Visit) error {
  2867  	if in == nil {
  2868  		return nil
  2869  	}
  2870  	switch in := in.(type) {
  2871  	case *AliasedTableExpr:
  2872  		return VisitRefOfAliasedTableExpr(in, f)
  2873  	case *JoinTableExpr:
  2874  		return VisitRefOfJoinTableExpr(in, f)
  2875  	case *ParenTableExpr:
  2876  		return VisitRefOfParenTableExpr(in, f)
  2877  	default:
  2878  		// this should never happen
  2879  		return nil
  2880  	}
  2881  }
  2882  func VisitAccessMode(in AccessMode, f Visit) error {
  2883  	_, err := f(in)
  2884  	return err
  2885  }
  2886  func VisitAlgorithmValue(in AlgorithmValue, f Visit) error {
  2887  	_, err := f(in)
  2888  	return err
  2889  }
  2890  func VisitArgument(in Argument, f Visit) error {
  2891  	_, err := f(in)
  2892  	return err
  2893  }
  2894  func VisitBoolVal(in BoolVal, f Visit) error {
  2895  	_, err := f(in)
  2896  	return err
  2897  }
  2898  func VisitIsolationLevel(in IsolationLevel, f Visit) error {
  2899  	_, err := f(in)
  2900  	return err
  2901  }
  2902  func VisitListArg(in ListArg, f Visit) error {
  2903  	_, err := f(in)
  2904  	return err
  2905  }
  2906  func VisitReferenceAction(in ReferenceAction, f Visit) error {
  2907  	_, err := f(in)
  2908  	return err
  2909  }
  2910  func VisitRefOfColIdent(in *ColIdent, f Visit) error {
  2911  	if in == nil {
  2912  		return nil
  2913  	}
  2914  	if cont, err := f(in); err != nil || !cont {
  2915  		return err
  2916  	}
  2917  	return nil
  2918  }
  2919  func VisitRefOfRootNode(in *RootNode, f Visit) error {
  2920  	if in == nil {
  2921  		return nil
  2922  	}
  2923  	if cont, err := f(in); err != nil || !cont {
  2924  		return err
  2925  	}
  2926  	if err := VisitSQLNode(in.SQLNode, f); err != nil {
  2927  		return err
  2928  	}
  2929  	return nil
  2930  }
  2931  func VisitRefOfTableIdent(in *TableIdent, f Visit) error {
  2932  	if in == nil {
  2933  		return nil
  2934  	}
  2935  	if cont, err := f(in); err != nil || !cont {
  2936  		return err
  2937  	}
  2938  	return nil
  2939  }
  2940  func VisitRefOfTableName(in *TableName, f Visit) error {
  2941  	if in == nil {
  2942  		return nil
  2943  	}
  2944  	if cont, err := f(in); err != nil || !cont {
  2945  		return err
  2946  	}
  2947  	if err := VisitTableIdent(in.Name, f); err != nil {
  2948  		return err
  2949  	}
  2950  	if err := VisitTableIdent(in.Qualifier, f); err != nil {
  2951  		return err
  2952  	}
  2953  	return nil
  2954  }
  2955  func VisitRefOfVindexParam(in *VindexParam, f Visit) error {
  2956  	if in == nil {
  2957  		return nil
  2958  	}
  2959  	if cont, err := f(in); err != nil || !cont {
  2960  		return err
  2961  	}
  2962  	if err := VisitColIdent(in.Key, f); err != nil {
  2963  		return err
  2964  	}
  2965  	return nil
  2966  }