public visitCommand()

in src/platform/packages/shared/kbn-esql-ast/src/visitor/global_visitor_context.ts [93:197]


  public visitCommand(
    parent: contexts.VisitorContext | null,
    commandNode: ESQLAstCommand,
    input: types.CommandVisitorInput<Methods>
  ): types.CommandVisitorOutput<Methods> {
    switch (commandNode.name) {
      case 'from': {
        if (!this.methods.visitFromCommand) break;
        return this.visitFromCommand(parent, commandNode, input as any);
      }
      case 'limit': {
        if (!this.methods.visitLimitCommand) break;
        return this.visitLimitCommand(parent, commandNode, input as any);
      }
      case 'explain': {
        if (!this.methods.visitExplainCommand) break;
        return this.visitExplainCommand(parent, commandNode, input as any);
      }
      case 'row': {
        if (!this.methods.visitRowCommand) break;
        return this.visitRowCommand(parent, commandNode, input as any);
      }
      case 'ts': {
        if (!this.methods.visitTimeseriesCommand) break;
        return this.visitTimeseriesCommand(parent, commandNode, input as any);
      }
      case 'show': {
        if (!this.methods.visitShowCommand) break;
        return this.visitShowCommand(parent, commandNode, input as any);
      }
      case 'meta': {
        if (!this.methods.visitMetaCommand) break;
        return this.visitMetaCommand(parent, commandNode, input as any);
      }
      case 'eval': {
        if (!this.methods.visitEvalCommand) break;
        return this.visitEvalCommand(parent, commandNode, input as any);
      }
      case 'stats': {
        if (!this.methods.visitStatsCommand) break;
        return this.visitStatsCommand(parent, commandNode, input as any);
      }
      case 'inline_stats': {
        if (!this.methods.visitInlineStatsCommand) break;
        return this.visitInlineStatsCommand(parent, commandNode, input as any);
      }
      case 'lookup': {
        if (!this.methods.visitLookupCommand) break;
        return this.visitLookupCommand(parent, commandNode, input as any);
      }
      case 'keep': {
        if (!this.methods.visitKeepCommand) break;
        return this.visitKeepCommand(parent, commandNode, input as any);
      }
      case 'sort': {
        if (!this.methods.visitSortCommand) break;
        return this.visitSortCommand(parent, commandNode, input as any);
      }
      case 'where': {
        if (!this.methods.visitWhereCommand) break;
        return this.visitWhereCommand(parent, commandNode, input as any);
      }
      case 'drop': {
        if (!this.methods.visitDropCommand) break;
        return this.visitDropCommand(parent, commandNode, input as any);
      }
      case 'rename': {
        if (!this.methods.visitRenameCommand) break;
        return this.visitRenameCommand(parent, commandNode, input as any);
      }
      case 'dissect': {
        if (!this.methods.visitDissectCommand) break;
        return this.visitDissectCommand(parent, commandNode, input as any);
      }
      case 'grok': {
        if (!this.methods.visitGrokCommand) break;
        return this.visitGrokCommand(parent, commandNode, input as any);
      }
      case 'enrich': {
        if (!this.methods.visitEnrichCommand) break;
        return this.visitEnrichCommand(parent, commandNode, input as any);
      }
      case 'mv_expand': {
        if (!this.methods.visitMvExpandCommand) break;
        return this.visitMvExpandCommand(parent, commandNode, input as any);
      }
      case 'join': {
        if (!this.methods.visitJoinCommand) break;
        return this.visitJoinCommand(parent, commandNode as ESQLAstJoinCommand, input as any);
      }
      case 'change_point': {
        if (!this.methods.visitChangePointCommand) break;
        return this.visitChangePointCommand(
          parent,
          commandNode as ESQLAstChangePointCommand,
          input as any
        );
      }
      case 'fork': {
        if (!this.methods.visitForkCommand) break;
        return this.visitForkCommand(parent, commandNode, input as any);
      }
    }
    return this.visitCommandGeneric(parent, commandNode, input as any);
  }