github.com/vedadiyan/sqlparser@v1.0.0/pkg/sqlparser/ast_visit.go (about) 1 /* 2 Copyright 2023 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 *AddColumns: 26 return VisitRefOfAddColumns(in, f) 27 case *AddConstraintDefinition: 28 return VisitRefOfAddConstraintDefinition(in, f) 29 case *AddIndexDefinition: 30 return VisitRefOfAddIndexDefinition(in, f) 31 case AlgorithmValue: 32 return VisitAlgorithmValue(in, f) 33 case *AliasedExpr: 34 return VisitRefOfAliasedExpr(in, f) 35 case *AliasedTableExpr: 36 return VisitRefOfAliasedTableExpr(in, f) 37 case *AlterCharset: 38 return VisitRefOfAlterCharset(in, f) 39 case *AlterCheck: 40 return VisitRefOfAlterCheck(in, f) 41 case *AlterColumn: 42 return VisitRefOfAlterColumn(in, f) 43 case *AlterDatabase: 44 return VisitRefOfAlterDatabase(in, f) 45 case *AlterIndex: 46 return VisitRefOfAlterIndex(in, f) 47 case *AlterMigration: 48 return VisitRefOfAlterMigration(in, f) 49 case *AlterTable: 50 return VisitRefOfAlterTable(in, f) 51 case *AlterView: 52 return VisitRefOfAlterView(in, f) 53 case *AlterVschema: 54 return VisitRefOfAlterVschema(in, f) 55 case *AndExpr: 56 return VisitRefOfAndExpr(in, f) 57 case Argument: 58 return VisitArgument(in, f) 59 case *ArgumentLessWindowExpr: 60 return VisitRefOfArgumentLessWindowExpr(in, f) 61 case *AutoIncSpec: 62 return VisitRefOfAutoIncSpec(in, f) 63 case *Avg: 64 return VisitRefOfAvg(in, f) 65 case *Begin: 66 return VisitRefOfBegin(in, f) 67 case *BetweenExpr: 68 return VisitRefOfBetweenExpr(in, f) 69 case *BinaryExpr: 70 return VisitRefOfBinaryExpr(in, f) 71 case *BitAnd: 72 return VisitRefOfBitAnd(in, f) 73 case *BitOr: 74 return VisitRefOfBitOr(in, f) 75 case *BitXor: 76 return VisitRefOfBitXor(in, f) 77 case BoolVal: 78 return VisitBoolVal(in, f) 79 case *CallProc: 80 return VisitRefOfCallProc(in, f) 81 case *CaseExpr: 82 return VisitRefOfCaseExpr(in, f) 83 case *CastExpr: 84 return VisitRefOfCastExpr(in, f) 85 case *ChangeColumn: 86 return VisitRefOfChangeColumn(in, f) 87 case *CharExpr: 88 return VisitRefOfCharExpr(in, f) 89 case *CheckConstraintDefinition: 90 return VisitRefOfCheckConstraintDefinition(in, f) 91 case *ColName: 92 return VisitRefOfColName(in, f) 93 case *CollateExpr: 94 return VisitRefOfCollateExpr(in, f) 95 case *ColumnDefinition: 96 return VisitRefOfColumnDefinition(in, f) 97 case *ColumnType: 98 return VisitRefOfColumnType(in, f) 99 case Columns: 100 return VisitColumns(in, f) 101 case *CommentOnly: 102 return VisitRefOfCommentOnly(in, f) 103 case *Commit: 104 return VisitRefOfCommit(in, f) 105 case *CommonTableExpr: 106 return VisitRefOfCommonTableExpr(in, f) 107 case *ComparisonExpr: 108 return VisitRefOfComparisonExpr(in, f) 109 case *ConstraintDefinition: 110 return VisitRefOfConstraintDefinition(in, f) 111 case *ConvertExpr: 112 return VisitRefOfConvertExpr(in, f) 113 case *ConvertType: 114 return VisitRefOfConvertType(in, f) 115 case *ConvertUsingExpr: 116 return VisitRefOfConvertUsingExpr(in, f) 117 case *Count: 118 return VisitRefOfCount(in, f) 119 case *CountStar: 120 return VisitRefOfCountStar(in, f) 121 case *CreateDatabase: 122 return VisitRefOfCreateDatabase(in, f) 123 case *CreateTable: 124 return VisitRefOfCreateTable(in, f) 125 case *CreateView: 126 return VisitRefOfCreateView(in, f) 127 case *CurTimeFuncExpr: 128 return VisitRefOfCurTimeFuncExpr(in, f) 129 case *DeallocateStmt: 130 return VisitRefOfDeallocateStmt(in, f) 131 case *Default: 132 return VisitRefOfDefault(in, f) 133 case *Definer: 134 return VisitRefOfDefiner(in, f) 135 case *Delete: 136 return VisitRefOfDelete(in, f) 137 case *DerivedTable: 138 return VisitRefOfDerivedTable(in, f) 139 case *DropColumn: 140 return VisitRefOfDropColumn(in, f) 141 case *DropDatabase: 142 return VisitRefOfDropDatabase(in, f) 143 case *DropKey: 144 return VisitRefOfDropKey(in, f) 145 case *DropTable: 146 return VisitRefOfDropTable(in, f) 147 case *DropView: 148 return VisitRefOfDropView(in, f) 149 case *ExecuteStmt: 150 return VisitRefOfExecuteStmt(in, f) 151 case *ExistsExpr: 152 return VisitRefOfExistsExpr(in, f) 153 case *ExplainStmt: 154 return VisitRefOfExplainStmt(in, f) 155 case *ExplainTab: 156 return VisitRefOfExplainTab(in, f) 157 case Exprs: 158 return VisitExprs(in, f) 159 case *ExtractFuncExpr: 160 return VisitRefOfExtractFuncExpr(in, f) 161 case *ExtractValueExpr: 162 return VisitRefOfExtractValueExpr(in, f) 163 case *ExtractedSubquery: 164 return VisitRefOfExtractedSubquery(in, f) 165 case *FirstOrLastValueExpr: 166 return VisitRefOfFirstOrLastValueExpr(in, f) 167 case *Flush: 168 return VisitRefOfFlush(in, f) 169 case *Force: 170 return VisitRefOfForce(in, f) 171 case *ForeignKeyDefinition: 172 return VisitRefOfForeignKeyDefinition(in, f) 173 case *FrameClause: 174 return VisitRefOfFrameClause(in, f) 175 case *FramePoint: 176 return VisitRefOfFramePoint(in, f) 177 case *FromFirstLastClause: 178 return VisitRefOfFromFirstLastClause(in, f) 179 case *FuncExpr: 180 return VisitRefOfFuncExpr(in, f) 181 case *GTIDFuncExpr: 182 return VisitRefOfGTIDFuncExpr(in, f) 183 case GroupBy: 184 return VisitGroupBy(in, f) 185 case *GroupConcatExpr: 186 return VisitRefOfGroupConcatExpr(in, f) 187 case IdentifierCI: 188 return VisitIdentifierCI(in, f) 189 case IdentifierCS: 190 return VisitIdentifierCS(in, f) 191 case *IndexDefinition: 192 return VisitRefOfIndexDefinition(in, f) 193 case *IndexHint: 194 return VisitRefOfIndexHint(in, f) 195 case IndexHints: 196 return VisitIndexHints(in, f) 197 case *IndexInfo: 198 return VisitRefOfIndexInfo(in, f) 199 case *Insert: 200 return VisitRefOfInsert(in, f) 201 case *InsertExpr: 202 return VisitRefOfInsertExpr(in, f) 203 case *IntervalExpr: 204 return VisitRefOfIntervalExpr(in, f) 205 case *IntervalFuncExpr: 206 return VisitRefOfIntervalFuncExpr(in, f) 207 case *IntroducerExpr: 208 return VisitRefOfIntroducerExpr(in, f) 209 case *IsExpr: 210 return VisitRefOfIsExpr(in, f) 211 case *JSONArrayExpr: 212 return VisitRefOfJSONArrayExpr(in, f) 213 case *JSONAttributesExpr: 214 return VisitRefOfJSONAttributesExpr(in, f) 215 case *JSONContainsExpr: 216 return VisitRefOfJSONContainsExpr(in, f) 217 case *JSONContainsPathExpr: 218 return VisitRefOfJSONContainsPathExpr(in, f) 219 case *JSONExtractExpr: 220 return VisitRefOfJSONExtractExpr(in, f) 221 case *JSONKeysExpr: 222 return VisitRefOfJSONKeysExpr(in, f) 223 case *JSONObjectExpr: 224 return VisitRefOfJSONObjectExpr(in, f) 225 case *JSONObjectParam: 226 return VisitRefOfJSONObjectParam(in, f) 227 case *JSONOverlapsExpr: 228 return VisitRefOfJSONOverlapsExpr(in, f) 229 case *JSONPrettyExpr: 230 return VisitRefOfJSONPrettyExpr(in, f) 231 case *JSONQuoteExpr: 232 return VisitRefOfJSONQuoteExpr(in, f) 233 case *JSONRemoveExpr: 234 return VisitRefOfJSONRemoveExpr(in, f) 235 case *JSONSchemaValidFuncExpr: 236 return VisitRefOfJSONSchemaValidFuncExpr(in, f) 237 case *JSONSchemaValidationReportFuncExpr: 238 return VisitRefOfJSONSchemaValidationReportFuncExpr(in, f) 239 case *JSONSearchExpr: 240 return VisitRefOfJSONSearchExpr(in, f) 241 case *JSONStorageFreeExpr: 242 return VisitRefOfJSONStorageFreeExpr(in, f) 243 case *JSONStorageSizeExpr: 244 return VisitRefOfJSONStorageSizeExpr(in, f) 245 case *JSONTableExpr: 246 return VisitRefOfJSONTableExpr(in, f) 247 case *JSONUnquoteExpr: 248 return VisitRefOfJSONUnquoteExpr(in, f) 249 case *JSONValueExpr: 250 return VisitRefOfJSONValueExpr(in, f) 251 case *JSONValueMergeExpr: 252 return VisitRefOfJSONValueMergeExpr(in, f) 253 case *JSONValueModifierExpr: 254 return VisitRefOfJSONValueModifierExpr(in, f) 255 case *JoinCondition: 256 return VisitRefOfJoinCondition(in, f) 257 case *JoinTableExpr: 258 return VisitRefOfJoinTableExpr(in, f) 259 case *JtColumnDefinition: 260 return VisitRefOfJtColumnDefinition(in, f) 261 case *JtOnResponse: 262 return VisitRefOfJtOnResponse(in, f) 263 case *KeyState: 264 return VisitRefOfKeyState(in, f) 265 case *LagLeadExpr: 266 return VisitRefOfLagLeadExpr(in, f) 267 case *Limit: 268 return VisitRefOfLimit(in, f) 269 case *LineStringExpr: 270 return VisitRefOfLineStringExpr(in, f) 271 case ListArg: 272 return VisitListArg(in, f) 273 case *Literal: 274 return VisitRefOfLiteral(in, f) 275 case *Load: 276 return VisitRefOfLoad(in, f) 277 case *LocateExpr: 278 return VisitRefOfLocateExpr(in, f) 279 case *LockOption: 280 return VisitRefOfLockOption(in, f) 281 case *LockTables: 282 return VisitRefOfLockTables(in, f) 283 case *LockingFunc: 284 return VisitRefOfLockingFunc(in, f) 285 case MatchAction: 286 return VisitMatchAction(in, f) 287 case *MatchExpr: 288 return VisitRefOfMatchExpr(in, f) 289 case *Max: 290 return VisitRefOfMax(in, f) 291 case *MemberOfExpr: 292 return VisitRefOfMemberOfExpr(in, f) 293 case *Min: 294 return VisitRefOfMin(in, f) 295 case *ModifyColumn: 296 return VisitRefOfModifyColumn(in, f) 297 case *NTHValueExpr: 298 return VisitRefOfNTHValueExpr(in, f) 299 case *NamedWindow: 300 return VisitRefOfNamedWindow(in, f) 301 case NamedWindows: 302 return VisitNamedWindows(in, f) 303 case *Nextval: 304 return VisitRefOfNextval(in, f) 305 case *NotExpr: 306 return VisitRefOfNotExpr(in, f) 307 case *NtileExpr: 308 return VisitRefOfNtileExpr(in, f) 309 case *NullTreatmentClause: 310 return VisitRefOfNullTreatmentClause(in, f) 311 case *NullVal: 312 return VisitRefOfNullVal(in, f) 313 case *Offset: 314 return VisitRefOfOffset(in, f) 315 case OnDup: 316 return VisitOnDup(in, f) 317 case *OptLike: 318 return VisitRefOfOptLike(in, f) 319 case *OrExpr: 320 return VisitRefOfOrExpr(in, f) 321 case *Order: 322 return VisitRefOfOrder(in, f) 323 case OrderBy: 324 return VisitOrderBy(in, f) 325 case *OrderByOption: 326 return VisitRefOfOrderByOption(in, f) 327 case *OtherAdmin: 328 return VisitRefOfOtherAdmin(in, f) 329 case *OtherRead: 330 return VisitRefOfOtherRead(in, f) 331 case *OverClause: 332 return VisitRefOfOverClause(in, f) 333 case *ParenTableExpr: 334 return VisitRefOfParenTableExpr(in, f) 335 case *ParsedComments: 336 return VisitRefOfParsedComments(in, f) 337 case *PartitionDefinition: 338 return VisitRefOfPartitionDefinition(in, f) 339 case *PartitionDefinitionOptions: 340 return VisitRefOfPartitionDefinitionOptions(in, f) 341 case *PartitionEngine: 342 return VisitRefOfPartitionEngine(in, f) 343 case *PartitionOption: 344 return VisitRefOfPartitionOption(in, f) 345 case *PartitionSpec: 346 return VisitRefOfPartitionSpec(in, f) 347 case *PartitionValueRange: 348 return VisitRefOfPartitionValueRange(in, f) 349 case Partitions: 350 return VisitPartitions(in, f) 351 case *PerformanceSchemaFuncExpr: 352 return VisitRefOfPerformanceSchemaFuncExpr(in, f) 353 case *PointExpr: 354 return VisitRefOfPointExpr(in, f) 355 case *PrepareStmt: 356 return VisitRefOfPrepareStmt(in, f) 357 case ReferenceAction: 358 return VisitReferenceAction(in, f) 359 case *ReferenceDefinition: 360 return VisitRefOfReferenceDefinition(in, f) 361 case *RegexpInstrExpr: 362 return VisitRefOfRegexpInstrExpr(in, f) 363 case *RegexpLikeExpr: 364 return VisitRefOfRegexpLikeExpr(in, f) 365 case *RegexpReplaceExpr: 366 return VisitRefOfRegexpReplaceExpr(in, f) 367 case *RegexpSubstrExpr: 368 return VisitRefOfRegexpSubstrExpr(in, f) 369 case *Release: 370 return VisitRefOfRelease(in, f) 371 case *RenameColumn: 372 return VisitRefOfRenameColumn(in, f) 373 case *RenameIndex: 374 return VisitRefOfRenameIndex(in, f) 375 case *RenameTable: 376 return VisitRefOfRenameTable(in, f) 377 case *RenameTableName: 378 return VisitRefOfRenameTableName(in, f) 379 case *RevertMigration: 380 return VisitRefOfRevertMigration(in, f) 381 case *Rollback: 382 return VisitRefOfRollback(in, f) 383 case RootNode: 384 return VisitRootNode(in, f) 385 case *SRollback: 386 return VisitRefOfSRollback(in, f) 387 case *Savepoint: 388 return VisitRefOfSavepoint(in, f) 389 case *Select: 390 return VisitRefOfSelect(in, f) 391 case SelectExprs: 392 return VisitSelectExprs(in, f) 393 case *SelectInto: 394 return VisitRefOfSelectInto(in, f) 395 case *Set: 396 return VisitRefOfSet(in, f) 397 case *SetExpr: 398 return VisitRefOfSetExpr(in, f) 399 case SetExprs: 400 return VisitSetExprs(in, f) 401 case *Show: 402 return VisitRefOfShow(in, f) 403 case *ShowBasic: 404 return VisitRefOfShowBasic(in, f) 405 case *ShowCreate: 406 return VisitRefOfShowCreate(in, f) 407 case *ShowFilter: 408 return VisitRefOfShowFilter(in, f) 409 case *ShowMigrationLogs: 410 return VisitRefOfShowMigrationLogs(in, f) 411 case *ShowOther: 412 return VisitRefOfShowOther(in, f) 413 case *ShowThrottledApps: 414 return VisitRefOfShowThrottledApps(in, f) 415 case *ShowThrottlerStatus: 416 return VisitRefOfShowThrottlerStatus(in, f) 417 case *StarExpr: 418 return VisitRefOfStarExpr(in, f) 419 case *Std: 420 return VisitRefOfStd(in, f) 421 case *StdDev: 422 return VisitRefOfStdDev(in, f) 423 case *StdPop: 424 return VisitRefOfStdPop(in, f) 425 case *StdSamp: 426 return VisitRefOfStdSamp(in, f) 427 case *Stream: 428 return VisitRefOfStream(in, f) 429 case *SubPartition: 430 return VisitRefOfSubPartition(in, f) 431 case *SubPartitionDefinition: 432 return VisitRefOfSubPartitionDefinition(in, f) 433 case *SubPartitionDefinitionOptions: 434 return VisitRefOfSubPartitionDefinitionOptions(in, f) 435 case SubPartitionDefinitions: 436 return VisitSubPartitionDefinitions(in, f) 437 case *Subquery: 438 return VisitRefOfSubquery(in, f) 439 case *SubstrExpr: 440 return VisitRefOfSubstrExpr(in, f) 441 case *Sum: 442 return VisitRefOfSum(in, f) 443 case TableExprs: 444 return VisitTableExprs(in, f) 445 case TableName: 446 return VisitTableName(in, f) 447 case TableNames: 448 return VisitTableNames(in, f) 449 case TableOptions: 450 return VisitTableOptions(in, f) 451 case *TableSpec: 452 return VisitRefOfTableSpec(in, f) 453 case *TablespaceOperation: 454 return VisitRefOfTablespaceOperation(in, f) 455 case *TimestampFuncExpr: 456 return VisitRefOfTimestampFuncExpr(in, f) 457 case *TrimFuncExpr: 458 return VisitRefOfTrimFuncExpr(in, f) 459 case *TruncateTable: 460 return VisitRefOfTruncateTable(in, f) 461 case *UnaryExpr: 462 return VisitRefOfUnaryExpr(in, f) 463 case *Union: 464 return VisitRefOfUnion(in, f) 465 case *UnlockTables: 466 return VisitRefOfUnlockTables(in, f) 467 case *Update: 468 return VisitRefOfUpdate(in, f) 469 case *UpdateExpr: 470 return VisitRefOfUpdateExpr(in, f) 471 case UpdateExprs: 472 return VisitUpdateExprs(in, f) 473 case *UpdateXMLExpr: 474 return VisitRefOfUpdateXMLExpr(in, f) 475 case *Use: 476 return VisitRefOfUse(in, f) 477 case *VExplainStmt: 478 return VisitRefOfVExplainStmt(in, f) 479 case *VStream: 480 return VisitRefOfVStream(in, f) 481 case ValTuple: 482 return VisitValTuple(in, f) 483 case *Validation: 484 return VisitRefOfValidation(in, f) 485 case Values: 486 return VisitValues(in, f) 487 case *ValuesFuncExpr: 488 return VisitRefOfValuesFuncExpr(in, f) 489 case *VarPop: 490 return VisitRefOfVarPop(in, f) 491 case *VarSamp: 492 return VisitRefOfVarSamp(in, f) 493 case *Variable: 494 return VisitRefOfVariable(in, f) 495 case *Variance: 496 return VisitRefOfVariance(in, f) 497 case VindexParam: 498 return VisitVindexParam(in, f) 499 case *VindexSpec: 500 return VisitRefOfVindexSpec(in, f) 501 case *WeightStringFuncExpr: 502 return VisitRefOfWeightStringFuncExpr(in, f) 503 case *When: 504 return VisitRefOfWhen(in, f) 505 case *Where: 506 return VisitRefOfWhere(in, f) 507 case *WindowDefinition: 508 return VisitRefOfWindowDefinition(in, f) 509 case WindowDefinitions: 510 return VisitWindowDefinitions(in, f) 511 case *WindowSpecification: 512 return VisitRefOfWindowSpecification(in, f) 513 case *With: 514 return VisitRefOfWith(in, f) 515 case *XorExpr: 516 return VisitRefOfXorExpr(in, f) 517 default: 518 // this should never happen 519 return nil 520 } 521 } 522 func VisitRefOfAddColumns(in *AddColumns, f Visit) error { 523 if in == nil { 524 return nil 525 } 526 if cont, err := f(in); err != nil || !cont { 527 return err 528 } 529 for _, el := range in.Columns { 530 if err := VisitRefOfColumnDefinition(el, f); err != nil { 531 return err 532 } 533 } 534 if err := VisitRefOfColName(in.After, f); err != nil { 535 return err 536 } 537 return nil 538 } 539 func VisitRefOfAddConstraintDefinition(in *AddConstraintDefinition, f Visit) error { 540 if in == nil { 541 return nil 542 } 543 if cont, err := f(in); err != nil || !cont { 544 return err 545 } 546 if err := VisitRefOfConstraintDefinition(in.ConstraintDefinition, f); err != nil { 547 return err 548 } 549 return nil 550 } 551 func VisitRefOfAddIndexDefinition(in *AddIndexDefinition, f Visit) error { 552 if in == nil { 553 return nil 554 } 555 if cont, err := f(in); err != nil || !cont { 556 return err 557 } 558 if err := VisitRefOfIndexDefinition(in.IndexDefinition, f); err != nil { 559 return err 560 } 561 return nil 562 } 563 func VisitRefOfAliasedExpr(in *AliasedExpr, f Visit) error { 564 if in == nil { 565 return nil 566 } 567 if cont, err := f(in); err != nil || !cont { 568 return err 569 } 570 if err := VisitExpr(in.Expr, f); err != nil { 571 return err 572 } 573 if err := VisitIdentifierCI(in.As, f); err != nil { 574 return err 575 } 576 return nil 577 } 578 func VisitRefOfAliasedTableExpr(in *AliasedTableExpr, f Visit) error { 579 if in == nil { 580 return nil 581 } 582 if cont, err := f(in); err != nil || !cont { 583 return err 584 } 585 if err := VisitSimpleTableExpr(in.Expr, f); err != nil { 586 return err 587 } 588 if err := VisitPartitions(in.Partitions, f); err != nil { 589 return err 590 } 591 if err := VisitIdentifierCS(in.As, f); err != nil { 592 return err 593 } 594 if err := VisitIndexHints(in.Hints, f); err != nil { 595 return err 596 } 597 if err := VisitColumns(in.Columns, f); err != nil { 598 return err 599 } 600 return nil 601 } 602 func VisitRefOfAlterCharset(in *AlterCharset, f Visit) error { 603 if in == nil { 604 return nil 605 } 606 if cont, err := f(in); err != nil || !cont { 607 return err 608 } 609 return nil 610 } 611 func VisitRefOfAlterCheck(in *AlterCheck, f Visit) error { 612 if in == nil { 613 return nil 614 } 615 if cont, err := f(in); err != nil || !cont { 616 return err 617 } 618 if err := VisitIdentifierCI(in.Name, f); err != nil { 619 return err 620 } 621 return nil 622 } 623 func VisitRefOfAlterColumn(in *AlterColumn, f Visit) error { 624 if in == nil { 625 return nil 626 } 627 if cont, err := f(in); err != nil || !cont { 628 return err 629 } 630 if err := VisitRefOfColName(in.Column, f); err != nil { 631 return err 632 } 633 if err := VisitExpr(in.DefaultVal, f); err != nil { 634 return err 635 } 636 return nil 637 } 638 func VisitRefOfAlterDatabase(in *AlterDatabase, f Visit) error { 639 if in == nil { 640 return nil 641 } 642 if cont, err := f(in); err != nil || !cont { 643 return err 644 } 645 if err := VisitIdentifierCS(in.DBName, f); err != nil { 646 return err 647 } 648 return nil 649 } 650 func VisitRefOfAlterIndex(in *AlterIndex, f Visit) error { 651 if in == nil { 652 return nil 653 } 654 if cont, err := f(in); err != nil || !cont { 655 return err 656 } 657 if err := VisitIdentifierCI(in.Name, f); err != nil { 658 return err 659 } 660 return nil 661 } 662 func VisitRefOfAlterMigration(in *AlterMigration, f Visit) error { 663 if in == nil { 664 return nil 665 } 666 if cont, err := f(in); err != nil || !cont { 667 return err 668 } 669 if err := VisitRefOfLiteral(in.Ratio, f); err != nil { 670 return err 671 } 672 return nil 673 } 674 func VisitRefOfAlterTable(in *AlterTable, f Visit) error { 675 if in == nil { 676 return nil 677 } 678 if cont, err := f(in); err != nil || !cont { 679 return err 680 } 681 if err := VisitTableName(in.Table, f); err != nil { 682 return err 683 } 684 for _, el := range in.AlterOptions { 685 if err := VisitAlterOption(el, f); err != nil { 686 return err 687 } 688 } 689 if err := VisitRefOfPartitionSpec(in.PartitionSpec, f); err != nil { 690 return err 691 } 692 if err := VisitRefOfPartitionOption(in.PartitionOption, f); err != nil { 693 return err 694 } 695 if err := VisitRefOfParsedComments(in.Comments, f); err != nil { 696 return err 697 } 698 return nil 699 } 700 func VisitRefOfAlterView(in *AlterView, f Visit) error { 701 if in == nil { 702 return nil 703 } 704 if cont, err := f(in); err != nil || !cont { 705 return err 706 } 707 if err := VisitTableName(in.ViewName, f); err != nil { 708 return err 709 } 710 if err := VisitRefOfDefiner(in.Definer, f); err != nil { 711 return err 712 } 713 if err := VisitColumns(in.Columns, f); err != nil { 714 return err 715 } 716 if err := VisitSelectStatement(in.Select, f); err != nil { 717 return err 718 } 719 if err := VisitRefOfParsedComments(in.Comments, f); err != nil { 720 return err 721 } 722 return nil 723 } 724 func VisitRefOfAlterVschema(in *AlterVschema, f Visit) error { 725 if in == nil { 726 return nil 727 } 728 if cont, err := f(in); err != nil || !cont { 729 return err 730 } 731 if err := VisitTableName(in.Table, f); err != nil { 732 return err 733 } 734 if err := VisitRefOfVindexSpec(in.VindexSpec, f); err != nil { 735 return err 736 } 737 for _, el := range in.VindexCols { 738 if err := VisitIdentifierCI(el, f); err != nil { 739 return err 740 } 741 } 742 if err := VisitRefOfAutoIncSpec(in.AutoIncSpec, f); err != nil { 743 return err 744 } 745 return nil 746 } 747 func VisitRefOfAndExpr(in *AndExpr, f Visit) error { 748 if in == nil { 749 return nil 750 } 751 if cont, err := f(in); err != nil || !cont { 752 return err 753 } 754 if err := VisitExpr(in.Left, f); err != nil { 755 return err 756 } 757 if err := VisitExpr(in.Right, f); err != nil { 758 return err 759 } 760 return nil 761 } 762 func VisitRefOfArgumentLessWindowExpr(in *ArgumentLessWindowExpr, f Visit) error { 763 if in == nil { 764 return nil 765 } 766 if cont, err := f(in); err != nil || !cont { 767 return err 768 } 769 if err := VisitRefOfOverClause(in.OverClause, f); err != nil { 770 return err 771 } 772 return nil 773 } 774 func VisitRefOfAutoIncSpec(in *AutoIncSpec, f Visit) error { 775 if in == nil { 776 return nil 777 } 778 if cont, err := f(in); err != nil || !cont { 779 return err 780 } 781 if err := VisitIdentifierCI(in.Column, f); err != nil { 782 return err 783 } 784 if err := VisitTableName(in.Sequence, f); err != nil { 785 return err 786 } 787 return nil 788 } 789 func VisitRefOfAvg(in *Avg, 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 := VisitExpr(in.Arg, f); err != nil { 797 return err 798 } 799 return nil 800 } 801 func VisitRefOfBegin(in *Begin, f Visit) error { 802 if in == nil { 803 return nil 804 } 805 if cont, err := f(in); err != nil || !cont { 806 return err 807 } 808 return nil 809 } 810 func VisitRefOfBetweenExpr(in *BetweenExpr, f Visit) error { 811 if in == nil { 812 return nil 813 } 814 if cont, err := f(in); err != nil || !cont { 815 return err 816 } 817 if err := VisitExpr(in.Left, f); err != nil { 818 return err 819 } 820 if err := VisitExpr(in.From, f); err != nil { 821 return err 822 } 823 if err := VisitExpr(in.To, f); err != nil { 824 return err 825 } 826 return nil 827 } 828 func VisitRefOfBinaryExpr(in *BinaryExpr, f Visit) error { 829 if in == nil { 830 return nil 831 } 832 if cont, err := f(in); err != nil || !cont { 833 return err 834 } 835 if err := VisitExpr(in.Left, f); err != nil { 836 return err 837 } 838 if err := VisitExpr(in.Right, f); err != nil { 839 return err 840 } 841 return nil 842 } 843 func VisitRefOfBitAnd(in *BitAnd, f Visit) error { 844 if in == nil { 845 return nil 846 } 847 if cont, err := f(in); err != nil || !cont { 848 return err 849 } 850 if err := VisitExpr(in.Arg, f); err != nil { 851 return err 852 } 853 return nil 854 } 855 func VisitRefOfBitOr(in *BitOr, f Visit) error { 856 if in == nil { 857 return nil 858 } 859 if cont, err := f(in); err != nil || !cont { 860 return err 861 } 862 if err := VisitExpr(in.Arg, f); err != nil { 863 return err 864 } 865 return nil 866 } 867 func VisitRefOfBitXor(in *BitXor, f Visit) error { 868 if in == nil { 869 return nil 870 } 871 if cont, err := f(in); err != nil || !cont { 872 return err 873 } 874 if err := VisitExpr(in.Arg, f); err != nil { 875 return err 876 } 877 return nil 878 } 879 func VisitRefOfCallProc(in *CallProc, f Visit) error { 880 if in == nil { 881 return nil 882 } 883 if cont, err := f(in); err != nil || !cont { 884 return err 885 } 886 if err := VisitTableName(in.Name, f); err != nil { 887 return err 888 } 889 if err := VisitExprs(in.Params, f); err != nil { 890 return err 891 } 892 return nil 893 } 894 func VisitRefOfCaseExpr(in *CaseExpr, f Visit) error { 895 if in == nil { 896 return nil 897 } 898 if cont, err := f(in); err != nil || !cont { 899 return err 900 } 901 if err := VisitExpr(in.Expr, f); err != nil { 902 return err 903 } 904 for _, el := range in.Whens { 905 if err := VisitRefOfWhen(el, f); err != nil { 906 return err 907 } 908 } 909 if err := VisitExpr(in.Else, f); err != nil { 910 return err 911 } 912 return nil 913 } 914 func VisitRefOfCastExpr(in *CastExpr, f Visit) error { 915 if in == nil { 916 return nil 917 } 918 if cont, err := f(in); err != nil || !cont { 919 return err 920 } 921 if err := VisitExpr(in.Expr, f); err != nil { 922 return err 923 } 924 if err := VisitRefOfConvertType(in.Type, f); err != nil { 925 return err 926 } 927 return nil 928 } 929 func VisitRefOfChangeColumn(in *ChangeColumn, f Visit) error { 930 if in == nil { 931 return nil 932 } 933 if cont, err := f(in); err != nil || !cont { 934 return err 935 } 936 if err := VisitRefOfColName(in.OldColumn, f); err != nil { 937 return err 938 } 939 if err := VisitRefOfColumnDefinition(in.NewColDefinition, f); err != nil { 940 return err 941 } 942 if err := VisitRefOfColName(in.After, f); err != nil { 943 return err 944 } 945 return nil 946 } 947 func VisitRefOfCharExpr(in *CharExpr, f Visit) error { 948 if in == nil { 949 return nil 950 } 951 if cont, err := f(in); err != nil || !cont { 952 return err 953 } 954 if err := VisitExprs(in.Exprs, f); err != nil { 955 return err 956 } 957 return nil 958 } 959 func VisitRefOfCheckConstraintDefinition(in *CheckConstraintDefinition, f Visit) error { 960 if in == nil { 961 return nil 962 } 963 if cont, err := f(in); err != nil || !cont { 964 return err 965 } 966 if err := VisitExpr(in.Expr, f); err != nil { 967 return err 968 } 969 return nil 970 } 971 func VisitRefOfColName(in *ColName, f Visit) error { 972 if in == nil { 973 return nil 974 } 975 if cont, err := f(in); err != nil || !cont { 976 return err 977 } 978 if err := VisitIdentifierCI(in.Name, f); err != nil { 979 return err 980 } 981 if err := VisitTableName(in.Qualifier, f); err != nil { 982 return err 983 } 984 return nil 985 } 986 func VisitRefOfCollateExpr(in *CollateExpr, f Visit) error { 987 if in == nil { 988 return nil 989 } 990 if cont, err := f(in); err != nil || !cont { 991 return err 992 } 993 if err := VisitExpr(in.Expr, f); err != nil { 994 return err 995 } 996 return nil 997 } 998 func VisitRefOfColumnDefinition(in *ColumnDefinition, f Visit) error { 999 if in == nil { 1000 return nil 1001 } 1002 if cont, err := f(in); err != nil || !cont { 1003 return err 1004 } 1005 if err := VisitIdentifierCI(in.Name, f); err != nil { 1006 return err 1007 } 1008 if err := VisitRefOfColumnType(in.Type, f); err != nil { 1009 return err 1010 } 1011 return nil 1012 } 1013 func VisitRefOfColumnType(in *ColumnType, f Visit) error { 1014 if in == nil { 1015 return nil 1016 } 1017 if cont, err := f(in); err != nil || !cont { 1018 return err 1019 } 1020 if err := VisitRefOfLiteral(in.Length, f); err != nil { 1021 return err 1022 } 1023 if err := VisitRefOfLiteral(in.Scale, f); err != nil { 1024 return err 1025 } 1026 return nil 1027 } 1028 func VisitColumns(in Columns, f Visit) error { 1029 if in == nil { 1030 return nil 1031 } 1032 if cont, err := f(in); err != nil || !cont { 1033 return err 1034 } 1035 for _, el := range in { 1036 if err := VisitIdentifierCI(el, f); err != nil { 1037 return err 1038 } 1039 } 1040 return nil 1041 } 1042 func VisitRefOfCommentOnly(in *CommentOnly, f Visit) error { 1043 if in == nil { 1044 return nil 1045 } 1046 if cont, err := f(in); err != nil || !cont { 1047 return err 1048 } 1049 return nil 1050 } 1051 func VisitRefOfCommit(in *Commit, f Visit) error { 1052 if in == nil { 1053 return nil 1054 } 1055 if cont, err := f(in); err != nil || !cont { 1056 return err 1057 } 1058 return nil 1059 } 1060 func VisitRefOfCommonTableExpr(in *CommonTableExpr, f Visit) error { 1061 if in == nil { 1062 return nil 1063 } 1064 if cont, err := f(in); err != nil || !cont { 1065 return err 1066 } 1067 if err := VisitIdentifierCS(in.ID, f); err != nil { 1068 return err 1069 } 1070 if err := VisitColumns(in.Columns, f); err != nil { 1071 return err 1072 } 1073 if err := VisitRefOfSubquery(in.Subquery, f); err != nil { 1074 return err 1075 } 1076 return nil 1077 } 1078 func VisitRefOfComparisonExpr(in *ComparisonExpr, f Visit) error { 1079 if in == nil { 1080 return nil 1081 } 1082 if cont, err := f(in); err != nil || !cont { 1083 return err 1084 } 1085 if err := VisitExpr(in.Left, f); err != nil { 1086 return err 1087 } 1088 if err := VisitExpr(in.Right, f); err != nil { 1089 return err 1090 } 1091 if err := VisitExpr(in.Escape, f); err != nil { 1092 return err 1093 } 1094 return nil 1095 } 1096 func VisitRefOfConstraintDefinition(in *ConstraintDefinition, f Visit) error { 1097 if in == nil { 1098 return nil 1099 } 1100 if cont, err := f(in); err != nil || !cont { 1101 return err 1102 } 1103 if err := VisitIdentifierCI(in.Name, f); err != nil { 1104 return err 1105 } 1106 if err := VisitConstraintInfo(in.Details, f); err != nil { 1107 return err 1108 } 1109 return nil 1110 } 1111 func VisitRefOfConvertExpr(in *ConvertExpr, f Visit) error { 1112 if in == nil { 1113 return nil 1114 } 1115 if cont, err := f(in); err != nil || !cont { 1116 return err 1117 } 1118 if err := VisitExpr(in.Expr, f); err != nil { 1119 return err 1120 } 1121 if err := VisitRefOfConvertType(in.Type, f); err != nil { 1122 return err 1123 } 1124 return nil 1125 } 1126 func VisitRefOfConvertType(in *ConvertType, f Visit) error { 1127 if in == nil { 1128 return nil 1129 } 1130 if cont, err := f(in); err != nil || !cont { 1131 return err 1132 } 1133 if err := VisitRefOfLiteral(in.Length, f); err != nil { 1134 return err 1135 } 1136 if err := VisitRefOfLiteral(in.Scale, f); err != nil { 1137 return err 1138 } 1139 return nil 1140 } 1141 func VisitRefOfConvertUsingExpr(in *ConvertUsingExpr, f Visit) error { 1142 if in == nil { 1143 return nil 1144 } 1145 if cont, err := f(in); err != nil || !cont { 1146 return err 1147 } 1148 if err := VisitExpr(in.Expr, f); err != nil { 1149 return err 1150 } 1151 return nil 1152 } 1153 func VisitRefOfCount(in *Count, f Visit) error { 1154 if in == nil { 1155 return nil 1156 } 1157 if cont, err := f(in); err != nil || !cont { 1158 return err 1159 } 1160 if err := VisitExprs(in.Args, f); err != nil { 1161 return err 1162 } 1163 return nil 1164 } 1165 func VisitRefOfCountStar(in *CountStar, f Visit) error { 1166 if in == nil { 1167 return nil 1168 } 1169 if cont, err := f(in); err != nil || !cont { 1170 return err 1171 } 1172 return nil 1173 } 1174 func VisitRefOfCreateDatabase(in *CreateDatabase, f Visit) error { 1175 if in == nil { 1176 return nil 1177 } 1178 if cont, err := f(in); err != nil || !cont { 1179 return err 1180 } 1181 if err := VisitRefOfParsedComments(in.Comments, f); err != nil { 1182 return err 1183 } 1184 if err := VisitIdentifierCS(in.DBName, f); err != nil { 1185 return err 1186 } 1187 return nil 1188 } 1189 func VisitRefOfCreateTable(in *CreateTable, f Visit) error { 1190 if in == nil { 1191 return nil 1192 } 1193 if cont, err := f(in); err != nil || !cont { 1194 return err 1195 } 1196 if err := VisitTableName(in.Table, f); err != nil { 1197 return err 1198 } 1199 if err := VisitRefOfTableSpec(in.TableSpec, f); err != nil { 1200 return err 1201 } 1202 if err := VisitRefOfOptLike(in.OptLike, f); err != nil { 1203 return err 1204 } 1205 if err := VisitRefOfParsedComments(in.Comments, f); err != nil { 1206 return err 1207 } 1208 return nil 1209 } 1210 func VisitRefOfCreateView(in *CreateView, f Visit) error { 1211 if in == nil { 1212 return nil 1213 } 1214 if cont, err := f(in); err != nil || !cont { 1215 return err 1216 } 1217 if err := VisitTableName(in.ViewName, f); err != nil { 1218 return err 1219 } 1220 if err := VisitRefOfDefiner(in.Definer, f); err != nil { 1221 return err 1222 } 1223 if err := VisitColumns(in.Columns, f); err != nil { 1224 return err 1225 } 1226 if err := VisitSelectStatement(in.Select, f); err != nil { 1227 return err 1228 } 1229 if err := VisitRefOfParsedComments(in.Comments, f); err != nil { 1230 return err 1231 } 1232 return nil 1233 } 1234 func VisitRefOfCurTimeFuncExpr(in *CurTimeFuncExpr, 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 if err := VisitIdentifierCI(in.Name, f); err != nil { 1242 return err 1243 } 1244 if err := VisitExpr(in.Fsp, f); err != nil { 1245 return err 1246 } 1247 return nil 1248 } 1249 func VisitRefOfDeallocateStmt(in *DeallocateStmt, f Visit) error { 1250 if in == nil { 1251 return nil 1252 } 1253 if cont, err := f(in); err != nil || !cont { 1254 return err 1255 } 1256 if err := VisitRefOfParsedComments(in.Comments, f); err != nil { 1257 return err 1258 } 1259 if err := VisitIdentifierCI(in.Name, f); err != nil { 1260 return err 1261 } 1262 return nil 1263 } 1264 func VisitRefOfDefault(in *Default, f Visit) error { 1265 if in == nil { 1266 return nil 1267 } 1268 if cont, err := f(in); err != nil || !cont { 1269 return err 1270 } 1271 return nil 1272 } 1273 func VisitRefOfDefiner(in *Definer, f Visit) error { 1274 if in == nil { 1275 return nil 1276 } 1277 if cont, err := f(in); err != nil || !cont { 1278 return err 1279 } 1280 return nil 1281 } 1282 func VisitRefOfDelete(in *Delete, f Visit) error { 1283 if in == nil { 1284 return nil 1285 } 1286 if cont, err := f(in); err != nil || !cont { 1287 return err 1288 } 1289 if err := VisitRefOfWith(in.With, f); err != nil { 1290 return err 1291 } 1292 if err := VisitRefOfParsedComments(in.Comments, f); err != nil { 1293 return err 1294 } 1295 if err := VisitTableNames(in.Targets, f); err != nil { 1296 return err 1297 } 1298 if err := VisitTableExprs(in.TableExprs, f); err != nil { 1299 return err 1300 } 1301 if err := VisitPartitions(in.Partitions, f); err != nil { 1302 return err 1303 } 1304 if err := VisitRefOfWhere(in.Where, f); err != nil { 1305 return err 1306 } 1307 if err := VisitOrderBy(in.OrderBy, f); err != nil { 1308 return err 1309 } 1310 if err := VisitRefOfLimit(in.Limit, f); err != nil { 1311 return err 1312 } 1313 return nil 1314 } 1315 func VisitRefOfDerivedTable(in *DerivedTable, f Visit) error { 1316 if in == nil { 1317 return nil 1318 } 1319 if cont, err := f(in); err != nil || !cont { 1320 return err 1321 } 1322 if err := VisitSelectStatement(in.Select, f); err != nil { 1323 return err 1324 } 1325 return nil 1326 } 1327 func VisitRefOfDropColumn(in *DropColumn, f Visit) error { 1328 if in == nil { 1329 return nil 1330 } 1331 if cont, err := f(in); err != nil || !cont { 1332 return err 1333 } 1334 if err := VisitRefOfColName(in.Name, f); err != nil { 1335 return err 1336 } 1337 return nil 1338 } 1339 func VisitRefOfDropDatabase(in *DropDatabase, f Visit) error { 1340 if in == nil { 1341 return nil 1342 } 1343 if cont, err := f(in); err != nil || !cont { 1344 return err 1345 } 1346 if err := VisitRefOfParsedComments(in.Comments, f); err != nil { 1347 return err 1348 } 1349 if err := VisitIdentifierCS(in.DBName, f); err != nil { 1350 return err 1351 } 1352 return nil 1353 } 1354 func VisitRefOfDropKey(in *DropKey, f Visit) error { 1355 if in == nil { 1356 return nil 1357 } 1358 if cont, err := f(in); err != nil || !cont { 1359 return err 1360 } 1361 if err := VisitIdentifierCI(in.Name, f); err != nil { 1362 return err 1363 } 1364 return nil 1365 } 1366 func VisitRefOfDropTable(in *DropTable, f Visit) error { 1367 if in == nil { 1368 return nil 1369 } 1370 if cont, err := f(in); err != nil || !cont { 1371 return err 1372 } 1373 if err := VisitTableNames(in.FromTables, f); err != nil { 1374 return err 1375 } 1376 if err := VisitRefOfParsedComments(in.Comments, f); err != nil { 1377 return err 1378 } 1379 return nil 1380 } 1381 func VisitRefOfDropView(in *DropView, f Visit) error { 1382 if in == nil { 1383 return nil 1384 } 1385 if cont, err := f(in); err != nil || !cont { 1386 return err 1387 } 1388 if err := VisitTableNames(in.FromTables, f); err != nil { 1389 return err 1390 } 1391 if err := VisitRefOfParsedComments(in.Comments, f); err != nil { 1392 return err 1393 } 1394 return nil 1395 } 1396 func VisitRefOfExecuteStmt(in *ExecuteStmt, f Visit) error { 1397 if in == nil { 1398 return nil 1399 } 1400 if cont, err := f(in); err != nil || !cont { 1401 return err 1402 } 1403 if err := VisitIdentifierCI(in.Name, f); err != nil { 1404 return err 1405 } 1406 if err := VisitRefOfParsedComments(in.Comments, f); err != nil { 1407 return err 1408 } 1409 for _, el := range in.Arguments { 1410 if err := VisitRefOfVariable(el, f); err != nil { 1411 return err 1412 } 1413 } 1414 return nil 1415 } 1416 func VisitRefOfExistsExpr(in *ExistsExpr, f Visit) error { 1417 if in == nil { 1418 return nil 1419 } 1420 if cont, err := f(in); err != nil || !cont { 1421 return err 1422 } 1423 if err := VisitRefOfSubquery(in.Subquery, f); err != nil { 1424 return err 1425 } 1426 return nil 1427 } 1428 func VisitRefOfExplainStmt(in *ExplainStmt, f Visit) error { 1429 if in == nil { 1430 return nil 1431 } 1432 if cont, err := f(in); err != nil || !cont { 1433 return err 1434 } 1435 if err := VisitStatement(in.Statement, f); err != nil { 1436 return err 1437 } 1438 if err := VisitRefOfParsedComments(in.Comments, f); err != nil { 1439 return err 1440 } 1441 return nil 1442 } 1443 func VisitRefOfExplainTab(in *ExplainTab, f Visit) error { 1444 if in == nil { 1445 return nil 1446 } 1447 if cont, err := f(in); err != nil || !cont { 1448 return err 1449 } 1450 if err := VisitTableName(in.Table, f); err != nil { 1451 return err 1452 } 1453 return nil 1454 } 1455 func VisitExprs(in Exprs, f Visit) error { 1456 if in == nil { 1457 return nil 1458 } 1459 if cont, err := f(in); err != nil || !cont { 1460 return err 1461 } 1462 for _, el := range in { 1463 if err := VisitExpr(el, f); err != nil { 1464 return err 1465 } 1466 } 1467 return nil 1468 } 1469 func VisitRefOfExtractFuncExpr(in *ExtractFuncExpr, f Visit) error { 1470 if in == nil { 1471 return nil 1472 } 1473 if cont, err := f(in); err != nil || !cont { 1474 return err 1475 } 1476 if err := VisitExpr(in.Expr, f); err != nil { 1477 return err 1478 } 1479 return nil 1480 } 1481 func VisitRefOfExtractValueExpr(in *ExtractValueExpr, f Visit) error { 1482 if in == nil { 1483 return nil 1484 } 1485 if cont, err := f(in); err != nil || !cont { 1486 return err 1487 } 1488 if err := VisitExpr(in.Fragment, f); err != nil { 1489 return err 1490 } 1491 if err := VisitExpr(in.XPathExpr, f); err != nil { 1492 return err 1493 } 1494 return nil 1495 } 1496 func VisitRefOfExtractedSubquery(in *ExtractedSubquery, 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 := VisitExpr(in.Original, f); err != nil { 1504 return err 1505 } 1506 if err := VisitRefOfSubquery(in.Subquery, f); err != nil { 1507 return err 1508 } 1509 if err := VisitExpr(in.OtherSide, f); err != nil { 1510 return err 1511 } 1512 if err := VisitExpr(in.alternative, f); err != nil { 1513 return err 1514 } 1515 return nil 1516 } 1517 func VisitRefOfFirstOrLastValueExpr(in *FirstOrLastValueExpr, f Visit) error { 1518 if in == nil { 1519 return nil 1520 } 1521 if cont, err := f(in); err != nil || !cont { 1522 return err 1523 } 1524 if err := VisitExpr(in.Expr, f); err != nil { 1525 return err 1526 } 1527 if err := VisitRefOfNullTreatmentClause(in.NullTreatmentClause, f); err != nil { 1528 return err 1529 } 1530 if err := VisitRefOfOverClause(in.OverClause, f); err != nil { 1531 return err 1532 } 1533 return nil 1534 } 1535 func VisitRefOfFlush(in *Flush, 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 if err := VisitTableNames(in.TableNames, f); err != nil { 1543 return err 1544 } 1545 return nil 1546 } 1547 func VisitRefOfForce(in *Force, f Visit) error { 1548 if in == nil { 1549 return nil 1550 } 1551 if cont, err := f(in); err != nil || !cont { 1552 return err 1553 } 1554 return nil 1555 } 1556 func VisitRefOfForeignKeyDefinition(in *ForeignKeyDefinition, f Visit) error { 1557 if in == nil { 1558 return nil 1559 } 1560 if cont, err := f(in); err != nil || !cont { 1561 return err 1562 } 1563 if err := VisitColumns(in.Source, f); err != nil { 1564 return err 1565 } 1566 if err := VisitIdentifierCI(in.IndexName, f); err != nil { 1567 return err 1568 } 1569 if err := VisitRefOfReferenceDefinition(in.ReferenceDefinition, f); err != nil { 1570 return err 1571 } 1572 return nil 1573 } 1574 func VisitRefOfFrameClause(in *FrameClause, f Visit) error { 1575 if in == nil { 1576 return nil 1577 } 1578 if cont, err := f(in); err != nil || !cont { 1579 return err 1580 } 1581 if err := VisitRefOfFramePoint(in.Start, f); err != nil { 1582 return err 1583 } 1584 if err := VisitRefOfFramePoint(in.End, f); err != nil { 1585 return err 1586 } 1587 return nil 1588 } 1589 func VisitRefOfFramePoint(in *FramePoint, f Visit) error { 1590 if in == nil { 1591 return nil 1592 } 1593 if cont, err := f(in); err != nil || !cont { 1594 return err 1595 } 1596 if err := VisitExpr(in.Expr, f); err != nil { 1597 return err 1598 } 1599 return nil 1600 } 1601 func VisitRefOfFromFirstLastClause(in *FromFirstLastClause, f Visit) error { 1602 if in == nil { 1603 return nil 1604 } 1605 if cont, err := f(in); err != nil || !cont { 1606 return err 1607 } 1608 return nil 1609 } 1610 func VisitRefOfFuncExpr(in *FuncExpr, f Visit) error { 1611 if in == nil { 1612 return nil 1613 } 1614 if cont, err := f(in); err != nil || !cont { 1615 return err 1616 } 1617 if err := VisitIdentifierCS(in.Qualifier, f); err != nil { 1618 return err 1619 } 1620 if err := VisitIdentifierCI(in.Name, f); err != nil { 1621 return err 1622 } 1623 if err := VisitSelectExprs(in.Exprs, f); err != nil { 1624 return err 1625 } 1626 return nil 1627 } 1628 func VisitRefOfGTIDFuncExpr(in *GTIDFuncExpr, f Visit) error { 1629 if in == nil { 1630 return nil 1631 } 1632 if cont, err := f(in); err != nil || !cont { 1633 return err 1634 } 1635 if err := VisitExpr(in.Set1, f); err != nil { 1636 return err 1637 } 1638 if err := VisitExpr(in.Set2, f); err != nil { 1639 return err 1640 } 1641 if err := VisitExpr(in.Timeout, f); err != nil { 1642 return err 1643 } 1644 if err := VisitExpr(in.Channel, f); err != nil { 1645 return err 1646 } 1647 return nil 1648 } 1649 func VisitGroupBy(in GroupBy, f Visit) error { 1650 if in == nil { 1651 return nil 1652 } 1653 if cont, err := f(in); err != nil || !cont { 1654 return err 1655 } 1656 for _, el := range in { 1657 if err := VisitExpr(el, f); err != nil { 1658 return err 1659 } 1660 } 1661 return nil 1662 } 1663 func VisitRefOfGroupConcatExpr(in *GroupConcatExpr, f Visit) error { 1664 if in == nil { 1665 return nil 1666 } 1667 if cont, err := f(in); err != nil || !cont { 1668 return err 1669 } 1670 if err := VisitExprs(in.Exprs, f); err != nil { 1671 return err 1672 } 1673 if err := VisitOrderBy(in.OrderBy, f); err != nil { 1674 return err 1675 } 1676 if err := VisitRefOfLimit(in.Limit, f); err != nil { 1677 return err 1678 } 1679 return nil 1680 } 1681 func VisitIdentifierCI(in IdentifierCI, f Visit) error { 1682 if cont, err := f(in); err != nil || !cont { 1683 return err 1684 } 1685 return nil 1686 } 1687 func VisitIdentifierCS(in IdentifierCS, f Visit) error { 1688 if cont, err := f(in); err != nil || !cont { 1689 return err 1690 } 1691 return nil 1692 } 1693 func VisitRefOfIndexDefinition(in *IndexDefinition, f Visit) error { 1694 if in == nil { 1695 return nil 1696 } 1697 if cont, err := f(in); err != nil || !cont { 1698 return err 1699 } 1700 if err := VisitRefOfIndexInfo(in.Info, f); err != nil { 1701 return err 1702 } 1703 return nil 1704 } 1705 func VisitRefOfIndexHint(in *IndexHint, f Visit) error { 1706 if in == nil { 1707 return nil 1708 } 1709 if cont, err := f(in); err != nil || !cont { 1710 return err 1711 } 1712 for _, el := range in.Indexes { 1713 if err := VisitIdentifierCI(el, f); err != nil { 1714 return err 1715 } 1716 } 1717 return nil 1718 } 1719 func VisitIndexHints(in IndexHints, f Visit) error { 1720 if in == nil { 1721 return nil 1722 } 1723 if cont, err := f(in); err != nil || !cont { 1724 return err 1725 } 1726 for _, el := range in { 1727 if err := VisitRefOfIndexHint(el, f); err != nil { 1728 return err 1729 } 1730 } 1731 return nil 1732 } 1733 func VisitRefOfIndexInfo(in *IndexInfo, f Visit) error { 1734 if in == nil { 1735 return nil 1736 } 1737 if cont, err := f(in); err != nil || !cont { 1738 return err 1739 } 1740 if err := VisitIdentifierCI(in.Name, f); err != nil { 1741 return err 1742 } 1743 if err := VisitIdentifierCI(in.ConstraintName, f); err != nil { 1744 return err 1745 } 1746 return nil 1747 } 1748 func VisitRefOfInsert(in *Insert, f Visit) error { 1749 if in == nil { 1750 return nil 1751 } 1752 if cont, err := f(in); err != nil || !cont { 1753 return err 1754 } 1755 if err := VisitRefOfParsedComments(in.Comments, f); err != nil { 1756 return err 1757 } 1758 if err := VisitTableName(in.Table, f); err != nil { 1759 return err 1760 } 1761 if err := VisitPartitions(in.Partitions, f); err != nil { 1762 return err 1763 } 1764 if err := VisitColumns(in.Columns, f); err != nil { 1765 return err 1766 } 1767 if err := VisitInsertRows(in.Rows, f); err != nil { 1768 return err 1769 } 1770 if err := VisitOnDup(in.OnDup, f); err != nil { 1771 return err 1772 } 1773 return nil 1774 } 1775 func VisitRefOfInsertExpr(in *InsertExpr, f Visit) error { 1776 if in == nil { 1777 return nil 1778 } 1779 if cont, err := f(in); err != nil || !cont { 1780 return err 1781 } 1782 if err := VisitExpr(in.Str, f); err != nil { 1783 return err 1784 } 1785 if err := VisitExpr(in.Pos, f); err != nil { 1786 return err 1787 } 1788 if err := VisitExpr(in.Len, f); err != nil { 1789 return err 1790 } 1791 if err := VisitExpr(in.NewStr, f); err != nil { 1792 return err 1793 } 1794 return nil 1795 } 1796 func VisitRefOfIntervalExpr(in *IntervalExpr, f Visit) error { 1797 if in == nil { 1798 return nil 1799 } 1800 if cont, err := f(in); err != nil || !cont { 1801 return err 1802 } 1803 if err := VisitExpr(in.Expr, f); err != nil { 1804 return err 1805 } 1806 return nil 1807 } 1808 func VisitRefOfIntervalFuncExpr(in *IntervalFuncExpr, f Visit) error { 1809 if in == nil { 1810 return nil 1811 } 1812 if cont, err := f(in); err != nil || !cont { 1813 return err 1814 } 1815 if err := VisitExpr(in.Expr, f); err != nil { 1816 return err 1817 } 1818 if err := VisitExprs(in.Exprs, f); err != nil { 1819 return err 1820 } 1821 return nil 1822 } 1823 func VisitRefOfIntroducerExpr(in *IntroducerExpr, f Visit) error { 1824 if in == nil { 1825 return nil 1826 } 1827 if cont, err := f(in); err != nil || !cont { 1828 return err 1829 } 1830 if err := VisitExpr(in.Expr, f); err != nil { 1831 return err 1832 } 1833 return nil 1834 } 1835 func VisitRefOfIsExpr(in *IsExpr, f Visit) error { 1836 if in == nil { 1837 return nil 1838 } 1839 if cont, err := f(in); err != nil || !cont { 1840 return err 1841 } 1842 if err := VisitExpr(in.Left, f); err != nil { 1843 return err 1844 } 1845 return nil 1846 } 1847 func VisitRefOfJSONArrayExpr(in *JSONArrayExpr, 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 if err := VisitExprs(in.Params, f); err != nil { 1855 return err 1856 } 1857 return nil 1858 } 1859 func VisitRefOfJSONAttributesExpr(in *JSONAttributesExpr, f Visit) error { 1860 if in == nil { 1861 return nil 1862 } 1863 if cont, err := f(in); err != nil || !cont { 1864 return err 1865 } 1866 if err := VisitExpr(in.JSONDoc, f); err != nil { 1867 return err 1868 } 1869 if err := VisitExpr(in.Path, f); err != nil { 1870 return err 1871 } 1872 return nil 1873 } 1874 func VisitRefOfJSONContainsExpr(in *JSONContainsExpr, f Visit) error { 1875 if in == nil { 1876 return nil 1877 } 1878 if cont, err := f(in); err != nil || !cont { 1879 return err 1880 } 1881 if err := VisitExpr(in.Target, f); err != nil { 1882 return err 1883 } 1884 if err := VisitExpr(in.Candidate, f); err != nil { 1885 return err 1886 } 1887 for _, el := range in.PathList { 1888 if err := VisitExpr(el, f); err != nil { 1889 return err 1890 } 1891 } 1892 return nil 1893 } 1894 func VisitRefOfJSONContainsPathExpr(in *JSONContainsPathExpr, f Visit) error { 1895 if in == nil { 1896 return nil 1897 } 1898 if cont, err := f(in); err != nil || !cont { 1899 return err 1900 } 1901 if err := VisitExpr(in.JSONDoc, f); err != nil { 1902 return err 1903 } 1904 if err := VisitExpr(in.OneOrAll, f); err != nil { 1905 return err 1906 } 1907 for _, el := range in.PathList { 1908 if err := VisitExpr(el, f); err != nil { 1909 return err 1910 } 1911 } 1912 return nil 1913 } 1914 func VisitRefOfJSONExtractExpr(in *JSONExtractExpr, f Visit) error { 1915 if in == nil { 1916 return nil 1917 } 1918 if cont, err := f(in); err != nil || !cont { 1919 return err 1920 } 1921 if err := VisitExpr(in.JSONDoc, f); err != nil { 1922 return err 1923 } 1924 for _, el := range in.PathList { 1925 if err := VisitExpr(el, f); err != nil { 1926 return err 1927 } 1928 } 1929 return nil 1930 } 1931 func VisitRefOfJSONKeysExpr(in *JSONKeysExpr, f Visit) error { 1932 if in == nil { 1933 return nil 1934 } 1935 if cont, err := f(in); err != nil || !cont { 1936 return err 1937 } 1938 if err := VisitExpr(in.JSONDoc, f); err != nil { 1939 return err 1940 } 1941 if err := VisitExpr(in.Path, f); err != nil { 1942 return err 1943 } 1944 return nil 1945 } 1946 func VisitRefOfJSONObjectExpr(in *JSONObjectExpr, f Visit) error { 1947 if in == nil { 1948 return nil 1949 } 1950 if cont, err := f(in); err != nil || !cont { 1951 return err 1952 } 1953 for _, el := range in.Params { 1954 if err := VisitRefOfJSONObjectParam(el, f); err != nil { 1955 return err 1956 } 1957 } 1958 return nil 1959 } 1960 func VisitRefOfJSONObjectParam(in *JSONObjectParam, f Visit) error { 1961 if in == nil { 1962 return nil 1963 } 1964 if cont, err := f(in); err != nil || !cont { 1965 return err 1966 } 1967 if err := VisitExpr(in.Key, f); err != nil { 1968 return err 1969 } 1970 if err := VisitExpr(in.Value, f); err != nil { 1971 return err 1972 } 1973 return nil 1974 } 1975 func VisitRefOfJSONOverlapsExpr(in *JSONOverlapsExpr, f Visit) error { 1976 if in == nil { 1977 return nil 1978 } 1979 if cont, err := f(in); err != nil || !cont { 1980 return err 1981 } 1982 if err := VisitExpr(in.JSONDoc1, f); err != nil { 1983 return err 1984 } 1985 if err := VisitExpr(in.JSONDoc2, f); err != nil { 1986 return err 1987 } 1988 return nil 1989 } 1990 func VisitRefOfJSONPrettyExpr(in *JSONPrettyExpr, f Visit) error { 1991 if in == nil { 1992 return nil 1993 } 1994 if cont, err := f(in); err != nil || !cont { 1995 return err 1996 } 1997 if err := VisitExpr(in.JSONVal, f); err != nil { 1998 return err 1999 } 2000 return nil 2001 } 2002 func VisitRefOfJSONQuoteExpr(in *JSONQuoteExpr, f Visit) error { 2003 if in == nil { 2004 return nil 2005 } 2006 if cont, err := f(in); err != nil || !cont { 2007 return err 2008 } 2009 if err := VisitExpr(in.StringArg, f); err != nil { 2010 return err 2011 } 2012 return nil 2013 } 2014 func VisitRefOfJSONRemoveExpr(in *JSONRemoveExpr, f Visit) error { 2015 if in == nil { 2016 return nil 2017 } 2018 if cont, err := f(in); err != nil || !cont { 2019 return err 2020 } 2021 if err := VisitExpr(in.JSONDoc, f); err != nil { 2022 return err 2023 } 2024 if err := VisitExprs(in.PathList, f); err != nil { 2025 return err 2026 } 2027 return nil 2028 } 2029 func VisitRefOfJSONSchemaValidFuncExpr(in *JSONSchemaValidFuncExpr, f Visit) error { 2030 if in == nil { 2031 return nil 2032 } 2033 if cont, err := f(in); err != nil || !cont { 2034 return err 2035 } 2036 if err := VisitExpr(in.Schema, f); err != nil { 2037 return err 2038 } 2039 if err := VisitExpr(in.Document, f); err != nil { 2040 return err 2041 } 2042 return nil 2043 } 2044 func VisitRefOfJSONSchemaValidationReportFuncExpr(in *JSONSchemaValidationReportFuncExpr, f Visit) error { 2045 if in == nil { 2046 return nil 2047 } 2048 if cont, err := f(in); err != nil || !cont { 2049 return err 2050 } 2051 if err := VisitExpr(in.Schema, f); err != nil { 2052 return err 2053 } 2054 if err := VisitExpr(in.Document, f); err != nil { 2055 return err 2056 } 2057 return nil 2058 } 2059 func VisitRefOfJSONSearchExpr(in *JSONSearchExpr, f Visit) error { 2060 if in == nil { 2061 return nil 2062 } 2063 if cont, err := f(in); err != nil || !cont { 2064 return err 2065 } 2066 if err := VisitExpr(in.JSONDoc, f); err != nil { 2067 return err 2068 } 2069 if err := VisitExpr(in.OneOrAll, f); err != nil { 2070 return err 2071 } 2072 if err := VisitExpr(in.SearchStr, f); err != nil { 2073 return err 2074 } 2075 if err := VisitExpr(in.EscapeChar, f); err != nil { 2076 return err 2077 } 2078 for _, el := range in.PathList { 2079 if err := VisitExpr(el, f); err != nil { 2080 return err 2081 } 2082 } 2083 return nil 2084 } 2085 func VisitRefOfJSONStorageFreeExpr(in *JSONStorageFreeExpr, f Visit) error { 2086 if in == nil { 2087 return nil 2088 } 2089 if cont, err := f(in); err != nil || !cont { 2090 return err 2091 } 2092 if err := VisitExpr(in.JSONVal, f); err != nil { 2093 return err 2094 } 2095 return nil 2096 } 2097 func VisitRefOfJSONStorageSizeExpr(in *JSONStorageSizeExpr, f Visit) error { 2098 if in == nil { 2099 return nil 2100 } 2101 if cont, err := f(in); err != nil || !cont { 2102 return err 2103 } 2104 if err := VisitExpr(in.JSONVal, f); err != nil { 2105 return err 2106 } 2107 return nil 2108 } 2109 func VisitRefOfJSONTableExpr(in *JSONTableExpr, f Visit) error { 2110 if in == nil { 2111 return nil 2112 } 2113 if cont, err := f(in); err != nil || !cont { 2114 return err 2115 } 2116 if err := VisitExpr(in.Expr, f); err != nil { 2117 return err 2118 } 2119 if err := VisitIdentifierCS(in.Alias, f); err != nil { 2120 return err 2121 } 2122 if err := VisitExpr(in.Filter, f); err != nil { 2123 return err 2124 } 2125 for _, el := range in.Columns { 2126 if err := VisitRefOfJtColumnDefinition(el, f); err != nil { 2127 return err 2128 } 2129 } 2130 return nil 2131 } 2132 func VisitRefOfJSONUnquoteExpr(in *JSONUnquoteExpr, f Visit) error { 2133 if in == nil { 2134 return nil 2135 } 2136 if cont, err := f(in); err != nil || !cont { 2137 return err 2138 } 2139 if err := VisitExpr(in.JSONValue, f); err != nil { 2140 return err 2141 } 2142 return nil 2143 } 2144 func VisitRefOfJSONValueExpr(in *JSONValueExpr, f Visit) error { 2145 if in == nil { 2146 return nil 2147 } 2148 if cont, err := f(in); err != nil || !cont { 2149 return err 2150 } 2151 if err := VisitExpr(in.JSONDoc, f); err != nil { 2152 return err 2153 } 2154 if err := VisitExpr(in.Path, f); err != nil { 2155 return err 2156 } 2157 if err := VisitRefOfConvertType(in.ReturningType, f); err != nil { 2158 return err 2159 } 2160 if err := VisitRefOfJtOnResponse(in.EmptyOnResponse, f); err != nil { 2161 return err 2162 } 2163 if err := VisitRefOfJtOnResponse(in.ErrorOnResponse, f); err != nil { 2164 return err 2165 } 2166 return nil 2167 } 2168 func VisitRefOfJSONValueMergeExpr(in *JSONValueMergeExpr, 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.JSONDoc, f); err != nil { 2176 return err 2177 } 2178 if err := VisitExprs(in.JSONDocList, f); err != nil { 2179 return err 2180 } 2181 return nil 2182 } 2183 func VisitRefOfJSONValueModifierExpr(in *JSONValueModifierExpr, 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 := VisitExpr(in.JSONDoc, f); err != nil { 2191 return err 2192 } 2193 for _, el := range in.Params { 2194 if err := VisitRefOfJSONObjectParam(el, f); err != nil { 2195 return err 2196 } 2197 } 2198 return nil 2199 } 2200 func VisitRefOfJoinCondition(in *JoinCondition, f Visit) error { 2201 if in == nil { 2202 return nil 2203 } 2204 if cont, err := f(in); err != nil || !cont { 2205 return err 2206 } 2207 if err := VisitExpr(in.On, f); err != nil { 2208 return err 2209 } 2210 if err := VisitColumns(in.Using, f); err != nil { 2211 return err 2212 } 2213 return nil 2214 } 2215 func VisitRefOfJoinTableExpr(in *JoinTableExpr, f Visit) error { 2216 if in == nil { 2217 return nil 2218 } 2219 if cont, err := f(in); err != nil || !cont { 2220 return err 2221 } 2222 if err := VisitTableExpr(in.LeftExpr, f); err != nil { 2223 return err 2224 } 2225 if err := VisitTableExpr(in.RightExpr, f); err != nil { 2226 return err 2227 } 2228 if err := VisitRefOfJoinCondition(in.Condition, f); err != nil { 2229 return err 2230 } 2231 return nil 2232 } 2233 func VisitRefOfJtColumnDefinition(in *JtColumnDefinition, f Visit) error { 2234 if in == nil { 2235 return nil 2236 } 2237 if cont, err := f(in); err != nil || !cont { 2238 return err 2239 } 2240 return nil 2241 } 2242 func VisitRefOfJtOnResponse(in *JtOnResponse, f Visit) error { 2243 if in == nil { 2244 return nil 2245 } 2246 if cont, err := f(in); err != nil || !cont { 2247 return err 2248 } 2249 if err := VisitExpr(in.Expr, f); err != nil { 2250 return err 2251 } 2252 return nil 2253 } 2254 func VisitRefOfKeyState(in *KeyState, f Visit) error { 2255 if in == nil { 2256 return nil 2257 } 2258 if cont, err := f(in); err != nil || !cont { 2259 return err 2260 } 2261 return nil 2262 } 2263 func VisitRefOfLagLeadExpr(in *LagLeadExpr, f Visit) error { 2264 if in == nil { 2265 return nil 2266 } 2267 if cont, err := f(in); err != nil || !cont { 2268 return err 2269 } 2270 if err := VisitExpr(in.Expr, f); err != nil { 2271 return err 2272 } 2273 if err := VisitExpr(in.N, f); err != nil { 2274 return err 2275 } 2276 if err := VisitExpr(in.Default, f); err != nil { 2277 return err 2278 } 2279 if err := VisitRefOfOverClause(in.OverClause, f); err != nil { 2280 return err 2281 } 2282 if err := VisitRefOfNullTreatmentClause(in.NullTreatmentClause, f); err != nil { 2283 return err 2284 } 2285 return nil 2286 } 2287 func VisitRefOfLimit(in *Limit, f Visit) error { 2288 if in == nil { 2289 return nil 2290 } 2291 if cont, err := f(in); err != nil || !cont { 2292 return err 2293 } 2294 if err := VisitExpr(in.Offset, f); err != nil { 2295 return err 2296 } 2297 if err := VisitExpr(in.Rowcount, f); err != nil { 2298 return err 2299 } 2300 return nil 2301 } 2302 func VisitRefOfLineStringExpr(in *LineStringExpr, 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 := VisitExprs(in.PointParams, f); err != nil { 2310 return err 2311 } 2312 return nil 2313 } 2314 func VisitRefOfLiteral(in *Literal, 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 return nil 2322 } 2323 func VisitRefOfLoad(in *Load, f Visit) error { 2324 if in == nil { 2325 return nil 2326 } 2327 if cont, err := f(in); err != nil || !cont { 2328 return err 2329 } 2330 return nil 2331 } 2332 func VisitRefOfLocateExpr(in *LocateExpr, f Visit) error { 2333 if in == nil { 2334 return nil 2335 } 2336 if cont, err := f(in); err != nil || !cont { 2337 return err 2338 } 2339 if err := VisitExpr(in.SubStr, f); err != nil { 2340 return err 2341 } 2342 if err := VisitExpr(in.Str, f); err != nil { 2343 return err 2344 } 2345 if err := VisitExpr(in.Pos, f); err != nil { 2346 return err 2347 } 2348 return nil 2349 } 2350 func VisitRefOfLockOption(in *LockOption, f Visit) error { 2351 if in == nil { 2352 return nil 2353 } 2354 if cont, err := f(in); err != nil || !cont { 2355 return err 2356 } 2357 return nil 2358 } 2359 func VisitRefOfLockTables(in *LockTables, f Visit) error { 2360 if in == nil { 2361 return nil 2362 } 2363 if cont, err := f(in); err != nil || !cont { 2364 return err 2365 } 2366 return nil 2367 } 2368 func VisitRefOfLockingFunc(in *LockingFunc, f Visit) error { 2369 if in == nil { 2370 return nil 2371 } 2372 if cont, err := f(in); err != nil || !cont { 2373 return err 2374 } 2375 if err := VisitExpr(in.Name, f); err != nil { 2376 return err 2377 } 2378 if err := VisitExpr(in.Timeout, f); err != nil { 2379 return err 2380 } 2381 return nil 2382 } 2383 func VisitRefOfMatchExpr(in *MatchExpr, f Visit) error { 2384 if in == nil { 2385 return nil 2386 } 2387 if cont, err := f(in); err != nil || !cont { 2388 return err 2389 } 2390 for _, el := range in.Columns { 2391 if err := VisitRefOfColName(el, f); err != nil { 2392 return err 2393 } 2394 } 2395 if err := VisitExpr(in.Expr, f); err != nil { 2396 return err 2397 } 2398 return nil 2399 } 2400 func VisitRefOfMax(in *Max, f Visit) error { 2401 if in == nil { 2402 return nil 2403 } 2404 if cont, err := f(in); err != nil || !cont { 2405 return err 2406 } 2407 if err := VisitExpr(in.Arg, f); err != nil { 2408 return err 2409 } 2410 return nil 2411 } 2412 func VisitRefOfMemberOfExpr(in *MemberOfExpr, f Visit) error { 2413 if in == nil { 2414 return nil 2415 } 2416 if cont, err := f(in); err != nil || !cont { 2417 return err 2418 } 2419 if err := VisitExpr(in.Value, f); err != nil { 2420 return err 2421 } 2422 if err := VisitExpr(in.JSONArr, f); err != nil { 2423 return err 2424 } 2425 return nil 2426 } 2427 func VisitRefOfMin(in *Min, f Visit) error { 2428 if in == nil { 2429 return nil 2430 } 2431 if cont, err := f(in); err != nil || !cont { 2432 return err 2433 } 2434 if err := VisitExpr(in.Arg, f); err != nil { 2435 return err 2436 } 2437 return nil 2438 } 2439 func VisitRefOfModifyColumn(in *ModifyColumn, f Visit) error { 2440 if in == nil { 2441 return nil 2442 } 2443 if cont, err := f(in); err != nil || !cont { 2444 return err 2445 } 2446 if err := VisitRefOfColumnDefinition(in.NewColDefinition, f); err != nil { 2447 return err 2448 } 2449 if err := VisitRefOfColName(in.After, f); err != nil { 2450 return err 2451 } 2452 return nil 2453 } 2454 func VisitRefOfNTHValueExpr(in *NTHValueExpr, f Visit) error { 2455 if in == nil { 2456 return nil 2457 } 2458 if cont, err := f(in); err != nil || !cont { 2459 return err 2460 } 2461 if err := VisitExpr(in.Expr, f); err != nil { 2462 return err 2463 } 2464 if err := VisitExpr(in.N, f); err != nil { 2465 return err 2466 } 2467 if err := VisitRefOfOverClause(in.OverClause, f); err != nil { 2468 return err 2469 } 2470 if err := VisitRefOfFromFirstLastClause(in.FromFirstLastClause, f); err != nil { 2471 return err 2472 } 2473 if err := VisitRefOfNullTreatmentClause(in.NullTreatmentClause, f); err != nil { 2474 return err 2475 } 2476 return nil 2477 } 2478 func VisitRefOfNamedWindow(in *NamedWindow, f Visit) error { 2479 if in == nil { 2480 return nil 2481 } 2482 if cont, err := f(in); err != nil || !cont { 2483 return err 2484 } 2485 if err := VisitWindowDefinitions(in.Windows, f); err != nil { 2486 return err 2487 } 2488 return nil 2489 } 2490 func VisitNamedWindows(in NamedWindows, f Visit) error { 2491 if in == nil { 2492 return nil 2493 } 2494 if cont, err := f(in); err != nil || !cont { 2495 return err 2496 } 2497 for _, el := range in { 2498 if err := VisitRefOfNamedWindow(el, f); err != nil { 2499 return err 2500 } 2501 } 2502 return nil 2503 } 2504 func VisitRefOfNextval(in *Nextval, f Visit) error { 2505 if in == nil { 2506 return nil 2507 } 2508 if cont, err := f(in); err != nil || !cont { 2509 return err 2510 } 2511 if err := VisitExpr(in.Expr, f); err != nil { 2512 return err 2513 } 2514 return nil 2515 } 2516 func VisitRefOfNotExpr(in *NotExpr, f Visit) error { 2517 if in == nil { 2518 return nil 2519 } 2520 if cont, err := f(in); err != nil || !cont { 2521 return err 2522 } 2523 if err := VisitExpr(in.Expr, f); err != nil { 2524 return err 2525 } 2526 return nil 2527 } 2528 func VisitRefOfNtileExpr(in *NtileExpr, f Visit) error { 2529 if in == nil { 2530 return nil 2531 } 2532 if cont, err := f(in); err != nil || !cont { 2533 return err 2534 } 2535 if err := VisitExpr(in.N, f); err != nil { 2536 return err 2537 } 2538 if err := VisitRefOfOverClause(in.OverClause, f); err != nil { 2539 return err 2540 } 2541 return nil 2542 } 2543 func VisitRefOfNullTreatmentClause(in *NullTreatmentClause, f Visit) error { 2544 if in == nil { 2545 return nil 2546 } 2547 if cont, err := f(in); err != nil || !cont { 2548 return err 2549 } 2550 return nil 2551 } 2552 func VisitRefOfNullVal(in *NullVal, f Visit) error { 2553 if in == nil { 2554 return nil 2555 } 2556 if cont, err := f(in); err != nil || !cont { 2557 return err 2558 } 2559 return nil 2560 } 2561 func VisitRefOfOffset(in *Offset, f Visit) error { 2562 if in == nil { 2563 return nil 2564 } 2565 if cont, err := f(in); err != nil || !cont { 2566 return err 2567 } 2568 return nil 2569 } 2570 func VisitOnDup(in OnDup, f Visit) error { 2571 if in == nil { 2572 return nil 2573 } 2574 if cont, err := f(in); err != nil || !cont { 2575 return err 2576 } 2577 for _, el := range in { 2578 if err := VisitRefOfUpdateExpr(el, f); err != nil { 2579 return err 2580 } 2581 } 2582 return nil 2583 } 2584 func VisitRefOfOptLike(in *OptLike, f Visit) error { 2585 if in == nil { 2586 return nil 2587 } 2588 if cont, err := f(in); err != nil || !cont { 2589 return err 2590 } 2591 if err := VisitTableName(in.LikeTable, f); err != nil { 2592 return err 2593 } 2594 return nil 2595 } 2596 func VisitRefOfOrExpr(in *OrExpr, f Visit) error { 2597 if in == nil { 2598 return nil 2599 } 2600 if cont, err := f(in); err != nil || !cont { 2601 return err 2602 } 2603 if err := VisitExpr(in.Left, f); err != nil { 2604 return err 2605 } 2606 if err := VisitExpr(in.Right, f); err != nil { 2607 return err 2608 } 2609 return nil 2610 } 2611 func VisitRefOfOrder(in *Order, f Visit) error { 2612 if in == nil { 2613 return nil 2614 } 2615 if cont, err := f(in); err != nil || !cont { 2616 return err 2617 } 2618 if err := VisitExpr(in.Expr, f); err != nil { 2619 return err 2620 } 2621 return nil 2622 } 2623 func VisitOrderBy(in OrderBy, f Visit) error { 2624 if in == nil { 2625 return nil 2626 } 2627 if cont, err := f(in); err != nil || !cont { 2628 return err 2629 } 2630 for _, el := range in { 2631 if err := VisitRefOfOrder(el, f); err != nil { 2632 return err 2633 } 2634 } 2635 return nil 2636 } 2637 func VisitRefOfOrderByOption(in *OrderByOption, f Visit) error { 2638 if in == nil { 2639 return nil 2640 } 2641 if cont, err := f(in); err != nil || !cont { 2642 return err 2643 } 2644 if err := VisitColumns(in.Cols, f); err != nil { 2645 return err 2646 } 2647 return nil 2648 } 2649 func VisitRefOfOtherAdmin(in *OtherAdmin, f Visit) error { 2650 if in == nil { 2651 return nil 2652 } 2653 if cont, err := f(in); err != nil || !cont { 2654 return err 2655 } 2656 return nil 2657 } 2658 func VisitRefOfOtherRead(in *OtherRead, f Visit) error { 2659 if in == nil { 2660 return nil 2661 } 2662 if cont, err := f(in); err != nil || !cont { 2663 return err 2664 } 2665 return nil 2666 } 2667 func VisitRefOfOverClause(in *OverClause, f Visit) error { 2668 if in == nil { 2669 return nil 2670 } 2671 if cont, err := f(in); err != nil || !cont { 2672 return err 2673 } 2674 if err := VisitIdentifierCI(in.WindowName, f); err != nil { 2675 return err 2676 } 2677 if err := VisitRefOfWindowSpecification(in.WindowSpec, f); err != nil { 2678 return err 2679 } 2680 return nil 2681 } 2682 func VisitRefOfParenTableExpr(in *ParenTableExpr, f Visit) error { 2683 if in == nil { 2684 return nil 2685 } 2686 if cont, err := f(in); err != nil || !cont { 2687 return err 2688 } 2689 if err := VisitTableExprs(in.Exprs, f); err != nil { 2690 return err 2691 } 2692 return nil 2693 } 2694 func VisitRefOfParsedComments(in *ParsedComments, f Visit) error { 2695 if in == nil { 2696 return nil 2697 } 2698 if cont, err := f(in); err != nil || !cont { 2699 return err 2700 } 2701 return nil 2702 } 2703 func VisitRefOfPartitionDefinition(in *PartitionDefinition, f Visit) error { 2704 if in == nil { 2705 return nil 2706 } 2707 if cont, err := f(in); err != nil || !cont { 2708 return err 2709 } 2710 if err := VisitIdentifierCI(in.Name, f); err != nil { 2711 return err 2712 } 2713 if err := VisitRefOfPartitionDefinitionOptions(in.Options, f); err != nil { 2714 return err 2715 } 2716 return nil 2717 } 2718 func VisitRefOfPartitionDefinitionOptions(in *PartitionDefinitionOptions, f Visit) error { 2719 if in == nil { 2720 return nil 2721 } 2722 if cont, err := f(in); err != nil || !cont { 2723 return err 2724 } 2725 if err := VisitRefOfPartitionValueRange(in.ValueRange, f); err != nil { 2726 return err 2727 } 2728 if err := VisitRefOfLiteral(in.Comment, f); err != nil { 2729 return err 2730 } 2731 if err := VisitRefOfPartitionEngine(in.Engine, f); err != nil { 2732 return err 2733 } 2734 if err := VisitRefOfLiteral(in.DataDirectory, f); err != nil { 2735 return err 2736 } 2737 if err := VisitRefOfLiteral(in.IndexDirectory, f); err != nil { 2738 return err 2739 } 2740 if err := VisitSubPartitionDefinitions(in.SubPartitionDefinitions, f); err != nil { 2741 return err 2742 } 2743 return nil 2744 } 2745 func VisitRefOfPartitionEngine(in *PartitionEngine, f Visit) error { 2746 if in == nil { 2747 return nil 2748 } 2749 if cont, err := f(in); err != nil || !cont { 2750 return err 2751 } 2752 return nil 2753 } 2754 func VisitRefOfPartitionOption(in *PartitionOption, f Visit) error { 2755 if in == nil { 2756 return nil 2757 } 2758 if cont, err := f(in); err != nil || !cont { 2759 return err 2760 } 2761 if err := VisitColumns(in.ColList, f); err != nil { 2762 return err 2763 } 2764 if err := VisitExpr(in.Expr, f); err != nil { 2765 return err 2766 } 2767 if err := VisitRefOfSubPartition(in.SubPartition, f); err != nil { 2768 return err 2769 } 2770 for _, el := range in.Definitions { 2771 if err := VisitRefOfPartitionDefinition(el, f); err != nil { 2772 return err 2773 } 2774 } 2775 return nil 2776 } 2777 func VisitRefOfPartitionSpec(in *PartitionSpec, f Visit) error { 2778 if in == nil { 2779 return nil 2780 } 2781 if cont, err := f(in); err != nil || !cont { 2782 return err 2783 } 2784 if err := VisitPartitions(in.Names, f); err != nil { 2785 return err 2786 } 2787 if err := VisitRefOfLiteral(in.Number, f); err != nil { 2788 return err 2789 } 2790 if err := VisitTableName(in.TableName, f); err != nil { 2791 return err 2792 } 2793 for _, el := range in.Definitions { 2794 if err := VisitRefOfPartitionDefinition(el, f); err != nil { 2795 return err 2796 } 2797 } 2798 return nil 2799 } 2800 func VisitRefOfPartitionValueRange(in *PartitionValueRange, f Visit) error { 2801 if in == nil { 2802 return nil 2803 } 2804 if cont, err := f(in); err != nil || !cont { 2805 return err 2806 } 2807 if err := VisitValTuple(in.Range, f); err != nil { 2808 return err 2809 } 2810 return nil 2811 } 2812 func VisitPartitions(in Partitions, f Visit) error { 2813 if in == nil { 2814 return nil 2815 } 2816 if cont, err := f(in); err != nil || !cont { 2817 return err 2818 } 2819 for _, el := range in { 2820 if err := VisitIdentifierCI(el, f); err != nil { 2821 return err 2822 } 2823 } 2824 return nil 2825 } 2826 func VisitRefOfPerformanceSchemaFuncExpr(in *PerformanceSchemaFuncExpr, f Visit) error { 2827 if in == nil { 2828 return nil 2829 } 2830 if cont, err := f(in); err != nil || !cont { 2831 return err 2832 } 2833 if err := VisitExpr(in.Argument, f); err != nil { 2834 return err 2835 } 2836 return nil 2837 } 2838 func VisitRefOfPointExpr(in *PointExpr, f Visit) error { 2839 if in == nil { 2840 return nil 2841 } 2842 if cont, err := f(in); err != nil || !cont { 2843 return err 2844 } 2845 if err := VisitExpr(in.XCordinate, f); err != nil { 2846 return err 2847 } 2848 if err := VisitExpr(in.YCordinate, f); err != nil { 2849 return err 2850 } 2851 return nil 2852 } 2853 func VisitRefOfPrepareStmt(in *PrepareStmt, f Visit) error { 2854 if in == nil { 2855 return nil 2856 } 2857 if cont, err := f(in); err != nil || !cont { 2858 return err 2859 } 2860 if err := VisitIdentifierCI(in.Name, f); err != nil { 2861 return err 2862 } 2863 if err := VisitExpr(in.Statement, f); err != nil { 2864 return err 2865 } 2866 if err := VisitRefOfParsedComments(in.Comments, f); err != nil { 2867 return err 2868 } 2869 return nil 2870 } 2871 func VisitRefOfReferenceDefinition(in *ReferenceDefinition, f Visit) error { 2872 if in == nil { 2873 return nil 2874 } 2875 if cont, err := f(in); err != nil || !cont { 2876 return err 2877 } 2878 if err := VisitTableName(in.ReferencedTable, f); err != nil { 2879 return err 2880 } 2881 if err := VisitColumns(in.ReferencedColumns, f); err != nil { 2882 return err 2883 } 2884 if err := VisitMatchAction(in.Match, f); err != nil { 2885 return err 2886 } 2887 if err := VisitReferenceAction(in.OnDelete, f); err != nil { 2888 return err 2889 } 2890 if err := VisitReferenceAction(in.OnUpdate, f); err != nil { 2891 return err 2892 } 2893 return nil 2894 } 2895 func VisitRefOfRegexpInstrExpr(in *RegexpInstrExpr, f Visit) error { 2896 if in == nil { 2897 return nil 2898 } 2899 if cont, err := f(in); err != nil || !cont { 2900 return err 2901 } 2902 if err := VisitExpr(in.Expr, f); err != nil { 2903 return err 2904 } 2905 if err := VisitExpr(in.Pattern, f); err != nil { 2906 return err 2907 } 2908 if err := VisitExpr(in.Position, f); err != nil { 2909 return err 2910 } 2911 if err := VisitExpr(in.Occurrence, f); err != nil { 2912 return err 2913 } 2914 if err := VisitExpr(in.ReturnOption, f); err != nil { 2915 return err 2916 } 2917 if err := VisitExpr(in.MatchType, f); err != nil { 2918 return err 2919 } 2920 return nil 2921 } 2922 func VisitRefOfRegexpLikeExpr(in *RegexpLikeExpr, f Visit) error { 2923 if in == nil { 2924 return nil 2925 } 2926 if cont, err := f(in); err != nil || !cont { 2927 return err 2928 } 2929 if err := VisitExpr(in.Expr, f); err != nil { 2930 return err 2931 } 2932 if err := VisitExpr(in.Pattern, f); err != nil { 2933 return err 2934 } 2935 if err := VisitExpr(in.MatchType, f); err != nil { 2936 return err 2937 } 2938 return nil 2939 } 2940 func VisitRefOfRegexpReplaceExpr(in *RegexpReplaceExpr, 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 := VisitExpr(in.Expr, f); err != nil { 2948 return err 2949 } 2950 if err := VisitExpr(in.Pattern, f); err != nil { 2951 return err 2952 } 2953 if err := VisitExpr(in.Repl, f); err != nil { 2954 return err 2955 } 2956 if err := VisitExpr(in.Occurrence, f); err != nil { 2957 return err 2958 } 2959 if err := VisitExpr(in.Position, f); err != nil { 2960 return err 2961 } 2962 if err := VisitExpr(in.MatchType, f); err != nil { 2963 return err 2964 } 2965 return nil 2966 } 2967 func VisitRefOfRegexpSubstrExpr(in *RegexpSubstrExpr, f Visit) error { 2968 if in == nil { 2969 return nil 2970 } 2971 if cont, err := f(in); err != nil || !cont { 2972 return err 2973 } 2974 if err := VisitExpr(in.Expr, f); err != nil { 2975 return err 2976 } 2977 if err := VisitExpr(in.Pattern, f); err != nil { 2978 return err 2979 } 2980 if err := VisitExpr(in.Occurrence, f); err != nil { 2981 return err 2982 } 2983 if err := VisitExpr(in.Position, f); err != nil { 2984 return err 2985 } 2986 if err := VisitExpr(in.MatchType, f); err != nil { 2987 return err 2988 } 2989 return nil 2990 } 2991 func VisitRefOfRelease(in *Release, f Visit) error { 2992 if in == nil { 2993 return nil 2994 } 2995 if cont, err := f(in); err != nil || !cont { 2996 return err 2997 } 2998 if err := VisitIdentifierCI(in.Name, f); err != nil { 2999 return err 3000 } 3001 return nil 3002 } 3003 func VisitRefOfRenameColumn(in *RenameColumn, f Visit) error { 3004 if in == nil { 3005 return nil 3006 } 3007 if cont, err := f(in); err != nil || !cont { 3008 return err 3009 } 3010 if err := VisitRefOfColName(in.OldName, f); err != nil { 3011 return err 3012 } 3013 if err := VisitRefOfColName(in.NewName, f); err != nil { 3014 return err 3015 } 3016 return nil 3017 } 3018 func VisitRefOfRenameIndex(in *RenameIndex, f Visit) error { 3019 if in == nil { 3020 return nil 3021 } 3022 if cont, err := f(in); err != nil || !cont { 3023 return err 3024 } 3025 if err := VisitIdentifierCI(in.OldName, f); err != nil { 3026 return err 3027 } 3028 if err := VisitIdentifierCI(in.NewName, f); err != nil { 3029 return err 3030 } 3031 return nil 3032 } 3033 func VisitRefOfRenameTable(in *RenameTable, f Visit) error { 3034 if in == nil { 3035 return nil 3036 } 3037 if cont, err := f(in); err != nil || !cont { 3038 return err 3039 } 3040 return nil 3041 } 3042 func VisitRefOfRenameTableName(in *RenameTableName, f Visit) error { 3043 if in == nil { 3044 return nil 3045 } 3046 if cont, err := f(in); err != nil || !cont { 3047 return err 3048 } 3049 if err := VisitTableName(in.Table, f); err != nil { 3050 return err 3051 } 3052 return nil 3053 } 3054 func VisitRefOfRevertMigration(in *RevertMigration, f Visit) error { 3055 if in == nil { 3056 return nil 3057 } 3058 if cont, err := f(in); err != nil || !cont { 3059 return err 3060 } 3061 if err := VisitRefOfParsedComments(in.Comments, f); err != nil { 3062 return err 3063 } 3064 return nil 3065 } 3066 func VisitRefOfRollback(in *Rollback, f Visit) error { 3067 if in == nil { 3068 return nil 3069 } 3070 if cont, err := f(in); err != nil || !cont { 3071 return err 3072 } 3073 return nil 3074 } 3075 func VisitRootNode(in RootNode, f Visit) error { 3076 if cont, err := f(in); err != nil || !cont { 3077 return err 3078 } 3079 if err := VisitSQLNode(in.SQLNode, f); err != nil { 3080 return err 3081 } 3082 return nil 3083 } 3084 func VisitRefOfSRollback(in *SRollback, f Visit) error { 3085 if in == nil { 3086 return nil 3087 } 3088 if cont, err := f(in); err != nil || !cont { 3089 return err 3090 } 3091 if err := VisitIdentifierCI(in.Name, f); err != nil { 3092 return err 3093 } 3094 return nil 3095 } 3096 func VisitRefOfSavepoint(in *Savepoint, f Visit) error { 3097 if in == nil { 3098 return nil 3099 } 3100 if cont, err := f(in); err != nil || !cont { 3101 return err 3102 } 3103 if err := VisitIdentifierCI(in.Name, f); err != nil { 3104 return err 3105 } 3106 return nil 3107 } 3108 func VisitRefOfSelect(in *Select, f Visit) error { 3109 if in == nil { 3110 return nil 3111 } 3112 if cont, err := f(in); err != nil || !cont { 3113 return err 3114 } 3115 for _, el := range in.From { 3116 if err := VisitTableExpr(el, f); err != nil { 3117 return err 3118 } 3119 } 3120 if err := VisitRefOfParsedComments(in.Comments, f); err != nil { 3121 return err 3122 } 3123 if err := VisitSelectExprs(in.SelectExprs, f); err != nil { 3124 return err 3125 } 3126 if err := VisitRefOfWhere(in.Where, f); err != nil { 3127 return err 3128 } 3129 if err := VisitRefOfWith(in.With, f); err != nil { 3130 return err 3131 } 3132 if err := VisitGroupBy(in.GroupBy, f); err != nil { 3133 return err 3134 } 3135 if err := VisitRefOfWhere(in.Having, f); err != nil { 3136 return err 3137 } 3138 if err := VisitNamedWindows(in.Windows, f); err != nil { 3139 return err 3140 } 3141 if err := VisitOrderBy(in.OrderBy, f); err != nil { 3142 return err 3143 } 3144 if err := VisitRefOfLimit(in.Limit, f); err != nil { 3145 return err 3146 } 3147 if err := VisitRefOfSelectInto(in.Into, f); err != nil { 3148 return err 3149 } 3150 return nil 3151 } 3152 func VisitSelectExprs(in SelectExprs, f Visit) error { 3153 if in == nil { 3154 return nil 3155 } 3156 if cont, err := f(in); err != nil || !cont { 3157 return err 3158 } 3159 for _, el := range in { 3160 if err := VisitSelectExpr(el, f); err != nil { 3161 return err 3162 } 3163 } 3164 return nil 3165 } 3166 func VisitRefOfSelectInto(in *SelectInto, f Visit) error { 3167 if in == nil { 3168 return nil 3169 } 3170 if cont, err := f(in); err != nil || !cont { 3171 return err 3172 } 3173 return nil 3174 } 3175 func VisitRefOfSet(in *Set, f Visit) error { 3176 if in == nil { 3177 return nil 3178 } 3179 if cont, err := f(in); err != nil || !cont { 3180 return err 3181 } 3182 if err := VisitRefOfParsedComments(in.Comments, f); err != nil { 3183 return err 3184 } 3185 if err := VisitSetExprs(in.Exprs, f); err != nil { 3186 return err 3187 } 3188 return nil 3189 } 3190 func VisitRefOfSetExpr(in *SetExpr, f Visit) error { 3191 if in == nil { 3192 return nil 3193 } 3194 if cont, err := f(in); err != nil || !cont { 3195 return err 3196 } 3197 if err := VisitRefOfVariable(in.Var, f); err != nil { 3198 return err 3199 } 3200 if err := VisitExpr(in.Expr, f); err != nil { 3201 return err 3202 } 3203 return nil 3204 } 3205 func VisitSetExprs(in SetExprs, f Visit) error { 3206 if in == nil { 3207 return nil 3208 } 3209 if cont, err := f(in); err != nil || !cont { 3210 return err 3211 } 3212 for _, el := range in { 3213 if err := VisitRefOfSetExpr(el, f); err != nil { 3214 return err 3215 } 3216 } 3217 return nil 3218 } 3219 func VisitRefOfShow(in *Show, f Visit) error { 3220 if in == nil { 3221 return nil 3222 } 3223 if cont, err := f(in); err != nil || !cont { 3224 return err 3225 } 3226 if err := VisitShowInternal(in.Internal, f); err != nil { 3227 return err 3228 } 3229 return nil 3230 } 3231 func VisitRefOfShowBasic(in *ShowBasic, f Visit) error { 3232 if in == nil { 3233 return nil 3234 } 3235 if cont, err := f(in); err != nil || !cont { 3236 return err 3237 } 3238 if err := VisitTableName(in.Tbl, f); err != nil { 3239 return err 3240 } 3241 if err := VisitIdentifierCS(in.DbName, f); err != nil { 3242 return err 3243 } 3244 if err := VisitRefOfShowFilter(in.Filter, f); err != nil { 3245 return err 3246 } 3247 return nil 3248 } 3249 func VisitRefOfShowCreate(in *ShowCreate, f Visit) error { 3250 if in == nil { 3251 return nil 3252 } 3253 if cont, err := f(in); err != nil || !cont { 3254 return err 3255 } 3256 if err := VisitTableName(in.Op, f); err != nil { 3257 return err 3258 } 3259 return nil 3260 } 3261 func VisitRefOfShowFilter(in *ShowFilter, f Visit) error { 3262 if in == nil { 3263 return nil 3264 } 3265 if cont, err := f(in); err != nil || !cont { 3266 return err 3267 } 3268 if err := VisitExpr(in.Filter, f); err != nil { 3269 return err 3270 } 3271 return nil 3272 } 3273 func VisitRefOfShowMigrationLogs(in *ShowMigrationLogs, f Visit) error { 3274 if in == nil { 3275 return nil 3276 } 3277 if cont, err := f(in); err != nil || !cont { 3278 return err 3279 } 3280 if err := VisitRefOfParsedComments(in.Comments, f); err != nil { 3281 return err 3282 } 3283 return nil 3284 } 3285 func VisitRefOfShowOther(in *ShowOther, f Visit) error { 3286 if in == nil { 3287 return nil 3288 } 3289 if cont, err := f(in); err != nil || !cont { 3290 return err 3291 } 3292 return nil 3293 } 3294 func VisitRefOfShowThrottledApps(in *ShowThrottledApps, f Visit) error { 3295 if in == nil { 3296 return nil 3297 } 3298 if cont, err := f(in); err != nil || !cont { 3299 return err 3300 } 3301 return nil 3302 } 3303 func VisitRefOfShowThrottlerStatus(in *ShowThrottlerStatus, f Visit) error { 3304 if in == nil { 3305 return nil 3306 } 3307 if cont, err := f(in); err != nil || !cont { 3308 return err 3309 } 3310 return nil 3311 } 3312 func VisitRefOfStarExpr(in *StarExpr, f Visit) error { 3313 if in == nil { 3314 return nil 3315 } 3316 if cont, err := f(in); err != nil || !cont { 3317 return err 3318 } 3319 if err := VisitTableName(in.TableName, f); err != nil { 3320 return err 3321 } 3322 return nil 3323 } 3324 func VisitRefOfStd(in *Std, f Visit) error { 3325 if in == nil { 3326 return nil 3327 } 3328 if cont, err := f(in); err != nil || !cont { 3329 return err 3330 } 3331 if err := VisitExpr(in.Arg, f); err != nil { 3332 return err 3333 } 3334 return nil 3335 } 3336 func VisitRefOfStdDev(in *StdDev, f Visit) error { 3337 if in == nil { 3338 return nil 3339 } 3340 if cont, err := f(in); err != nil || !cont { 3341 return err 3342 } 3343 if err := VisitExpr(in.Arg, f); err != nil { 3344 return err 3345 } 3346 return nil 3347 } 3348 func VisitRefOfStdPop(in *StdPop, f Visit) error { 3349 if in == nil { 3350 return nil 3351 } 3352 if cont, err := f(in); err != nil || !cont { 3353 return err 3354 } 3355 if err := VisitExpr(in.Arg, f); err != nil { 3356 return err 3357 } 3358 return nil 3359 } 3360 func VisitRefOfStdSamp(in *StdSamp, f Visit) error { 3361 if in == nil { 3362 return nil 3363 } 3364 if cont, err := f(in); err != nil || !cont { 3365 return err 3366 } 3367 if err := VisitExpr(in.Arg, f); err != nil { 3368 return err 3369 } 3370 return nil 3371 } 3372 func VisitRefOfStream(in *Stream, f Visit) error { 3373 if in == nil { 3374 return nil 3375 } 3376 if cont, err := f(in); err != nil || !cont { 3377 return err 3378 } 3379 if err := VisitRefOfParsedComments(in.Comments, f); err != nil { 3380 return err 3381 } 3382 if err := VisitSelectExpr(in.SelectExpr, f); err != nil { 3383 return err 3384 } 3385 if err := VisitTableName(in.Table, f); err != nil { 3386 return err 3387 } 3388 return nil 3389 } 3390 func VisitRefOfSubPartition(in *SubPartition, f Visit) error { 3391 if in == nil { 3392 return nil 3393 } 3394 if cont, err := f(in); err != nil || !cont { 3395 return err 3396 } 3397 if err := VisitColumns(in.ColList, f); err != nil { 3398 return err 3399 } 3400 if err := VisitExpr(in.Expr, f); err != nil { 3401 return err 3402 } 3403 return nil 3404 } 3405 func VisitRefOfSubPartitionDefinition(in *SubPartitionDefinition, f Visit) error { 3406 if in == nil { 3407 return nil 3408 } 3409 if cont, err := f(in); err != nil || !cont { 3410 return err 3411 } 3412 if err := VisitIdentifierCI(in.Name, f); err != nil { 3413 return err 3414 } 3415 if err := VisitRefOfSubPartitionDefinitionOptions(in.Options, f); err != nil { 3416 return err 3417 } 3418 return nil 3419 } 3420 func VisitRefOfSubPartitionDefinitionOptions(in *SubPartitionDefinitionOptions, f Visit) error { 3421 if in == nil { 3422 return nil 3423 } 3424 if cont, err := f(in); err != nil || !cont { 3425 return err 3426 } 3427 if err := VisitRefOfLiteral(in.Comment, f); err != nil { 3428 return err 3429 } 3430 if err := VisitRefOfPartitionEngine(in.Engine, f); err != nil { 3431 return err 3432 } 3433 if err := VisitRefOfLiteral(in.DataDirectory, f); err != nil { 3434 return err 3435 } 3436 if err := VisitRefOfLiteral(in.IndexDirectory, f); err != nil { 3437 return err 3438 } 3439 return nil 3440 } 3441 func VisitSubPartitionDefinitions(in SubPartitionDefinitions, f Visit) error { 3442 if in == nil { 3443 return nil 3444 } 3445 if cont, err := f(in); err != nil || !cont { 3446 return err 3447 } 3448 for _, el := range in { 3449 if err := VisitRefOfSubPartitionDefinition(el, f); err != nil { 3450 return err 3451 } 3452 } 3453 return nil 3454 } 3455 func VisitRefOfSubquery(in *Subquery, f Visit) error { 3456 if in == nil { 3457 return nil 3458 } 3459 if cont, err := f(in); err != nil || !cont { 3460 return err 3461 } 3462 if err := VisitSelectStatement(in.Select, f); err != nil { 3463 return err 3464 } 3465 return nil 3466 } 3467 func VisitRefOfSubstrExpr(in *SubstrExpr, f Visit) error { 3468 if in == nil { 3469 return nil 3470 } 3471 if cont, err := f(in); err != nil || !cont { 3472 return err 3473 } 3474 if err := VisitExpr(in.Name, f); err != nil { 3475 return err 3476 } 3477 if err := VisitExpr(in.From, f); err != nil { 3478 return err 3479 } 3480 if err := VisitExpr(in.To, f); err != nil { 3481 return err 3482 } 3483 return nil 3484 } 3485 func VisitRefOfSum(in *Sum, f Visit) error { 3486 if in == nil { 3487 return nil 3488 } 3489 if cont, err := f(in); err != nil || !cont { 3490 return err 3491 } 3492 if err := VisitExpr(in.Arg, f); err != nil { 3493 return err 3494 } 3495 return nil 3496 } 3497 func VisitTableExprs(in TableExprs, f Visit) error { 3498 if in == nil { 3499 return nil 3500 } 3501 if cont, err := f(in); err != nil || !cont { 3502 return err 3503 } 3504 for _, el := range in { 3505 if err := VisitTableExpr(el, f); err != nil { 3506 return err 3507 } 3508 } 3509 return nil 3510 } 3511 func VisitTableName(in TableName, f Visit) error { 3512 if cont, err := f(in); err != nil || !cont { 3513 return err 3514 } 3515 if err := VisitIdentifierCS(in.Name, f); err != nil { 3516 return err 3517 } 3518 if err := VisitIdentifierCS(in.Qualifier, f); err != nil { 3519 return err 3520 } 3521 return nil 3522 } 3523 func VisitTableNames(in TableNames, f Visit) error { 3524 if in == nil { 3525 return nil 3526 } 3527 if cont, err := f(in); err != nil || !cont { 3528 return err 3529 } 3530 for _, el := range in { 3531 if err := VisitTableName(el, f); err != nil { 3532 return err 3533 } 3534 } 3535 return nil 3536 } 3537 func VisitTableOptions(in TableOptions, f Visit) error { 3538 _, err := f(in) 3539 return err 3540 } 3541 func VisitRefOfTableSpec(in *TableSpec, f Visit) error { 3542 if in == nil { 3543 return nil 3544 } 3545 if cont, err := f(in); err != nil || !cont { 3546 return err 3547 } 3548 for _, el := range in.Columns { 3549 if err := VisitRefOfColumnDefinition(el, f); err != nil { 3550 return err 3551 } 3552 } 3553 for _, el := range in.Indexes { 3554 if err := VisitRefOfIndexDefinition(el, f); err != nil { 3555 return err 3556 } 3557 } 3558 for _, el := range in.Constraints { 3559 if err := VisitRefOfConstraintDefinition(el, f); err != nil { 3560 return err 3561 } 3562 } 3563 if err := VisitTableOptions(in.Options, f); err != nil { 3564 return err 3565 } 3566 if err := VisitRefOfPartitionOption(in.PartitionOption, f); err != nil { 3567 return err 3568 } 3569 return nil 3570 } 3571 func VisitRefOfTablespaceOperation(in *TablespaceOperation, f Visit) error { 3572 if in == nil { 3573 return nil 3574 } 3575 if cont, err := f(in); err != nil || !cont { 3576 return err 3577 } 3578 return nil 3579 } 3580 func VisitRefOfTimestampFuncExpr(in *TimestampFuncExpr, f Visit) error { 3581 if in == nil { 3582 return nil 3583 } 3584 if cont, err := f(in); err != nil || !cont { 3585 return err 3586 } 3587 if err := VisitExpr(in.Expr1, f); err != nil { 3588 return err 3589 } 3590 if err := VisitExpr(in.Expr2, f); err != nil { 3591 return err 3592 } 3593 return nil 3594 } 3595 func VisitRefOfTrimFuncExpr(in *TrimFuncExpr, f Visit) error { 3596 if in == nil { 3597 return nil 3598 } 3599 if cont, err := f(in); err != nil || !cont { 3600 return err 3601 } 3602 if err := VisitExpr(in.TrimArg, f); err != nil { 3603 return err 3604 } 3605 if err := VisitExpr(in.StringArg, f); err != nil { 3606 return err 3607 } 3608 return nil 3609 } 3610 func VisitRefOfTruncateTable(in *TruncateTable, f Visit) error { 3611 if in == nil { 3612 return nil 3613 } 3614 if cont, err := f(in); err != nil || !cont { 3615 return err 3616 } 3617 if err := VisitTableName(in.Table, f); err != nil { 3618 return err 3619 } 3620 return nil 3621 } 3622 func VisitRefOfUnaryExpr(in *UnaryExpr, f Visit) error { 3623 if in == nil { 3624 return nil 3625 } 3626 if cont, err := f(in); err != nil || !cont { 3627 return err 3628 } 3629 if err := VisitExpr(in.Expr, f); err != nil { 3630 return err 3631 } 3632 return nil 3633 } 3634 func VisitRefOfUnion(in *Union, f Visit) error { 3635 if in == nil { 3636 return nil 3637 } 3638 if cont, err := f(in); err != nil || !cont { 3639 return err 3640 } 3641 if err := VisitSelectStatement(in.Left, f); err != nil { 3642 return err 3643 } 3644 if err := VisitSelectStatement(in.Right, f); err != nil { 3645 return err 3646 } 3647 if err := VisitOrderBy(in.OrderBy, f); err != nil { 3648 return err 3649 } 3650 if err := VisitRefOfWith(in.With, f); err != nil { 3651 return err 3652 } 3653 if err := VisitRefOfLimit(in.Limit, f); err != nil { 3654 return err 3655 } 3656 if err := VisitRefOfSelectInto(in.Into, f); err != nil { 3657 return err 3658 } 3659 return nil 3660 } 3661 func VisitRefOfUnlockTables(in *UnlockTables, f Visit) error { 3662 if in == nil { 3663 return nil 3664 } 3665 if cont, err := f(in); err != nil || !cont { 3666 return err 3667 } 3668 return nil 3669 } 3670 func VisitRefOfUpdate(in *Update, f Visit) error { 3671 if in == nil { 3672 return nil 3673 } 3674 if cont, err := f(in); err != nil || !cont { 3675 return err 3676 } 3677 if err := VisitRefOfWith(in.With, f); err != nil { 3678 return err 3679 } 3680 if err := VisitRefOfParsedComments(in.Comments, f); err != nil { 3681 return err 3682 } 3683 if err := VisitTableExprs(in.TableExprs, f); err != nil { 3684 return err 3685 } 3686 if err := VisitUpdateExprs(in.Exprs, f); err != nil { 3687 return err 3688 } 3689 if err := VisitRefOfWhere(in.Where, f); err != nil { 3690 return err 3691 } 3692 if err := VisitOrderBy(in.OrderBy, f); err != nil { 3693 return err 3694 } 3695 if err := VisitRefOfLimit(in.Limit, f); err != nil { 3696 return err 3697 } 3698 return nil 3699 } 3700 func VisitRefOfUpdateExpr(in *UpdateExpr, f Visit) error { 3701 if in == nil { 3702 return nil 3703 } 3704 if cont, err := f(in); err != nil || !cont { 3705 return err 3706 } 3707 if err := VisitRefOfColName(in.Name, f); err != nil { 3708 return err 3709 } 3710 if err := VisitExpr(in.Expr, f); err != nil { 3711 return err 3712 } 3713 return nil 3714 } 3715 func VisitUpdateExprs(in UpdateExprs, f Visit) error { 3716 if in == nil { 3717 return nil 3718 } 3719 if cont, err := f(in); err != nil || !cont { 3720 return err 3721 } 3722 for _, el := range in { 3723 if err := VisitRefOfUpdateExpr(el, f); err != nil { 3724 return err 3725 } 3726 } 3727 return nil 3728 } 3729 func VisitRefOfUpdateXMLExpr(in *UpdateXMLExpr, f Visit) error { 3730 if in == nil { 3731 return nil 3732 } 3733 if cont, err := f(in); err != nil || !cont { 3734 return err 3735 } 3736 if err := VisitExpr(in.Target, f); err != nil { 3737 return err 3738 } 3739 if err := VisitExpr(in.XPathExpr, f); err != nil { 3740 return err 3741 } 3742 if err := VisitExpr(in.NewXML, f); err != nil { 3743 return err 3744 } 3745 return nil 3746 } 3747 func VisitRefOfUse(in *Use, f Visit) error { 3748 if in == nil { 3749 return nil 3750 } 3751 if cont, err := f(in); err != nil || !cont { 3752 return err 3753 } 3754 if err := VisitIdentifierCS(in.DBName, f); err != nil { 3755 return err 3756 } 3757 return nil 3758 } 3759 func VisitRefOfVExplainStmt(in *VExplainStmt, f Visit) error { 3760 if in == nil { 3761 return nil 3762 } 3763 if cont, err := f(in); err != nil || !cont { 3764 return err 3765 } 3766 if err := VisitStatement(in.Statement, f); err != nil { 3767 return err 3768 } 3769 if err := VisitRefOfParsedComments(in.Comments, f); err != nil { 3770 return err 3771 } 3772 return nil 3773 } 3774 func VisitRefOfVStream(in *VStream, f Visit) error { 3775 if in == nil { 3776 return nil 3777 } 3778 if cont, err := f(in); err != nil || !cont { 3779 return err 3780 } 3781 if err := VisitRefOfParsedComments(in.Comments, f); err != nil { 3782 return err 3783 } 3784 if err := VisitSelectExpr(in.SelectExpr, f); err != nil { 3785 return err 3786 } 3787 if err := VisitTableName(in.Table, f); err != nil { 3788 return err 3789 } 3790 if err := VisitRefOfWhere(in.Where, f); err != nil { 3791 return err 3792 } 3793 if err := VisitRefOfLimit(in.Limit, f); err != nil { 3794 return err 3795 } 3796 return nil 3797 } 3798 func VisitValTuple(in ValTuple, f Visit) error { 3799 if in == nil { 3800 return nil 3801 } 3802 if cont, err := f(in); err != nil || !cont { 3803 return err 3804 } 3805 for _, el := range in { 3806 if err := VisitExpr(el, f); err != nil { 3807 return err 3808 } 3809 } 3810 return nil 3811 } 3812 func VisitRefOfValidation(in *Validation, f Visit) error { 3813 if in == nil { 3814 return nil 3815 } 3816 if cont, err := f(in); err != nil || !cont { 3817 return err 3818 } 3819 return nil 3820 } 3821 func VisitValues(in Values, f Visit) error { 3822 if in == nil { 3823 return nil 3824 } 3825 if cont, err := f(in); err != nil || !cont { 3826 return err 3827 } 3828 for _, el := range in { 3829 if err := VisitValTuple(el, f); err != nil { 3830 return err 3831 } 3832 } 3833 return nil 3834 } 3835 func VisitRefOfValuesFuncExpr(in *ValuesFuncExpr, f Visit) error { 3836 if in == nil { 3837 return nil 3838 } 3839 if cont, err := f(in); err != nil || !cont { 3840 return err 3841 } 3842 if err := VisitRefOfColName(in.Name, f); err != nil { 3843 return err 3844 } 3845 return nil 3846 } 3847 func VisitRefOfVarPop(in *VarPop, f Visit) error { 3848 if in == nil { 3849 return nil 3850 } 3851 if cont, err := f(in); err != nil || !cont { 3852 return err 3853 } 3854 if err := VisitExpr(in.Arg, f); err != nil { 3855 return err 3856 } 3857 return nil 3858 } 3859 func VisitRefOfVarSamp(in *VarSamp, f Visit) error { 3860 if in == nil { 3861 return nil 3862 } 3863 if cont, err := f(in); err != nil || !cont { 3864 return err 3865 } 3866 if err := VisitExpr(in.Arg, f); err != nil { 3867 return err 3868 } 3869 return nil 3870 } 3871 func VisitRefOfVariable(in *Variable, f Visit) error { 3872 if in == nil { 3873 return nil 3874 } 3875 if cont, err := f(in); err != nil || !cont { 3876 return err 3877 } 3878 if err := VisitIdentifierCI(in.Name, f); err != nil { 3879 return err 3880 } 3881 return nil 3882 } 3883 func VisitRefOfVariance(in *Variance, f Visit) error { 3884 if in == nil { 3885 return nil 3886 } 3887 if cont, err := f(in); err != nil || !cont { 3888 return err 3889 } 3890 if err := VisitExpr(in.Arg, f); err != nil { 3891 return err 3892 } 3893 return nil 3894 } 3895 func VisitVindexParam(in VindexParam, f Visit) error { 3896 if cont, err := f(in); err != nil || !cont { 3897 return err 3898 } 3899 if err := VisitIdentifierCI(in.Key, f); err != nil { 3900 return err 3901 } 3902 return nil 3903 } 3904 func VisitRefOfVindexSpec(in *VindexSpec, f Visit) error { 3905 if in == nil { 3906 return nil 3907 } 3908 if cont, err := f(in); err != nil || !cont { 3909 return err 3910 } 3911 if err := VisitIdentifierCI(in.Name, f); err != nil { 3912 return err 3913 } 3914 if err := VisitIdentifierCI(in.Type, f); err != nil { 3915 return err 3916 } 3917 for _, el := range in.Params { 3918 if err := VisitVindexParam(el, f); err != nil { 3919 return err 3920 } 3921 } 3922 return nil 3923 } 3924 func VisitRefOfWeightStringFuncExpr(in *WeightStringFuncExpr, f Visit) error { 3925 if in == nil { 3926 return nil 3927 } 3928 if cont, err := f(in); err != nil || !cont { 3929 return err 3930 } 3931 if err := VisitExpr(in.Expr, f); err != nil { 3932 return err 3933 } 3934 if err := VisitRefOfConvertType(in.As, f); err != nil { 3935 return err 3936 } 3937 return nil 3938 } 3939 func VisitRefOfWhen(in *When, f Visit) error { 3940 if in == nil { 3941 return nil 3942 } 3943 if cont, err := f(in); err != nil || !cont { 3944 return err 3945 } 3946 if err := VisitExpr(in.Cond, f); err != nil { 3947 return err 3948 } 3949 if err := VisitExpr(in.Val, f); err != nil { 3950 return err 3951 } 3952 return nil 3953 } 3954 func VisitRefOfWhere(in *Where, f Visit) error { 3955 if in == nil { 3956 return nil 3957 } 3958 if cont, err := f(in); err != nil || !cont { 3959 return err 3960 } 3961 if err := VisitExpr(in.Expr, f); err != nil { 3962 return err 3963 } 3964 return nil 3965 } 3966 func VisitRefOfWindowDefinition(in *WindowDefinition, f Visit) error { 3967 if in == nil { 3968 return nil 3969 } 3970 if cont, err := f(in); err != nil || !cont { 3971 return err 3972 } 3973 if err := VisitIdentifierCI(in.Name, f); err != nil { 3974 return err 3975 } 3976 if err := VisitRefOfWindowSpecification(in.WindowSpec, f); err != nil { 3977 return err 3978 } 3979 return nil 3980 } 3981 func VisitWindowDefinitions(in WindowDefinitions, f Visit) error { 3982 if in == nil { 3983 return nil 3984 } 3985 if cont, err := f(in); err != nil || !cont { 3986 return err 3987 } 3988 for _, el := range in { 3989 if err := VisitRefOfWindowDefinition(el, f); err != nil { 3990 return err 3991 } 3992 } 3993 return nil 3994 } 3995 func VisitRefOfWindowSpecification(in *WindowSpecification, f Visit) error { 3996 if in == nil { 3997 return nil 3998 } 3999 if cont, err := f(in); err != nil || !cont { 4000 return err 4001 } 4002 if err := VisitIdentifierCI(in.Name, f); err != nil { 4003 return err 4004 } 4005 if err := VisitExprs(in.PartitionClause, f); err != nil { 4006 return err 4007 } 4008 if err := VisitOrderBy(in.OrderClause, f); err != nil { 4009 return err 4010 } 4011 if err := VisitRefOfFrameClause(in.FrameClause, f); err != nil { 4012 return err 4013 } 4014 return nil 4015 } 4016 func VisitRefOfWith(in *With, f Visit) error { 4017 if in == nil { 4018 return nil 4019 } 4020 if cont, err := f(in); err != nil || !cont { 4021 return err 4022 } 4023 for _, el := range in.Ctes { 4024 if err := VisitRefOfCommonTableExpr(el, f); err != nil { 4025 return err 4026 } 4027 } 4028 return nil 4029 } 4030 func VisitRefOfXorExpr(in *XorExpr, f Visit) error { 4031 if in == nil { 4032 return nil 4033 } 4034 if cont, err := f(in); err != nil || !cont { 4035 return err 4036 } 4037 if err := VisitExpr(in.Left, f); err != nil { 4038 return err 4039 } 4040 if err := VisitExpr(in.Right, f); err != nil { 4041 return err 4042 } 4043 return nil 4044 } 4045 func VisitAggrFunc(in AggrFunc, f Visit) error { 4046 if in == nil { 4047 return nil 4048 } 4049 switch in := in.(type) { 4050 case *Avg: 4051 return VisitRefOfAvg(in, f) 4052 case *BitAnd: 4053 return VisitRefOfBitAnd(in, f) 4054 case *BitOr: 4055 return VisitRefOfBitOr(in, f) 4056 case *BitXor: 4057 return VisitRefOfBitXor(in, f) 4058 case *Count: 4059 return VisitRefOfCount(in, f) 4060 case *CountStar: 4061 return VisitRefOfCountStar(in, f) 4062 case *GroupConcatExpr: 4063 return VisitRefOfGroupConcatExpr(in, f) 4064 case *Max: 4065 return VisitRefOfMax(in, f) 4066 case *Min: 4067 return VisitRefOfMin(in, f) 4068 case *Std: 4069 return VisitRefOfStd(in, f) 4070 case *StdDev: 4071 return VisitRefOfStdDev(in, f) 4072 case *StdPop: 4073 return VisitRefOfStdPop(in, f) 4074 case *StdSamp: 4075 return VisitRefOfStdSamp(in, f) 4076 case *Sum: 4077 return VisitRefOfSum(in, f) 4078 case *VarPop: 4079 return VisitRefOfVarPop(in, f) 4080 case *VarSamp: 4081 return VisitRefOfVarSamp(in, f) 4082 case *Variance: 4083 return VisitRefOfVariance(in, f) 4084 default: 4085 // this should never happen 4086 return nil 4087 } 4088 } 4089 func VisitAlterOption(in AlterOption, f Visit) error { 4090 if in == nil { 4091 return nil 4092 } 4093 switch in := in.(type) { 4094 case *AddColumns: 4095 return VisitRefOfAddColumns(in, f) 4096 case *AddConstraintDefinition: 4097 return VisitRefOfAddConstraintDefinition(in, f) 4098 case *AddIndexDefinition: 4099 return VisitRefOfAddIndexDefinition(in, f) 4100 case AlgorithmValue: 4101 return VisitAlgorithmValue(in, f) 4102 case *AlterCharset: 4103 return VisitRefOfAlterCharset(in, f) 4104 case *AlterCheck: 4105 return VisitRefOfAlterCheck(in, f) 4106 case *AlterColumn: 4107 return VisitRefOfAlterColumn(in, f) 4108 case *AlterIndex: 4109 return VisitRefOfAlterIndex(in, f) 4110 case *ChangeColumn: 4111 return VisitRefOfChangeColumn(in, f) 4112 case *DropColumn: 4113 return VisitRefOfDropColumn(in, f) 4114 case *DropKey: 4115 return VisitRefOfDropKey(in, f) 4116 case *Force: 4117 return VisitRefOfForce(in, f) 4118 case *KeyState: 4119 return VisitRefOfKeyState(in, f) 4120 case *LockOption: 4121 return VisitRefOfLockOption(in, f) 4122 case *ModifyColumn: 4123 return VisitRefOfModifyColumn(in, f) 4124 case *OrderByOption: 4125 return VisitRefOfOrderByOption(in, f) 4126 case *RenameColumn: 4127 return VisitRefOfRenameColumn(in, f) 4128 case *RenameIndex: 4129 return VisitRefOfRenameIndex(in, f) 4130 case *RenameTableName: 4131 return VisitRefOfRenameTableName(in, f) 4132 case TableOptions: 4133 return VisitTableOptions(in, f) 4134 case *TablespaceOperation: 4135 return VisitRefOfTablespaceOperation(in, f) 4136 case *Validation: 4137 return VisitRefOfValidation(in, f) 4138 default: 4139 // this should never happen 4140 return nil 4141 } 4142 } 4143 func VisitCallable(in Callable, f Visit) error { 4144 if in == nil { 4145 return nil 4146 } 4147 switch in := in.(type) { 4148 case *ArgumentLessWindowExpr: 4149 return VisitRefOfArgumentLessWindowExpr(in, f) 4150 case *Avg: 4151 return VisitRefOfAvg(in, f) 4152 case *CharExpr: 4153 return VisitRefOfCharExpr(in, f) 4154 case *ConvertExpr: 4155 return VisitRefOfConvertExpr(in, f) 4156 case *ConvertUsingExpr: 4157 return VisitRefOfConvertUsingExpr(in, f) 4158 case *Count: 4159 return VisitRefOfCount(in, f) 4160 case *CountStar: 4161 return VisitRefOfCountStar(in, f) 4162 case *CurTimeFuncExpr: 4163 return VisitRefOfCurTimeFuncExpr(in, f) 4164 case *ExtractFuncExpr: 4165 return VisitRefOfExtractFuncExpr(in, f) 4166 case *ExtractValueExpr: 4167 return VisitRefOfExtractValueExpr(in, f) 4168 case *FirstOrLastValueExpr: 4169 return VisitRefOfFirstOrLastValueExpr(in, f) 4170 case *FuncExpr: 4171 return VisitRefOfFuncExpr(in, f) 4172 case *GTIDFuncExpr: 4173 return VisitRefOfGTIDFuncExpr(in, f) 4174 case *GroupConcatExpr: 4175 return VisitRefOfGroupConcatExpr(in, f) 4176 case *InsertExpr: 4177 return VisitRefOfInsertExpr(in, f) 4178 case *IntervalFuncExpr: 4179 return VisitRefOfIntervalFuncExpr(in, f) 4180 case *JSONArrayExpr: 4181 return VisitRefOfJSONArrayExpr(in, f) 4182 case *JSONAttributesExpr: 4183 return VisitRefOfJSONAttributesExpr(in, f) 4184 case *JSONContainsExpr: 4185 return VisitRefOfJSONContainsExpr(in, f) 4186 case *JSONContainsPathExpr: 4187 return VisitRefOfJSONContainsPathExpr(in, f) 4188 case *JSONExtractExpr: 4189 return VisitRefOfJSONExtractExpr(in, f) 4190 case *JSONKeysExpr: 4191 return VisitRefOfJSONKeysExpr(in, f) 4192 case *JSONObjectExpr: 4193 return VisitRefOfJSONObjectExpr(in, f) 4194 case *JSONOverlapsExpr: 4195 return VisitRefOfJSONOverlapsExpr(in, f) 4196 case *JSONPrettyExpr: 4197 return VisitRefOfJSONPrettyExpr(in, f) 4198 case *JSONQuoteExpr: 4199 return VisitRefOfJSONQuoteExpr(in, f) 4200 case *JSONRemoveExpr: 4201 return VisitRefOfJSONRemoveExpr(in, f) 4202 case *JSONSchemaValidFuncExpr: 4203 return VisitRefOfJSONSchemaValidFuncExpr(in, f) 4204 case *JSONSchemaValidationReportFuncExpr: 4205 return VisitRefOfJSONSchemaValidationReportFuncExpr(in, f) 4206 case *JSONSearchExpr: 4207 return VisitRefOfJSONSearchExpr(in, f) 4208 case *JSONStorageFreeExpr: 4209 return VisitRefOfJSONStorageFreeExpr(in, f) 4210 case *JSONStorageSizeExpr: 4211 return VisitRefOfJSONStorageSizeExpr(in, f) 4212 case *JSONUnquoteExpr: 4213 return VisitRefOfJSONUnquoteExpr(in, f) 4214 case *JSONValueExpr: 4215 return VisitRefOfJSONValueExpr(in, f) 4216 case *JSONValueMergeExpr: 4217 return VisitRefOfJSONValueMergeExpr(in, f) 4218 case *JSONValueModifierExpr: 4219 return VisitRefOfJSONValueModifierExpr(in, f) 4220 case *LagLeadExpr: 4221 return VisitRefOfLagLeadExpr(in, f) 4222 case *LineStringExpr: 4223 return VisitRefOfLineStringExpr(in, f) 4224 case *LocateExpr: 4225 return VisitRefOfLocateExpr(in, f) 4226 case *MatchExpr: 4227 return VisitRefOfMatchExpr(in, f) 4228 case *Max: 4229 return VisitRefOfMax(in, f) 4230 case *MemberOfExpr: 4231 return VisitRefOfMemberOfExpr(in, f) 4232 case *Min: 4233 return VisitRefOfMin(in, f) 4234 case *NTHValueExpr: 4235 return VisitRefOfNTHValueExpr(in, f) 4236 case *NamedWindow: 4237 return VisitRefOfNamedWindow(in, f) 4238 case *NtileExpr: 4239 return VisitRefOfNtileExpr(in, f) 4240 case *PerformanceSchemaFuncExpr: 4241 return VisitRefOfPerformanceSchemaFuncExpr(in, f) 4242 case *PointExpr: 4243 return VisitRefOfPointExpr(in, f) 4244 case *RegexpInstrExpr: 4245 return VisitRefOfRegexpInstrExpr(in, f) 4246 case *RegexpLikeExpr: 4247 return VisitRefOfRegexpLikeExpr(in, f) 4248 case *RegexpReplaceExpr: 4249 return VisitRefOfRegexpReplaceExpr(in, f) 4250 case *RegexpSubstrExpr: 4251 return VisitRefOfRegexpSubstrExpr(in, f) 4252 case *SubstrExpr: 4253 return VisitRefOfSubstrExpr(in, f) 4254 case *Sum: 4255 return VisitRefOfSum(in, f) 4256 case *TimestampFuncExpr: 4257 return VisitRefOfTimestampFuncExpr(in, f) 4258 case *TrimFuncExpr: 4259 return VisitRefOfTrimFuncExpr(in, f) 4260 case *UpdateXMLExpr: 4261 return VisitRefOfUpdateXMLExpr(in, f) 4262 case *ValuesFuncExpr: 4263 return VisitRefOfValuesFuncExpr(in, f) 4264 case *WeightStringFuncExpr: 4265 return VisitRefOfWeightStringFuncExpr(in, f) 4266 default: 4267 // this should never happen 4268 return nil 4269 } 4270 } 4271 func VisitColTuple(in ColTuple, f Visit) error { 4272 if in == nil { 4273 return nil 4274 } 4275 switch in := in.(type) { 4276 case ListArg: 4277 return VisitListArg(in, f) 4278 case *Subquery: 4279 return VisitRefOfSubquery(in, f) 4280 case ValTuple: 4281 return VisitValTuple(in, f) 4282 default: 4283 // this should never happen 4284 return nil 4285 } 4286 } 4287 func VisitConstraintInfo(in ConstraintInfo, f Visit) error { 4288 if in == nil { 4289 return nil 4290 } 4291 switch in := in.(type) { 4292 case *CheckConstraintDefinition: 4293 return VisitRefOfCheckConstraintDefinition(in, f) 4294 case *ForeignKeyDefinition: 4295 return VisitRefOfForeignKeyDefinition(in, f) 4296 default: 4297 // this should never happen 4298 return nil 4299 } 4300 } 4301 func VisitDBDDLStatement(in DBDDLStatement, f Visit) error { 4302 if in == nil { 4303 return nil 4304 } 4305 switch in := in.(type) { 4306 case *AlterDatabase: 4307 return VisitRefOfAlterDatabase(in, f) 4308 case *CreateDatabase: 4309 return VisitRefOfCreateDatabase(in, f) 4310 case *DropDatabase: 4311 return VisitRefOfDropDatabase(in, f) 4312 default: 4313 // this should never happen 4314 return nil 4315 } 4316 } 4317 func VisitDDLStatement(in DDLStatement, f Visit) error { 4318 if in == nil { 4319 return nil 4320 } 4321 switch in := in.(type) { 4322 case *AlterTable: 4323 return VisitRefOfAlterTable(in, f) 4324 case *AlterView: 4325 return VisitRefOfAlterView(in, f) 4326 case *CreateTable: 4327 return VisitRefOfCreateTable(in, f) 4328 case *CreateView: 4329 return VisitRefOfCreateView(in, f) 4330 case *DropTable: 4331 return VisitRefOfDropTable(in, f) 4332 case *DropView: 4333 return VisitRefOfDropView(in, f) 4334 case *RenameTable: 4335 return VisitRefOfRenameTable(in, f) 4336 case *TruncateTable: 4337 return VisitRefOfTruncateTable(in, f) 4338 default: 4339 // this should never happen 4340 return nil 4341 } 4342 } 4343 func VisitExplain(in Explain, f Visit) error { 4344 if in == nil { 4345 return nil 4346 } 4347 switch in := in.(type) { 4348 case *ExplainStmt: 4349 return VisitRefOfExplainStmt(in, f) 4350 case *ExplainTab: 4351 return VisitRefOfExplainTab(in, f) 4352 default: 4353 // this should never happen 4354 return nil 4355 } 4356 } 4357 func VisitExpr(in Expr, f Visit) error { 4358 if in == nil { 4359 return nil 4360 } 4361 switch in := in.(type) { 4362 case *AndExpr: 4363 return VisitRefOfAndExpr(in, f) 4364 case Argument: 4365 return VisitArgument(in, f) 4366 case *ArgumentLessWindowExpr: 4367 return VisitRefOfArgumentLessWindowExpr(in, f) 4368 case *Avg: 4369 return VisitRefOfAvg(in, f) 4370 case *BetweenExpr: 4371 return VisitRefOfBetweenExpr(in, f) 4372 case *BinaryExpr: 4373 return VisitRefOfBinaryExpr(in, f) 4374 case *BitAnd: 4375 return VisitRefOfBitAnd(in, f) 4376 case *BitOr: 4377 return VisitRefOfBitOr(in, f) 4378 case *BitXor: 4379 return VisitRefOfBitXor(in, f) 4380 case BoolVal: 4381 return VisitBoolVal(in, f) 4382 case *CaseExpr: 4383 return VisitRefOfCaseExpr(in, f) 4384 case *CastExpr: 4385 return VisitRefOfCastExpr(in, f) 4386 case *CharExpr: 4387 return VisitRefOfCharExpr(in, f) 4388 case *ColName: 4389 return VisitRefOfColName(in, f) 4390 case *CollateExpr: 4391 return VisitRefOfCollateExpr(in, f) 4392 case *ComparisonExpr: 4393 return VisitRefOfComparisonExpr(in, f) 4394 case *ConvertExpr: 4395 return VisitRefOfConvertExpr(in, f) 4396 case *ConvertUsingExpr: 4397 return VisitRefOfConvertUsingExpr(in, f) 4398 case *Count: 4399 return VisitRefOfCount(in, f) 4400 case *CountStar: 4401 return VisitRefOfCountStar(in, f) 4402 case *CurTimeFuncExpr: 4403 return VisitRefOfCurTimeFuncExpr(in, f) 4404 case *Default: 4405 return VisitRefOfDefault(in, f) 4406 case *ExistsExpr: 4407 return VisitRefOfExistsExpr(in, f) 4408 case *ExtractFuncExpr: 4409 return VisitRefOfExtractFuncExpr(in, f) 4410 case *ExtractValueExpr: 4411 return VisitRefOfExtractValueExpr(in, f) 4412 case *ExtractedSubquery: 4413 return VisitRefOfExtractedSubquery(in, f) 4414 case *FirstOrLastValueExpr: 4415 return VisitRefOfFirstOrLastValueExpr(in, f) 4416 case *FuncExpr: 4417 return VisitRefOfFuncExpr(in, f) 4418 case *GTIDFuncExpr: 4419 return VisitRefOfGTIDFuncExpr(in, f) 4420 case *GroupConcatExpr: 4421 return VisitRefOfGroupConcatExpr(in, f) 4422 case *InsertExpr: 4423 return VisitRefOfInsertExpr(in, f) 4424 case *IntervalExpr: 4425 return VisitRefOfIntervalExpr(in, f) 4426 case *IntervalFuncExpr: 4427 return VisitRefOfIntervalFuncExpr(in, f) 4428 case *IntroducerExpr: 4429 return VisitRefOfIntroducerExpr(in, f) 4430 case *IsExpr: 4431 return VisitRefOfIsExpr(in, f) 4432 case *JSONArrayExpr: 4433 return VisitRefOfJSONArrayExpr(in, f) 4434 case *JSONAttributesExpr: 4435 return VisitRefOfJSONAttributesExpr(in, f) 4436 case *JSONContainsExpr: 4437 return VisitRefOfJSONContainsExpr(in, f) 4438 case *JSONContainsPathExpr: 4439 return VisitRefOfJSONContainsPathExpr(in, f) 4440 case *JSONExtractExpr: 4441 return VisitRefOfJSONExtractExpr(in, f) 4442 case *JSONKeysExpr: 4443 return VisitRefOfJSONKeysExpr(in, f) 4444 case *JSONObjectExpr: 4445 return VisitRefOfJSONObjectExpr(in, f) 4446 case *JSONOverlapsExpr: 4447 return VisitRefOfJSONOverlapsExpr(in, f) 4448 case *JSONPrettyExpr: 4449 return VisitRefOfJSONPrettyExpr(in, f) 4450 case *JSONQuoteExpr: 4451 return VisitRefOfJSONQuoteExpr(in, f) 4452 case *JSONRemoveExpr: 4453 return VisitRefOfJSONRemoveExpr(in, f) 4454 case *JSONSchemaValidFuncExpr: 4455 return VisitRefOfJSONSchemaValidFuncExpr(in, f) 4456 case *JSONSchemaValidationReportFuncExpr: 4457 return VisitRefOfJSONSchemaValidationReportFuncExpr(in, f) 4458 case *JSONSearchExpr: 4459 return VisitRefOfJSONSearchExpr(in, f) 4460 case *JSONStorageFreeExpr: 4461 return VisitRefOfJSONStorageFreeExpr(in, f) 4462 case *JSONStorageSizeExpr: 4463 return VisitRefOfJSONStorageSizeExpr(in, f) 4464 case *JSONUnquoteExpr: 4465 return VisitRefOfJSONUnquoteExpr(in, f) 4466 case *JSONValueExpr: 4467 return VisitRefOfJSONValueExpr(in, f) 4468 case *JSONValueMergeExpr: 4469 return VisitRefOfJSONValueMergeExpr(in, f) 4470 case *JSONValueModifierExpr: 4471 return VisitRefOfJSONValueModifierExpr(in, f) 4472 case *LagLeadExpr: 4473 return VisitRefOfLagLeadExpr(in, f) 4474 case *LineStringExpr: 4475 return VisitRefOfLineStringExpr(in, f) 4476 case ListArg: 4477 return VisitListArg(in, f) 4478 case *Literal: 4479 return VisitRefOfLiteral(in, f) 4480 case *LocateExpr: 4481 return VisitRefOfLocateExpr(in, f) 4482 case *LockingFunc: 4483 return VisitRefOfLockingFunc(in, f) 4484 case *MatchExpr: 4485 return VisitRefOfMatchExpr(in, f) 4486 case *Max: 4487 return VisitRefOfMax(in, f) 4488 case *MemberOfExpr: 4489 return VisitRefOfMemberOfExpr(in, f) 4490 case *Min: 4491 return VisitRefOfMin(in, f) 4492 case *NTHValueExpr: 4493 return VisitRefOfNTHValueExpr(in, f) 4494 case *NamedWindow: 4495 return VisitRefOfNamedWindow(in, f) 4496 case *NotExpr: 4497 return VisitRefOfNotExpr(in, f) 4498 case *NtileExpr: 4499 return VisitRefOfNtileExpr(in, f) 4500 case *NullVal: 4501 return VisitRefOfNullVal(in, f) 4502 case *Offset: 4503 return VisitRefOfOffset(in, f) 4504 case *OrExpr: 4505 return VisitRefOfOrExpr(in, f) 4506 case *PerformanceSchemaFuncExpr: 4507 return VisitRefOfPerformanceSchemaFuncExpr(in, f) 4508 case *PointExpr: 4509 return VisitRefOfPointExpr(in, f) 4510 case *RegexpInstrExpr: 4511 return VisitRefOfRegexpInstrExpr(in, f) 4512 case *RegexpLikeExpr: 4513 return VisitRefOfRegexpLikeExpr(in, f) 4514 case *RegexpReplaceExpr: 4515 return VisitRefOfRegexpReplaceExpr(in, f) 4516 case *RegexpSubstrExpr: 4517 return VisitRefOfRegexpSubstrExpr(in, f) 4518 case *Std: 4519 return VisitRefOfStd(in, f) 4520 case *StdDev: 4521 return VisitRefOfStdDev(in, f) 4522 case *StdPop: 4523 return VisitRefOfStdPop(in, f) 4524 case *StdSamp: 4525 return VisitRefOfStdSamp(in, f) 4526 case *Subquery: 4527 return VisitRefOfSubquery(in, f) 4528 case *SubstrExpr: 4529 return VisitRefOfSubstrExpr(in, f) 4530 case *Sum: 4531 return VisitRefOfSum(in, f) 4532 case *TimestampFuncExpr: 4533 return VisitRefOfTimestampFuncExpr(in, f) 4534 case *TrimFuncExpr: 4535 return VisitRefOfTrimFuncExpr(in, f) 4536 case *UnaryExpr: 4537 return VisitRefOfUnaryExpr(in, f) 4538 case *UpdateXMLExpr: 4539 return VisitRefOfUpdateXMLExpr(in, f) 4540 case ValTuple: 4541 return VisitValTuple(in, f) 4542 case *ValuesFuncExpr: 4543 return VisitRefOfValuesFuncExpr(in, f) 4544 case *VarPop: 4545 return VisitRefOfVarPop(in, f) 4546 case *VarSamp: 4547 return VisitRefOfVarSamp(in, f) 4548 case *Variable: 4549 return VisitRefOfVariable(in, f) 4550 case *Variance: 4551 return VisitRefOfVariance(in, f) 4552 case *WeightStringFuncExpr: 4553 return VisitRefOfWeightStringFuncExpr(in, f) 4554 case *XorExpr: 4555 return VisitRefOfXorExpr(in, f) 4556 default: 4557 // this should never happen 4558 return nil 4559 } 4560 } 4561 func VisitInsertRows(in InsertRows, f Visit) error { 4562 if in == nil { 4563 return nil 4564 } 4565 switch in := in.(type) { 4566 case *Select: 4567 return VisitRefOfSelect(in, f) 4568 case *Union: 4569 return VisitRefOfUnion(in, f) 4570 case Values: 4571 return VisitValues(in, f) 4572 default: 4573 // this should never happen 4574 return nil 4575 } 4576 } 4577 func VisitSelectExpr(in SelectExpr, f Visit) error { 4578 if in == nil { 4579 return nil 4580 } 4581 switch in := in.(type) { 4582 case *AliasedExpr: 4583 return VisitRefOfAliasedExpr(in, f) 4584 case *Nextval: 4585 return VisitRefOfNextval(in, f) 4586 case *StarExpr: 4587 return VisitRefOfStarExpr(in, f) 4588 default: 4589 // this should never happen 4590 return nil 4591 } 4592 } 4593 func VisitSelectStatement(in SelectStatement, f Visit) error { 4594 if in == nil { 4595 return nil 4596 } 4597 switch in := in.(type) { 4598 case *Select: 4599 return VisitRefOfSelect(in, f) 4600 case *Union: 4601 return VisitRefOfUnion(in, f) 4602 default: 4603 // this should never happen 4604 return nil 4605 } 4606 } 4607 func VisitShowInternal(in ShowInternal, f Visit) error { 4608 if in == nil { 4609 return nil 4610 } 4611 switch in := in.(type) { 4612 case *ShowBasic: 4613 return VisitRefOfShowBasic(in, f) 4614 case *ShowCreate: 4615 return VisitRefOfShowCreate(in, f) 4616 case *ShowOther: 4617 return VisitRefOfShowOther(in, f) 4618 default: 4619 // this should never happen 4620 return nil 4621 } 4622 } 4623 func VisitSimpleTableExpr(in SimpleTableExpr, f Visit) error { 4624 if in == nil { 4625 return nil 4626 } 4627 switch in := in.(type) { 4628 case *DerivedTable: 4629 return VisitRefOfDerivedTable(in, f) 4630 case TableName: 4631 return VisitTableName(in, f) 4632 default: 4633 // this should never happen 4634 return nil 4635 } 4636 } 4637 func VisitStatement(in Statement, f Visit) error { 4638 if in == nil { 4639 return nil 4640 } 4641 switch in := in.(type) { 4642 case *AlterDatabase: 4643 return VisitRefOfAlterDatabase(in, f) 4644 case *AlterMigration: 4645 return VisitRefOfAlterMigration(in, f) 4646 case *AlterTable: 4647 return VisitRefOfAlterTable(in, f) 4648 case *AlterView: 4649 return VisitRefOfAlterView(in, f) 4650 case *AlterVschema: 4651 return VisitRefOfAlterVschema(in, f) 4652 case *Begin: 4653 return VisitRefOfBegin(in, f) 4654 case *CallProc: 4655 return VisitRefOfCallProc(in, f) 4656 case *CommentOnly: 4657 return VisitRefOfCommentOnly(in, f) 4658 case *Commit: 4659 return VisitRefOfCommit(in, f) 4660 case *CreateDatabase: 4661 return VisitRefOfCreateDatabase(in, f) 4662 case *CreateTable: 4663 return VisitRefOfCreateTable(in, f) 4664 case *CreateView: 4665 return VisitRefOfCreateView(in, f) 4666 case *DeallocateStmt: 4667 return VisitRefOfDeallocateStmt(in, f) 4668 case *Delete: 4669 return VisitRefOfDelete(in, f) 4670 case *DropDatabase: 4671 return VisitRefOfDropDatabase(in, f) 4672 case *DropTable: 4673 return VisitRefOfDropTable(in, f) 4674 case *DropView: 4675 return VisitRefOfDropView(in, f) 4676 case *ExecuteStmt: 4677 return VisitRefOfExecuteStmt(in, f) 4678 case *ExplainStmt: 4679 return VisitRefOfExplainStmt(in, f) 4680 case *ExplainTab: 4681 return VisitRefOfExplainTab(in, f) 4682 case *Flush: 4683 return VisitRefOfFlush(in, f) 4684 case *Insert: 4685 return VisitRefOfInsert(in, f) 4686 case *Load: 4687 return VisitRefOfLoad(in, f) 4688 case *LockTables: 4689 return VisitRefOfLockTables(in, f) 4690 case *OtherAdmin: 4691 return VisitRefOfOtherAdmin(in, f) 4692 case *OtherRead: 4693 return VisitRefOfOtherRead(in, f) 4694 case *PrepareStmt: 4695 return VisitRefOfPrepareStmt(in, f) 4696 case *Release: 4697 return VisitRefOfRelease(in, f) 4698 case *RenameTable: 4699 return VisitRefOfRenameTable(in, f) 4700 case *RevertMigration: 4701 return VisitRefOfRevertMigration(in, f) 4702 case *Rollback: 4703 return VisitRefOfRollback(in, f) 4704 case *SRollback: 4705 return VisitRefOfSRollback(in, f) 4706 case *Savepoint: 4707 return VisitRefOfSavepoint(in, f) 4708 case *Select: 4709 return VisitRefOfSelect(in, f) 4710 case *Set: 4711 return VisitRefOfSet(in, f) 4712 case *Show: 4713 return VisitRefOfShow(in, f) 4714 case *ShowMigrationLogs: 4715 return VisitRefOfShowMigrationLogs(in, f) 4716 case *ShowThrottledApps: 4717 return VisitRefOfShowThrottledApps(in, f) 4718 case *ShowThrottlerStatus: 4719 return VisitRefOfShowThrottlerStatus(in, f) 4720 case *Stream: 4721 return VisitRefOfStream(in, f) 4722 case *TruncateTable: 4723 return VisitRefOfTruncateTable(in, f) 4724 case *Union: 4725 return VisitRefOfUnion(in, f) 4726 case *UnlockTables: 4727 return VisitRefOfUnlockTables(in, f) 4728 case *Update: 4729 return VisitRefOfUpdate(in, f) 4730 case *Use: 4731 return VisitRefOfUse(in, f) 4732 case *VExplainStmt: 4733 return VisitRefOfVExplainStmt(in, f) 4734 case *VStream: 4735 return VisitRefOfVStream(in, f) 4736 default: 4737 // this should never happen 4738 return nil 4739 } 4740 } 4741 func VisitTableExpr(in TableExpr, f Visit) error { 4742 if in == nil { 4743 return nil 4744 } 4745 switch in := in.(type) { 4746 case *AliasedTableExpr: 4747 return VisitRefOfAliasedTableExpr(in, f) 4748 case *JSONTableExpr: 4749 return VisitRefOfJSONTableExpr(in, f) 4750 case *JoinTableExpr: 4751 return VisitRefOfJoinTableExpr(in, f) 4752 case *ParenTableExpr: 4753 return VisitRefOfParenTableExpr(in, f) 4754 default: 4755 // this should never happen 4756 return nil 4757 } 4758 } 4759 func VisitAlgorithmValue(in AlgorithmValue, f Visit) error { 4760 _, err := f(in) 4761 return err 4762 } 4763 func VisitArgument(in Argument, f Visit) error { 4764 _, err := f(in) 4765 return err 4766 } 4767 func VisitBoolVal(in BoolVal, f Visit) error { 4768 _, err := f(in) 4769 return err 4770 } 4771 func VisitListArg(in ListArg, f Visit) error { 4772 _, err := f(in) 4773 return err 4774 } 4775 func VisitMatchAction(in MatchAction, f Visit) error { 4776 _, err := f(in) 4777 return err 4778 } 4779 func VisitReferenceAction(in ReferenceAction, f Visit) error { 4780 _, err := f(in) 4781 return err 4782 } 4783 func VisitRefOfIdentifierCI(in *IdentifierCI, f Visit) error { 4784 if in == nil { 4785 return nil 4786 } 4787 if cont, err := f(in); err != nil || !cont { 4788 return err 4789 } 4790 return nil 4791 } 4792 func VisitRefOfIdentifierCS(in *IdentifierCS, f Visit) error { 4793 if in == nil { 4794 return nil 4795 } 4796 if cont, err := f(in); err != nil || !cont { 4797 return err 4798 } 4799 return nil 4800 } 4801 func VisitRefOfRootNode(in *RootNode, f Visit) error { 4802 if in == nil { 4803 return nil 4804 } 4805 if cont, err := f(in); err != nil || !cont { 4806 return err 4807 } 4808 if err := VisitSQLNode(in.SQLNode, f); err != nil { 4809 return err 4810 } 4811 return nil 4812 } 4813 func VisitRefOfTableName(in *TableName, f Visit) error { 4814 if in == nil { 4815 return nil 4816 } 4817 if cont, err := f(in); err != nil || !cont { 4818 return err 4819 } 4820 if err := VisitIdentifierCS(in.Name, f); err != nil { 4821 return err 4822 } 4823 if err := VisitIdentifierCS(in.Qualifier, f); err != nil { 4824 return err 4825 } 4826 return nil 4827 } 4828 func VisitRefOfVindexParam(in *VindexParam, f Visit) error { 4829 if in == nil { 4830 return nil 4831 } 4832 if cont, err := f(in); err != nil || !cont { 4833 return err 4834 } 4835 if err := VisitIdentifierCI(in.Key, f); err != nil { 4836 return err 4837 } 4838 return nil 4839 }